2d tiling in d3d

Started by
2 comments, last by -justin- 18 years, 11 months ago
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 =)
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
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                                          
Looking for video game music? Check out some of my samples at http://www.youtube.c...ser/cminortunes            
                                                          
I'm currently looking to create music for a project, if you are interested e-mail me at cminortunes@gmail.com    
                                                          
Please only message me for hobby projects, I am not looking to create music for anything serious.
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-
Professional C++ and .NET developer trying to break into indie game development.
Follow my progress: http://blog.nuclex-games.com/ or Twitter - Topics: Ogre3D, Blender, game architecture tips & code snippets.
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?~

This topic is closed to new replies.

Advertisement