glGetBooleanv

glGet: man4/glGet.xml

These commands return values for simple state variables in GL. pname is a symbolic constant indicating the state variable to be returned, and data is a pointer to an array of the indicated type in which to place the returned data. Type conversion is performed if data has a different type than the state variable value being requested. If glGetBooleanv is called, a floating-point (or integer) value is converted to GL_FALSE if and only if it is 0.0 (or 0). Otherwise, it is converted to GL_TRUE. If glGetIntegerv is called, boolean values are returned as GL_TRUE or GL_FALSE, and most floating-point values are rounded to the nearest integer value. Floating-point colors and normals, however, are returned with a linear mapping that maps 1.0 to the most positive representable integer value and -1.0 to the most negative representable integer value. If glGetFloatv or glGetDoublev is called, boolean values are returned as GL_TRUE or GL_FALSE, and integer values are converted to floating-point values. The following symbolic constants are accepted by pname : Many of the boolean parameters can also be queried more easily using glIsEnabled.

The following parameters return the associated value for the active texture unit: GL_TEXTURE_1D, GL_TEXTURE_BINDING_1D, GL_TEXTURE_2D, GL_TEXTURE_BINDING_2D, GL_TEXTURE_3D and GL_TEXTURE_BINDING_3D. GL_MAX_VIEWPORTS, GL_VIEWPORT_SUBPIXEL_BITS, GL_VIEWPORT_BOUNDS_RANGE, GL_LAYER_PROVOKING_VERTEX, and GL_VIEWPORT_INDEX_PROVOKING_VERTEX are available only if the GL version is 4.1 or greater. GL_MAX_VERTEX_ATOMIC_COUNTERS, GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS, GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS, GL_MAX_GEOMETRY_ATOMIC_COUNTERS, GL_MAX_FRAMGENT_ATOMIC_COUNTERS, and GL_MIN_MAP_BUFFER_ALIGNMENT are accepted by pname only if the GL version is 4.2 or greater. GL_MAX_ELEMENT_INDEX is accepted by pname only if the GL version is 4.3 or greater. GL_MAX_COMPUTE_UNIFORM_BLOCKS, GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS, GL_MAX_COMPUTE_UNIFORM_COMPONENTS, GL_MAX_COMPUTE_ATOMIC_COUNTERS, GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS, GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS, GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS, GL_MAX_COMPUTE_WORK_GROUP_COUNT, and GL_MAX_COMPUTE_WORK_GROUP_SIZE and GL_DISPATCH_INDIRECT_BUFFER_BINDING are available only if the GL version is 4.3 or greater. GL_MAX_DEBUG_GROUP_STACK_DEPTH, GL_DEBUG_GROUP_STACK_DEPTH and GL_MAX_LABEL_LENGTH are accepted only if the GL version is 4.3 or greater. GL_MAX_UNIFORM_LOCATIONS is accepted only if the GL version is 4.3 or greater. GL_MAX_FRAMEBUFFER_WIDTH, GL_MAX_FRAMEBUFFER_HEIGHT, GL_MAX_FRAMEBUFFER_LAYERS, and GL_MAX_FRAMEBUFFER_SAMPLES are available only if the GL version is 4.3 or greater. GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS, GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS, GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS, GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS, GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS, and GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS are available only if the GL version is 4.3 or higher. GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT is available only if the GL version is 4.3 or greater. GL_VERTEX_BINDING_DIVISOR, GL_VERTEX_BINDING_OFFSET, GL_VERTEX_BINDING_STRIDE, GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET and GL_MAX_VERTEX_ATTRIB_BINDINGS are available only if the GL version is 4.3 or greater.

@OpenGL_Version(OGLIntroducedIn.V1P0)
fn_glGetBooleanv glGetBooleanv;

See Also

glGetActiveUniform, glGetAttachedShaders, glGetAttribLocation, glGetBufferParameter, glGetBufferPointerv, glGetBufferSubData, glGetCompressedTexImage, glGetError, glGetProgram, glGetProgramInfoLog, glGetQueryiv, glGetQueryObject, glGetShader, glGetShaderInfoLog, glGetShaderSource, glGetString, glGetTexImage, glGetTexLevelParameter, glGetTexParameter, glGetUniform, glGetUniformLocation, glGetVertexAttrib, glGetVertexAttribPointerv, glIsEnabled

Meta