Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Solarbeam

REALLY stuck..

This topic is 6490 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!