2 questions - view frustum,drawing

Started by
1 comment, last by Nebu 15 years, 10 months ago
First question: Assumming I have view frustum clipping using 6 planes and before I test each triangle I test the whole object using min max points, what do you do in the case min and max points are out the but the object is actually inside the frustum? Second question: Currently for my 3d app I'm using SDL and models are color rendered (no materials,textures). I recently added floor to my app and noticed it slows the fps a bunch. its basically an addition of 100 triangles per frame, how come its so damn slow? I'm guessing maybe SDL drawing routine could be slow? Thanks!
Advertisement
Quote:Assumming I have view frustum clipping using 6 planes and before I test each triangle I test the whole object using min max points, what do you do in the case min and max points are out the but the object is actually inside the frustum?
You don't test the eight corners of the box; instead, you test the box as a whole to see if it's entirely behind one of the six frustum planes. (Google 'AABB frustum culling' and you should find some examples of how to do this.)
Quote:Currently for my 3d app I'm using SDL and models are color rendered (no materials,textures). I recently added floor to my app and noticed it slows the fps a bunch. its basically an addition of 100 triangles per frame, how come its so damn slow? I'm guessing maybe SDL drawing routine could be slow?
What graphics API are you using? OpenGL?
I'm using SDL only with SDL_gfx lib to draw primitives.

This topic is closed to new replies.

Advertisement