02. Scissor Test
The Scissor Test is used to limit drawing to a rectangular region of the viewport. When enabled, only fragments inside the rectangle are passed to later pipeline stages.
The ScissorTest can be enabled or disabled using EnableCap.ScissorTest
GL.Enable( EnableCap.ScissorTest ); GL.Disable( EnableCap.ScissorTest ); // default
Only a single command is related to the ScissorTest, GL.Scissor( x, y, width, height ). By default the parameters are set to cover the whole window.
- X and Y are used to specify the lower-left corner of the rectangle.
- Width is used to specify the horizontal extension of the rectangle.
- Height is used to specify the vertical extension of the rectangle.
State Queries
To determine whether ScissorTest is enabled or disabled, use Result = GL.IsEnabled( EnableCap.ScissorTest );
The values set by GL.Scissor() can be queried by GL.GetInteger( GetPName.ScissorBox, ... ); // returns an array
- Printer-friendly version
- Login or register to post comments

