ITS SLOOOOOOOOW........

Started by
3 comments, last by Esap1 24 years, 1 month ago
Im have trouble with rendering a simple 3d file. Im loading a .x file using that CRAPPY CD3DFILE class and calling its render function. My .x has about 1280 Vertices with about 600 faces, and 2 textures, 1 on 300 faces, and the other on the other 300 faces, the textures are 128x128x8bit, its a hallway and a couple little rooms, without any walls, just floor and ceiling. Well on my Duall Voodoo2 SLI and a K7550(110bus), Im getting about 10FPS!!!!!!!!!!!!!, this could not be normal, I just dont get the huge slowdown, yeah I havent implemented my portals yet, but there might be this many drawn on the screen anyway, even in a portal engine, and should it slow down to 10fps, is it The Render() function in the CD3DFILE class. Thanks A LOT in ADVANCE!!!!!
Advertisement
Something to think about, how many game developers do you know that use that. Or let me rephrase, how many developers do you know that create there own custom engines?
First of all, there were problems with that class. The sample D3DIM X viewer app is also pretty slow. I don''t know anymore what the cause of the slowdown was, but it had to do with all vertices being retransformed upon material / texture switching. Now, if you have one material switch per frame(render 300 tris, switch material, render the other 300 tris), you won''t loose too much speed. But if you do much switching, things can slow down tremendously.

This is probably your problem. Try sorting your triangles based on material, and use the standard DrawPrimitive calls. Do not compile your vertex array.

DaBit

Thanks DaBit, but was does compiling vertex arrays mean?
Two things, what does compiling your vertices mean, and should I sort by Material or by texture?(right now, they all have the same material, but they might not later)

This topic is closed to new replies.

Advertisement