Jump to content
  • Advertisement
Sign in to follow this  
PumpkinPieman

Clipping regions

This topic is 4643 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 exactly sure if this is entirely possible, but is there a way to mask a certain area of the back buffer so that anything out of that region is clipped? Say for example I want to make a simple GUI and it happens to have scroll bars, how would I clip the content inside a frame without it spilling over the edge of the box?

Share this post


Link to post
Share on other sites
Advertisement
You could set a user defined clipping plane but I think what you want might be closer to stencil buffers than actual clipping planes.

What you would want to do is look at how stencil buffers operate.
The purpose of the stencil buffer
The stencil buffer enables or disables drawing to the rendering target surface on a pixel-by-pixel basis. At its most fundamental level, it enables applications to mask sections of the rendered image so that they are not displayed. Applications often use stencil buffers for special effects such as dissolves, decaling, and outlining.

This is normally used in reflections and shadows. As it provides the user with ways to "stencil" out parts.

I hope this helps.
Take care.

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!