2d tiling in d3d
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 =)
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
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
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-
-Markus-
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
Popular Topics
Advertisement