游戏开发论坛

 找回密码
 立即注册
搜索
查看: 1529|回复: 4

如何支持面片数量很大的mesh

[复制链接]

1

主题

3

帖子

0

积分

新手上路

Rank: 1

积分
0
发表于 2008-6-12 16:24:00 | 显示全部楼层 |阅读模式
HRESULT D3DXCreateMesh(
  DWORD NumFaces,
  ....
);
中NumFaces是DWORD型的,但文档上却说
NumFaces
[in] Number of faces for the mesh. The valid range for this number is greater than 0, and one less than the maximum DWORD (typically 65534), because the last index is reserved.
请问,能不能打破这65536的限制.
我在使用LockIndexBuffer(0, (void**)&idcs)时, 只能定义WORD* idcs, 定义DWORD* idcs就不行.不知道怎么解决

22

主题

309

帖子

353

积分

中级会员

Rank: 3Rank: 3

积分
353
QQ
发表于 2008-6-12 16:53:00 | 显示全部楼层

Re:如何支持面片数量很大的mesh

文档上面也说
A 32-bit mesh (D3DXMESH_32BIT) can theoretically support (2^32)-1 faces and vertices. However, allocating memory for a mesh that large on a 32-bit operating system is not practical.

1

主题

3

帖子

0

积分

新手上路

Rank: 1

积分
0
 楼主| 发表于 2008-6-12 17:04:00 | 显示全部楼层

Re:如何支持面片数量很大的mesh

那只能自己重新定义数据结构来支持吗

22

主题

309

帖子

353

积分

中级会员

Rank: 3Rank: 3

积分
353
QQ
发表于 2008-6-12 17:24:00 | 显示全部楼层

Re:如何支持面片数量很大的mesh

你咋翻译的-_-
文档说,加上参数D3DXMESH_32BIT就支持2^32-1面

1

主题

3

帖子

0

积分

新手上路

Rank: 1

积分
0
 楼主| 发表于 2008-6-12 19:28:00 | 显示全部楼层

Re:如何支持面片数量很大的mesh

明白了,我被theoretically误导了。
谢谢,试试再说。
不过后面那个“However, allocating memory for a mesh that large on a 32-bit operating system is not practical.”是干啥用的。字面意思看懂了,但是32位系统上会有啥问题呢
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2026-1-22 06:27

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表