Advertisement Jump to content
Sign in to follow this  
MrDoomMaster

SetScissorRect()

This topic is 4921 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 not fully aware of the entire procedure required to get IDirect3DDevice9::SetScissorRect() working properly. I am creating a 2D game that requires clipping in a certain area, and I want to avoid doing the clipping myself. I believe this is the fastest method anyway (open to opinions). MSDN doesn't really discuss much on SetScissorRect, so that's why I'm posting here. I hope someone can help. Thanks!

Share this post


Link to post
Share on other sites
Advertisement
i have found it to be much faster and easier than doing my own clipping and all gfx cards newer than 2000 seem to support it
i use it for all my GUI stuff


IDirect3DDevice9 *pDev;
///
pDev->SetRenderState(D3DRS_SCISSORTESTENABLE, TRUE); // caused me a little pain untill i figured it out
pDev->SetScissorRect(&clipRect);

// do things that require the clipping

pDev->SetRenderState(D3DRS_SCISSORTESTENABLE , FALSE);



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.

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!