REALLY stuck..
Ok, this is my problem. Up till now, ive been using DrawPrimitive to render everything; is that ok? Now, i want to do visibility, but i cant exclude certain polygons for rendering or not rendering; i have to render the whole thing as a call to DrawPrimitive. Is there any way to draw polygon by polygon thats efficient? I just want something that allows me to, say, not draw polygons that are far away...Also, can someone give me some example code on how to use d3dxsimpleshapes? There isnt any REAL documentation on them in the SDK.
please? Im really stuck; i seriously need a clue...How do the real programmers do this kind of stuff?
Where does the data you pass to DrawPrimitive come from? You must generate it somehow!
When you''re building your list of triangles to draw, cull the ones which are wholly outside the view frustrum. Avoid costly memory allocations by allocating enough memory for all triangles beforehand.
When culling, do the z (depth) test first. This is a simple comparison of z-values. The other sides of the view frustrum are trickier to deal with.
Dave
When you''re building your list of triangles to draw, cull the ones which are wholly outside the view frustrum. Avoid costly memory allocations by allocating enough memory for all triangles beforehand.
When culling, do the z (depth) test first. This is a simple comparison of z-values. The other sides of the view frustrum are trickier to deal with.
Dave
IDirect3DDevice7::ComputeSphereVisibility will clip stuff to the viewing frustrum. YOu should change your data structures for storing the primitives.
------------------------------
#pragma twice
------------------------------
#pragma twice
To my homepage is link to my d3dxsimpleshape demo that I released few months ago. Link is somewhere to news page, so you should check that.
Esa Salminen
python@dlc.fi
www.saunalahti.fi/~python
Esa Salminen
python@dlc.fi
www.saunalahti.fi/~python
Data structures for storing the primitives? right now, im storing them in an array; is that ok? Also, how can i tell if a polygon is inside or not or behind another polygon and then how do i delete it from the array?
what you mean to ask is how to create your own z-buffer. DirectX can do one for you if you want.
No, ive got a z-buffer, but i have the feeling that it''s not culling faces covered by other faces (i.e. its slow when i look at a polygon with other polygons behind it). Um, i still dont understand how to cull to the viewing frustrum. Also, i dont understand how to make distant polygons in an array not draw...Please, im begging you, i need help! My project is at a standstill because of this!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement