|
|
|
|
@ -67,25 +67,35 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
enum class Type: GLenum { |
|
|
|
|
Vertex = GL_VERTEX_SHADER, /**< Vertex shader */ |
|
|
|
|
|
|
|
|
|
#ifndef MAGNUM_TARGET_GLES |
|
|
|
|
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) |
|
|
|
|
/**
|
|
|
|
|
* Tessellation control shader |
|
|
|
|
* @requires_gl40 Extension @extension{ARB,tessellation_shader} |
|
|
|
|
* @requires_gl Tessellation shaders are not available in OpenGL ES |
|
|
|
|
* or WebGL. |
|
|
|
|
* @requires_gles30 Not defined in OpenGL ES 2.0. |
|
|
|
|
* @requires_es_extension Extension @es_extension{ANDROID,extension_pack_es31a}/ |
|
|
|
|
* @es_extension{EXT,tessellation_shader} |
|
|
|
|
* @requires_gles Tessellation shaders are not available in WebGL. |
|
|
|
|
*/ |
|
|
|
|
#ifndef MAGNUM_TARGET_GLES |
|
|
|
|
TessellationControl = GL_TESS_CONTROL_SHADER, |
|
|
|
|
#else |
|
|
|
|
TessellationControl = GL_TESS_CONTROL_SHADER_EXT, |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Tessellation evaluation shader |
|
|
|
|
* @requires_gl40 Extension @extension{ARB,tessellation_shader} |
|
|
|
|
* @requires_gl Tessellation shaders are not available in OpenGL ES |
|
|
|
|
* or WebGL. |
|
|
|
|
* @requires_gles30 Not defined in OpenGL ES 2.0. |
|
|
|
|
* @requires_es_extension Extension @es_extension{ANDROID,extension_pack_es31a}/ |
|
|
|
|
* @es_extension{EXT,tessellation_shader} |
|
|
|
|
* @requires_gles Tessellation shaders are not available in WebGL. |
|
|
|
|
*/ |
|
|
|
|
#ifndef MAGNUM_TARGET_GLES |
|
|
|
|
TessellationEvaluation = GL_TESS_EVALUATION_SHADER, |
|
|
|
|
#else |
|
|
|
|
TessellationEvaluation = GL_TESS_EVALUATION_SHADER_EXT, |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) |
|
|
|
|
/**
|
|
|
|
|
* Geometry shader |
|
|
|
|
* @requires_gl32 Extension @extension{ARB,geometry_shader4} |
|
|
|
|
@ -127,16 +137,18 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
|
|
|
|
|
|
|
|
|
|
/** @todo `GL_MAX_PATCH_VERTICES`, `GL_MAX_TESS_GEN_LEVEL`, `GL_MAX_TESS_PATCH_COMPONENTS` when @extension{ARB,tessellation_shader} is done */ |
|
|
|
|
|
|
|
|
|
#ifndef MAGNUM_TARGET_GLES |
|
|
|
|
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) |
|
|
|
|
/**
|
|
|
|
|
* @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} (part |
|
|
|
|
* of OpenGL 4.0) is not available, returns `0`. |
|
|
|
|
* OpenGL calls. If neither @extension{ARB,tessellation_shader} (part |
|
|
|
|
* of OpenGL 4.0) nor @es_extension{ANDROID,extension_pack_es31a}/ |
|
|
|
|
* @es_extension{EXT,tessellation_shader} ES extension is 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 or |
|
|
|
|
* WebGL. |
|
|
|
|
* @requires_gles30 Not defined in OpenGL ES 2.0. |
|
|
|
|
* @requires_gl Tessellation shaders are not available in WebGL. |
|
|
|
|
*/ |
|
|
|
|
static Int maxTessellationControlInputComponents(); |
|
|
|
|
|
|
|
|
|
@ -144,11 +156,13 @@ 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} (part |
|
|
|
|
* of OpenGL 4.0) is not available, returns `0`. |
|
|
|
|
* OpenGL calls. If neither @extension{ARB,tessellation_shader} (part |
|
|
|
|
* of OpenGL 4.0) nor @es_extension{ANDROID,extension_pack_es31a}/ |
|
|
|
|
* @es_extension{EXT,tessellation_shader} ES extension is 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 or |
|
|
|
|
* WebGL. |
|
|
|
|
* @requires_gles30 Not defined in OpenGL ES 2.0. |
|
|
|
|
* @requires_gl Tessellation shaders are not available in WebGL. |
|
|
|
|
*/ |
|
|
|
|
static Int maxTessellationControlOutputComponents(); |
|
|
|
|
|
|
|
|
|
@ -156,11 +170,13 @@ 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} (part |
|
|
|
|
* of OpenGL 4.0) is not available, returns `0`. |
|
|
|
|
* OpenGL calls. If neither @extension{ARB,tessellation_shader} (part |
|
|
|
|
* of OpenGL 4.0) nor @es_extension{ANDROID,extension_pack_es31a}/ |
|
|
|
|
* @es_extension{EXT,tessellation_shader} ES extension is 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 or |
|
|
|
|
* WebGL. |
|
|
|
|
* @requires_gles30 Not defined in OpenGL ES 2.0. |
|
|
|
|
* @requires_gl Tessellation shaders are not available in WebGL. |
|
|
|
|
*/ |
|
|
|
|
static Int maxTessellationControlTotalOutputComponents(); |
|
|
|
|
|
|
|
|
|
@ -168,11 +184,13 @@ 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} (part |
|
|
|
|
* of OpenGL 4.0) is not available, returns `0`. |
|
|
|
|
* OpenGL calls. If neither @extension{ARB,tessellation_shader} (part |
|
|
|
|
* of OpenGL 4.0) nor @es_extension{ANDROID,extension_pack_es31a}/ |
|
|
|
|
* @es_extension{EXT,tessellation_shader} ES extension is 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 or |
|
|
|
|
* WebGL. |
|
|
|
|
* @requires_gles30 Not defined in OpenGL ES 2.0. |
|
|
|
|
* @requires_gl Tessellation shaders are not available in WebGL. |
|
|
|
|
*/ |
|
|
|
|
static Int maxTessellationEvaluationInputComponents(); |
|
|
|
|
|
|
|
|
|
@ -180,16 +198,16 @@ 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} (part |
|
|
|
|
* of OpenGL 4.0) is not available, returns `0`. |
|
|
|
|
* OpenGL calls. If neither @extension{ARB,tessellation_shader} (part |
|
|
|
|
* of OpenGL 4.0) nor @es_extension{ANDROID,extension_pack_es31a}/ |
|
|
|
|
* @es_extension{EXT,tessellation_shader} ES extension is 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 or |
|
|
|
|
* WebGL. |
|
|
|
|
* @requires_gles30 Not defined in OpenGL ES 2.0. |
|
|
|
|
* @requires_gl Tessellation shaders are not available in WebGL. |
|
|
|
|
*/ |
|
|
|
|
static Int maxTessellationEvaluationOutputComponents(); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) |
|
|
|
|
/**
|
|
|
|
|
* @brief Max supported component count of geometry shader input vertex |
|
|
|
|
* |
|
|
|
|
|