GLSCISSOR(3G)
πΈ NAME πΈ
okay bestie, welcome to the GLSCISSOR(3G) page β we're talking about glScissor, the little icon that defines the scissor box. π
π» C SPECIFICATION π»
void glScissor( GLint x,
GLint y,
GLsizei width,
GLsizei height )
β¨ PARAMETERS β¨
x,yβ these specify the lower left corner of the scissor box. Initially, they're(0, 0)β yes, that's the starting vibe. π«Άwidth,heightβ these specify the width and height of the scissor box. When a GL context is first attached to a window,widthandheightare set to the dimensions of that window. periodt. πͺ
π¦ DESCRIPTION π¦
okay so glScissor defines a rectangle β the scissor box β in window coordinates. The first two arguments, x and y, specify the lower left corner of the box. width and height specify the width and height of the box. it's giving precise rectangle energy. π
To enable and disable the scissor test, call glEnable and glDisable with argument GL_SCISSOR_TEST. The test is initially disabled. While the test is enabled, only pixels that lie within the scissor box can be modified by drawing commands. lowkey a pixel bouncer. πͺβ¨
Window coordinates have integer values at the shared corners of frame buffer pixels. So glScissor(0,0,1,1) allows modification of only the lower left pixel in the window, and glScissor(0,0,0,0) doesn't allow modification of any pixels in the window. not even one, bestie. π
When the scissor test is disabled, it is as though the scissor box includes the entire window. iconic default behavior, ngl. π
π ERRORS π
GL_INVALID_VALUEis generated if eitherwidthorheightis negative. no negative dimensions, bestie β that's the rule. π«GL_INVALID_OPERATIONis generated ifglScissoris executed between the execution ofglBeginand the corresponding execution ofglEnd. do not try it in the middle of that pair, fr fr. π
π ASSOCIATED GETS π
glGetwith argumentGL_SCISSOR_BOXglIsEnabledwith argumentGL_SCISSOR_TEST
these are the little check-in tools. iykyk. π
π SEE ALSO π
glEnable(3G)glViewport(3G)
go read these next, bestie β they're part of the same friend group. π«Ά
π footer tea: this page signs off under the GLSCISSOR(3G) tag, with no extra source/version/date deets to spill β byeee bestie! π
π¦ where this page comes from
- opensuse-leap 16.0: Mesa-libGL-devel 24.1.7-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms