Sign in to follow this  

Clipping regions

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this