Jump to content
  • Advertisement

Archived

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

Scint

Polygon Clipping

This topic is 5559 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

I''m working on a 2D engine right now in DirectX 9.0 using textured quads (using a few things I picked up from the gamedev article: http://www.gamedev.net/reference/programming/features/2d3dquads/ ). I''ve noticed that if the quad (or polygon in general) is partially outside the viewport, the program does not spit out an error message, and the image is not distorted. Does DirectX/video card automatically clip it for me, or am I writing to video memory somewhere I shouldn''t, or making the video card do more work than it should? I am just wondering if I should go ahead and write a clipping function, or if DirectX will do it for me anyway. (Although either way, I would still throw out polygons that do not have any visible portion in the viewport. No use in sending data that won''t be drawn in any way.)

Share this post


Link to post
Share on other sites
Advertisement
You could/should/would write a frustum culling routine to avoid throwing quads, that won''t be visible, down the rendering pipeline.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!