|
|
|
|
@ -88,11 +88,14 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
* @requires_gl Geometry shaders are not available in OpenGL ES. |
|
|
|
|
*/ |
|
|
|
|
Geometry = GL_GEOMETRY_SHADER, |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#ifndef MAGNUM_TARGET_GLES2 |
|
|
|
|
/**
|
|
|
|
|
* Compute shader |
|
|
|
|
* @requires_gl43 %Extension @extension{ARB,compute_shader} |
|
|
|
|
* @requires_gl Compute shaders are not available in OpenGL ES. |
|
|
|
|
* @requires_gles31 Compute shaders are not available in OpenGL ES |
|
|
|
|
* 3.0 and older |
|
|
|
|
*/ |
|
|
|
|
Compute = GL_COMPUTE_SHADER, |
|
|
|
|
#endif |
|
|
|
|
@ -119,8 +122,8 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
* @brief Max supported component count of tessellation control shader input vertex |
|
|
|
|
* |
|
|
|
|
* The result is cached, repeated queries don't result in repeated |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,tessellation_shader} |
|
|
|
|
* is not available, returns `0`. |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,tessellation_shader} (part |
|
|
|
|
* of OpenGL 4.0) is not available, returns `0`. |
|
|
|
|
* @see @fn_gl{Get} with @def_gl{MAX_TESS_CONTROL_INPUT_COMPONENTS} |
|
|
|
|
* @requires_gl Tessellation shaders are not available in OpenGL ES. |
|
|
|
|
*/ |
|
|
|
|
@ -130,8 +133,8 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
* @brief Max supported component count of tessellation control shader output vertex |
|
|
|
|
* |
|
|
|
|
* The result is cached, repeated queries don't result in repeated |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,tessellation_shader} |
|
|
|
|
* is not available, returns `0`. |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,tessellation_shader} (part |
|
|
|
|
* of OpenGL 4.0) is not available, returns `0`. |
|
|
|
|
* @see @fn_gl{Get} with @def_gl{MAX_TESS_CONTROL_OUTPUT_COMPONENTS} |
|
|
|
|
* @requires_gl Tessellation shaders are not available in OpenGL ES. |
|
|
|
|
*/ |
|
|
|
|
@ -141,8 +144,8 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
* @brief Max supported component count of all tessellation control shader output vertices combined |
|
|
|
|
* |
|
|
|
|
* The result is cached, repeated queries don't result in repeated |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,tessellation_shader} |
|
|
|
|
* is not available, returns `0`. |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,tessellation_shader} (part |
|
|
|
|
* of OpenGL 4.0) is not available, returns `0`. |
|
|
|
|
* @see @fn_gl{Get} with @def_gl{MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS} |
|
|
|
|
* @requires_gl Tessellation shaders are not available in OpenGL ES. |
|
|
|
|
*/ |
|
|
|
|
@ -152,8 +155,8 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
* @brief Max supported component count of tessellation evaluation shader input vertex |
|
|
|
|
* |
|
|
|
|
* The result is cached, repeated queries don't result in repeated |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,tessellation_shader} |
|
|
|
|
* is not available, returns `0`. |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,tessellation_shader} (part |
|
|
|
|
* of OpenGL 4.0) is not available, returns `0`. |
|
|
|
|
* @see @fn_gl{Get} with @def_gl{MAX_TESS_EVALUATION_INPUT_COMPONENTS} |
|
|
|
|
* @requires_gl Tessellation shaders are not available in OpenGL ES. |
|
|
|
|
*/ |
|
|
|
|
@ -163,8 +166,8 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
* @brief Max supported component count of tessellation evaluation shader output vertex |
|
|
|
|
* |
|
|
|
|
* The result is cached, repeated queries don't result in repeated |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,tessellation_shader} |
|
|
|
|
* is not available, returns `0`. |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,tessellation_shader} (part |
|
|
|
|
* of OpenGL 4.0) is not available, returns `0`. |
|
|
|
|
* @see @fn_gl{Get} with @def_gl{MAX_TESS_EVALUATION_OUTPUT_COMPONENTS} |
|
|
|
|
* @requires_gl Tessellation shaders are not available in OpenGL ES. |
|
|
|
|
*/ |
|
|
|
|
@ -174,8 +177,8 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
* @brief Max supported component count of geometry shader input vertex |
|
|
|
|
* |
|
|
|
|
* The result is cached, repeated queries don't result in repeated |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,geometry_shader4} |
|
|
|
|
* is not available, returns `0`. |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,geometry_shader4} (part of |
|
|
|
|
* OpenGL 3.2) is not available, returns `0`. |
|
|
|
|
* @see @fn_gl{Get} with @def_gl{MAX_GEOMETRY_INPUT_COMPONENTS} |
|
|
|
|
* @requires_gl Geometry shaders are not available in OpenGL ES. |
|
|
|
|
*/ |
|
|
|
|
@ -185,8 +188,8 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
* @brief Max supported component count of geometry shader output vertex |
|
|
|
|
* |
|
|
|
|
* The result is cached, repeated queries don't result in repeated |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,geometry_shader4} |
|
|
|
|
* is not available, returns `0`. |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,geometry_shader4} (part of |
|
|
|
|
* OpenGL 3.2) is not available, returns `0`. |
|
|
|
|
* @see @fn_gl{Get} with @def_gl{MAX_GEOMETRY_OUTPUT_COMPONENTS} |
|
|
|
|
* @requires_gl Geometry shaders are not available in OpenGL ES. |
|
|
|
|
*/ |
|
|
|
|
@ -196,8 +199,8 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
* @brief Max supported component count of all geometry shader output vertices combined |
|
|
|
|
* |
|
|
|
|
* The result is cached, repeated queries don't result in repeated |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,geometry_shader4} |
|
|
|
|
* is not available, returns `0`. |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,geometry_shader4} (part of |
|
|
|
|
* OpenGL 3.2) is not available, returns `0`. |
|
|
|
|
* @see @fn_gl{Get} with @def_gl{MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS} |
|
|
|
|
* @requires_gl Geometry shaders are not available in OpenGL ES. |
|
|
|
|
*/ |
|
|
|
|
@ -235,13 +238,14 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
*/ |
|
|
|
|
static Int maxUniformComponents(Type type); |
|
|
|
|
|
|
|
|
|
#ifndef MAGNUM_TARGET_GLES |
|
|
|
|
#ifndef MAGNUM_TARGET_GLES2 |
|
|
|
|
/**
|
|
|
|
|
* @brief Max supported atomic counter buffer count |
|
|
|
|
* |
|
|
|
|
* The result is cached, repeated queries don't result in repeated |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,shader_atomic_counters} or |
|
|
|
|
* particular shader stage is not available, returns `0`. |
|
|
|
|
* OpenGL calls. If neither extension @extension{ARB,shader_atomic_counters} |
|
|
|
|
* (part of OpenGL 4.2) nor OpenGL ES 3.1 is available or if particular |
|
|
|
|
* shader stage is not available, returns `0`. |
|
|
|
|
* @see @ref maxCombinedAtomicCounterBuffers(), @ref maxAtomicCounters(), |
|
|
|
|
* @fn_gl{Get} with @def_gl{MAX_VERTEX_ATOMIC_COUNTER_BUFFERS}, |
|
|
|
|
* @def_gl{MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS}, |
|
|
|
|
@ -249,7 +253,7 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
* @def_gl{MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS}, |
|
|
|
|
* @def_gl{MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS} or |
|
|
|
|
* @def_gl{MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS} |
|
|
|
|
* @requires_gl Atomic counters are not available in OpenGL ES. |
|
|
|
|
* @requires_gles30 Not defined in OpenGL ES 2.0 |
|
|
|
|
*/ |
|
|
|
|
static Int maxAtomicCounterBuffers(Type type); |
|
|
|
|
|
|
|
|
|
@ -257,11 +261,11 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
* @brief Max supported atomic counter buffer count for all stages combined |
|
|
|
|
* |
|
|
|
|
* The result is cached, repeated queries don't result in repeated |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,shader_atomic_counters} is |
|
|
|
|
* not available, returns `0`. |
|
|
|
|
* OpenGL calls. If neither extension @extension{ARB,shader_atomic_counters} |
|
|
|
|
* (part of OpenGL 4.2) nor OpenGL ES 3.1 is available, returns `0`. |
|
|
|
|
* @see @ref maxAtomicCounterBuffers(), @ref maxCombinedAtomicCounters(), |
|
|
|
|
* @fn_gl{Get} with @def_gl{MAX_COMBINED_ATOMIC_COUNTER_BUFFERS} |
|
|
|
|
* @requires_gl Atomic counters are not available in OpenGL ES. |
|
|
|
|
* @requires_gles30 Not defined in OpenGL ES 2.0 |
|
|
|
|
*/ |
|
|
|
|
static Int maxCombinedAtomicCounterBuffers(); |
|
|
|
|
|
|
|
|
|
@ -269,8 +273,9 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
* @brief Max supported atomic counter count |
|
|
|
|
* |
|
|
|
|
* The result is cached, repeated queries don't result in repeated |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,shader_atomic_counters} or |
|
|
|
|
* particular shader stage is not available, returns `0`. |
|
|
|
|
* OpenGL calls. If neither extension @extension{ARB,shader_atomic_counters} |
|
|
|
|
* (part of OpenGL 4.2) nor OpenGL ES 3.1 is available or if particular |
|
|
|
|
* shader stage is not available, returns `0`. |
|
|
|
|
* @see @ref maxCombinedAtomicCounters(), @ref maxAtomicCounterBuffers(), |
|
|
|
|
* @fn_gl{Get} with @def_gl{MAX_VERTEX_ATOMIC_COUNTERS}, |
|
|
|
|
* @def_gl{MAX_TESS_CONTROL_ATOMIC_COUNTERS}, |
|
|
|
|
@ -278,7 +283,7 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
* @def_gl{MAX_GEOMETRY_ATOMIC_COUNTERS}, |
|
|
|
|
* @def_gl{MAX_COMPUTE_ATOMIC_COUNTERS} or |
|
|
|
|
* @def_gl{MAX_FRAGMENT_ATOMIC_COUNTERS} |
|
|
|
|
* @requires_gl Atomic counters are not available in OpenGL ES. |
|
|
|
|
* @requires_gles30 Not defined in OpenGL ES 2.0 |
|
|
|
|
*/ |
|
|
|
|
static Int maxAtomicCounters(Type type); |
|
|
|
|
|
|
|
|
|
@ -286,11 +291,11 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
* @brief Max supported atomic counter count for all stages combined |
|
|
|
|
* |
|
|
|
|
* The result is cached, repeated queries don't result in repeated |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,shader_atomic_counters} is |
|
|
|
|
* not available, returns `0`. |
|
|
|
|
* OpenGL calls. If neither extension @extension{ARB,shader_atomic_counters} |
|
|
|
|
* (part of OpenGL 4.2) nor OpenGL ES 3.1 is available, returns `0`. |
|
|
|
|
* @see @ref maxAtomicCounters(), @ref maxCombinedAtomicCounterBuffers(), |
|
|
|
|
* @fn_gl{Get} with @def_gl{MAX_COMBINED_ATOMIC_COUNTERS} |
|
|
|
|
* @requires_gl Atomic counters are not available in OpenGL ES. |
|
|
|
|
* @requires_gles30 Not defined in OpenGL ES 2.0 |
|
|
|
|
*/ |
|
|
|
|
static Int maxCombinedAtomicCounters(); |
|
|
|
|
|
|
|
|
|
@ -298,8 +303,9 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
* @brief Max supported image uniform count |
|
|
|
|
* |
|
|
|
|
* The result is cached, repeated queries don't result in repeated |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,shader_image_load_store} |
|
|
|
|
* or particular shader stage is not available, returns `0`. |
|
|
|
|
* OpenGL calls. If neither extension @extension{ARB,shader_image_load_store} |
|
|
|
|
* (part of OpenGL 4.2) nor OpenGL ES 3.1 is available or if particular |
|
|
|
|
* shader stage is not available, returns `0`. |
|
|
|
|
* @see @ref maxCombinedImageUniforms(), |
|
|
|
|
* @fn_gl{Get} with @def_gl{MAX_VERTEX_IMAGE_UNIFORMS}, |
|
|
|
|
* @def_gl{MAX_TESS_CONTROL_IMAGE_UNIFORMS}, |
|
|
|
|
@ -307,7 +313,7 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
* @def_gl{MAX_GEOMETRY_IMAGE_UNIFORMS}, |
|
|
|
|
* @def_gl{MAX_COMPUTE_IMAGE_UNIFORMS} or |
|
|
|
|
* @def_gl{MAX_FRAGMENT_IMAGE_UNIFORMS} |
|
|
|
|
* @requires_gl %Image load/store is not available in OpenGL ES. |
|
|
|
|
* @requires_gles30 Not defined in OpenGL ES 2.0 |
|
|
|
|
*/ |
|
|
|
|
static Int maxImageUniforms(Type type); |
|
|
|
|
|
|
|
|
|
@ -315,11 +321,11 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
* @brief Max supported image uniform count for all stages combined |
|
|
|
|
* |
|
|
|
|
* The result is cached, repeated queries don't result in repeated |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,shader_image_load_store} |
|
|
|
|
* is not available, returns `0`. |
|
|
|
|
* OpenGL calls. If neither extension @extension{ARB,shader_image_load_store} |
|
|
|
|
* (part of OpenGL 4.2) nor OpenGL ES 3.1 is available, returns `0`. |
|
|
|
|
* @see @ref maxImageUniforms(), |
|
|
|
|
* @fn_gl{Get} with @def_gl{MAX_COMBINED_IMAGE_UNIFORMS} |
|
|
|
|
* @requires_gl %Image load/store is not available in OpenGL ES. |
|
|
|
|
* @requires_gles30 Not defined in OpenGL ES 2.0 |
|
|
|
|
*/ |
|
|
|
|
static Int maxCombinedImageUniforms(); |
|
|
|
|
|
|
|
|
|
@ -327,8 +333,9 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
* @brief Max supported shader storage block count |
|
|
|
|
* |
|
|
|
|
* The result is cached, repeated queries don't result in repeated |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,shader_storage_buffer_object} |
|
|
|
|
* or particular shader stage is not available, returns `0`. |
|
|
|
|
* OpenGL calls. If neither extension @extension{ARB,shader_storage_buffer_object} |
|
|
|
|
* (part of OpenGL 4.3) nor OpenGL ES 3.1 is available or if particular |
|
|
|
|
* shader stage is not available, returns `0`. |
|
|
|
|
* @see @ref maxCombinedShaderStorageBlocks(), |
|
|
|
|
* @fn_gl{Get} with @def_gl{MAX_VERTEX_SHADER_STORAGE_BLOCKS}, |
|
|
|
|
* @def_gl{MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS}, |
|
|
|
|
@ -336,7 +343,7 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
* @def_gl{MAX_GEOMETRY_SHADER_STORAGE_BLOCKS}, |
|
|
|
|
* @def_gl{MAX_COMPUTE_SHADER_STORAGE_BLOCKS} or |
|
|
|
|
* @def_gl{MAX_FRAGMENT_SHADER_STORAGE_BLOCKS} |
|
|
|
|
* @requires_gl %Shader storage is not available in OpenGL ES. |
|
|
|
|
* @requires_gles30 Not defined in OpenGL ES 2.0 |
|
|
|
|
*/ |
|
|
|
|
static Int maxShaderStorageBlocks(Type type); |
|
|
|
|
|
|
|
|
|
@ -344,11 +351,11 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
* @brief Max supported shader storage block count for all stages combined |
|
|
|
|
* |
|
|
|
|
* The result is cached, repeated queries don't result in repeated |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,shader_storage_buffer_object} |
|
|
|
|
* is not available, returns `0`. |
|
|
|
|
* OpenGL calls. If neither extension @extension{ARB,shader_storage_buffer_object} |
|
|
|
|
* (part of OpenGL 4.3) nor OpenGL ES 3.1 is available, returns `0`. |
|
|
|
|
* @see @ref maxShaderStorageBlocks(), |
|
|
|
|
* @fn_gl{Get} with @def_gl{MAX_COMBINED_SHADER_STORAGE_BLOCKS} |
|
|
|
|
* @requires_gl %Shader storage is not available in OpenGL ES. |
|
|
|
|
* @requires_gles30 Not defined in OpenGL ES 2.0 |
|
|
|
|
*/ |
|
|
|
|
static Int maxCombinedShaderStorageBlocks(); |
|
|
|
|
#endif |
|
|
|
|
@ -384,8 +391,9 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
* @brief Max supported uniform block count |
|
|
|
|
* |
|
|
|
|
* The result is cached, repeated queries don't result in repeated |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,uniform_buffer_objects} or |
|
|
|
|
* particular shader stage is not available, returns `0`. |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,uniform_buffer_objects} |
|
|
|
|
* (part of OpenGL 3.1) or particular shader stage is not available, |
|
|
|
|
* returns `0`. |
|
|
|
|
* @see @ref maxCombinedUniformBlocks(), @ref maxUniformComponents(), |
|
|
|
|
* @ref maxCombinedUniformComponents(), |
|
|
|
|
* @fn_gl{Get} with @def_gl{MAX_VERTEX_UNIFORM_BLOCKS}, |
|
|
|
|
@ -402,23 +410,22 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
* @brief Max supported uniform block count for all stages combined |
|
|
|
|
* |
|
|
|
|
* The result is cached, repeated queries don't result in repeated |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,uniform_buffer_objects} is |
|
|
|
|
* not available, returns `0`. |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,uniform_buffer_objects} |
|
|
|
|
* (part of OpenGL 3.1) is not available, returns `0`. |
|
|
|
|
* @see @ref maxUniformBlocks(), @ref maxUniformComponents(), |
|
|
|
|
* @ref maxCombinedUniformComponents(), |
|
|
|
|
* @fn_gl{Get} with @def_gl{MAX_COMBINED_UNIFORM_BLOCKS} |
|
|
|
|
* @requires_gles30 Uniform blocks are not available in OpenGL ES 2.0. |
|
|
|
|
*/ |
|
|
|
|
static Int maxCombinedUniformBlocks(); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#ifndef MAGNUM_TARGET_GLES2 |
|
|
|
|
/**
|
|
|
|
|
* @brief Max supported uniform component count in all blocks combined |
|
|
|
|
* |
|
|
|
|
* The result is cached, repeated queries don't result in repeated |
|
|
|
|
* OpenGL calls. If extension @extension{ARB,uniform_buffer_objects} |
|
|
|
|
* or particular shader stage is not available, returns `0`. |
|
|
|
|
* (part of OpenGL 3.1) or particular shader stage is not available, |
|
|
|
|
* returns `0`. |
|
|
|
|
* @see @ref maxUniformComponents(), @ref maxUniformBlocks(), |
|
|
|
|
* @fn_gl{Get} with @def_gl{MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS}, |
|
|
|
|
* @def_gl{MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS}, |
|
|
|
|
|