Is there a defined limit to how many triangles Irrlicht will draw to the screen? I drew a 255x255 grid of squares to the screen, hence 255*255*2 triangles and it drew them fine. But when I went to 256x256 grid nothing was drawn. I checked the size of the Vertices and Indices array within the MeshBuffer and they had the correct number.
Does anybody know of any limit such as this? I know its not my code, because any number less than 256 will work just fine, but 'any' number above it will not and nothing will be drawn.
Triangle Limit ??
-
Gorgon Zola
- Posts: 118
- Joined: Thu Sep 18, 2003 10:05 pm
- Location: switzerland
Perhaps this should be done in version 0.7. Cause what if someone wants to display a model over 66,000 triangles ?? It won't happen because Indices in MeshBuffer is of u16 type, and Vertices is s32 type. So this is kind of a problem.
I just tried changing everything I could think of in the engine to change all these types to u32, I then recompiled and for some reason I must have changed some wrong things because triangles end up missing in the BSP example, and my original problem still persists.
I really 'hope' niko will add this to version 0.7
I just tried changing everything I could think of in the engine to change all these types to u32, I then recompiled and for some reason I must have changed some wrong things because triangles end up missing in the BSP example, and my original problem still persists.
I really 'hope' niko will add this to version 0.7
The problem here has its roots in hardware. The reason why the indices are of u16 type is because all but the more recent graphics cards have only a 16bit index buffer. Even if Irrlicht did represent the indices as u32 the chances are that the graphics card won't be capable of receiving a buffer that size anyway. If you want your program to work for the majority of people you're going to have to split that mesh up
.
[edit] Niko has 32bit indices planned on his TODO list.
[edit] Niko has 32bit indices planned on his TODO list.
-
Gorgon Zola
- Posts: 118
- Joined: Thu Sep 18, 2003 10:05 pm
- Location: switzerland