Jump to content
  • Advertisement
Sign in to follow this  
-justin-

2d tiling in d3d

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

Hey everyone... I have a general question. If you are doing a tile engine you would need to involve clipping. Does d3d have a clipper function? Thanks =)

Share this post


Link to post
Share on other sites
Advertisement
set the D3DRS_CLIPPLANEENABLE render state and use

Direct3DDevice9->SetClipPlane()

i think. I might be wrong (just from eying Direct3D MSDN).

For questions concerning things like that go to MSDN.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/anch_directx.asp

Share this post


Link to post
Share on other sites
Clipping planes are commonly used for distance based clipping of geometry. If you mean simple clipping at the screen borders, as long as you're drawing your tiles as polygons, clipping is automatically done by the video card. You can also set a "scissor rect" in you need to further limit the region in which tiles are drawn. In addition, you could also use the stencil buffer for arbitrary clipping regions.

-Markus-

Share this post


Link to post
Share on other sites
Quote:
Original post by Cygon
Clipping planes are commonly used for distance based clipping of geometry. If you mean simple clipping at the screen borders, as long as you're drawing your tiles as polygons, clipping is automatically done by the video card. You can also set a "scissor rect" in you need to further limit the region in which tiles are drawn. In addition, you could also use the stencil buffer for arbitrary clipping regions.

-Markus-


oooo thanks, that's good to know, that's exactly what i was plannin on using it for...

so if i understand you're saying i don't have to use a clipper if all i am wanting it for is to clip images at the border...like in a tile engine or somethin?

w000t?~

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!