Browse Source

Updates for geometry and tessellation shader support in ES 3.2.

Turns out the new primitive formats were not enabled for AEP by
accident. Fixed that now.
pull/231/head
Vladimír Vondruš 9 years ago
parent
commit
0ab51c1abc
  1. 13
      src/Magnum/Framebuffer.cpp
  2. 13
      src/Magnum/Framebuffer.h
  3. 12
      src/Magnum/Implementation/FramebufferState.cpp
  4. 12
      src/Magnum/Mesh.cpp
  5. 30
      src/Magnum/Mesh.h
  6. 2
      src/Magnum/PrimitiveQuery.h
  7. 106
      src/Magnum/Shader.cpp
  8. 74
      src/Magnum/Shader.h

13
src/Magnum/Framebuffer.cpp

@ -379,13 +379,14 @@ void Framebuffer::textureCubeMapImplementationDSA(const BufferAttachment attachm
#if !defined(MAGNUM_TARGET_WEBGL) && !defined(MAGNUM_TARGET_GLES2)
void Framebuffer::textureImplementationDefault(BufferAttachment attachment, GLuint textureId, GLint mipLevel) {
#ifndef MAGNUM_TARGET_GLES
glFramebufferTexture
#else
glFramebufferTextureEXT
#endif
(GLenum(bindInternal()), GLenum(attachment), textureId, mipLevel);
glFramebufferTexture(GLenum(bindInternal()), GLenum(attachment), textureId, mipLevel);
}
#ifdef MAGNUM_TARGET_GLES
void Framebuffer::textureImplementationEXT(BufferAttachment attachment, GLuint textureId, GLint mipLevel) {
glFramebufferTextureEXT(GLenum(bindInternal()), GLenum(attachment), textureId, mipLevel);
}
#endif
#endif
#ifndef MAGNUM_TARGET_GLES

13
src/Magnum/Framebuffer.h

@ -812,7 +812,7 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje
* @fn_gl_keyword{FramebufferTexture}
* @requires_gl32 Extension @extension{ARB,geometry_shader4}
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_es_extension Extension @extension{ANDROID,extension_pack_es31a}/
* @requires_gles32 Extension @extension{ANDROID,extension_pack_es31a} /
* @extension{EXT,geometry_shader}
* @requires_gles Geometry shaders are not available in WebGL.
*/
@ -830,7 +830,7 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje
/** @overload
* @requires_gl32 Extension @extension{ARB,geometry_shader4}
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_es_extension Extension @extension{ANDROID,extension_pack_es31a}/
* @requires_gles32 Extension @extension{ANDROID,extension_pack_es31a} /
* @extension{EXT,geometry_shader}
* @requires_gles Geometry shaders are not available in WebGL.
*/
@ -840,7 +840,7 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje
* @overload
* @requires_gl32 Extension @extension{ARB,geometry_shader4}
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_es_extension Extension @extension{ANDROID,extension_pack_es31a}/
* @requires_gles32 Extension @extension{ANDROID,extension_pack_es31a} /
* @extension{EXT,geometry_shader}
* @requires_gles Geometry shaders are not available in WebGL.
*/
@ -849,7 +849,7 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje
/** @overload
* @requires_gl40 Extension @extension{ARB,texture_cube_map_array}
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_es_extension Extension @extension{ANDROID,extension_pack_es31a}/
* @requires_gles32 Extension @extension{ANDROID,extension_pack_es31a} /
* @extension{EXT,geometry_shader} and
* @extension{EXT,texture_cube_map_array}
* @requires_gles Geometry shaders are not available in WebGL.
@ -860,7 +860,7 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje
* @requires_gl32 Extension @extension{ARB,geometry_shader4} and
* @extension{ARB,texture_multisample}
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_es_extension Extension @extension{ANDROID,extension_pack_es31a}/
* @requires_gles32 Extension @extension{ANDROID,extension_pack_es31a} /
* @extension{EXT,geometry_shader} and
* @extension{OES,texture_storage_multisample_2d_array}
* @requires_gles Geometry shaders are not available in WebGL.
@ -944,6 +944,9 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje
#if !defined(MAGNUM_TARGET_WEBGL) && !defined(MAGNUM_TARGET_GLES2)
void MAGNUM_LOCAL textureImplementationDefault(BufferAttachment attachment, GLuint textureId, GLint level);
#ifdef MAGNUM_TARGET_GLES
void MAGNUM_LOCAL textureImplementationEXT(BufferAttachment attachment, GLuint textureId, GLint level);
#endif
#endif
#ifndef MAGNUM_TARGET_GLES
void MAGNUM_LOCAL textureImplementationDSA(BufferAttachment attachment, GLuint textureId, GLint level);

12
src/Magnum/Implementation/FramebufferState.cpp

@ -157,7 +157,7 @@ FramebufferState::FramebufferState(Context& context, std::vector<std::string>& e
#endif
/* The default implementation is the same for both 2D and cube map textures */
texture2DImplementation = &Framebuffer::texture2DImplementationDefault;
#if !defined(MAGNUM_TARGET_WEBGL) && !defined(MAGNUM_TARGET_GLES2)
#ifndef MAGNUM_TARGET_GLES
textureImplementation = &Framebuffer::textureImplementationDefault;
#endif
textureCubeMapImplementation = &Framebuffer::texture2DImplementationDefault;
@ -168,6 +168,16 @@ FramebufferState::FramebufferState(Context& context, std::vector<std::string>& e
renderbufferStorageImplementation = &Renderbuffer::storageImplementationDefault;
}
/* Framebuffer texture attachment on ES3 */
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL) && !defined(MAGNUM_TARGET_GLES2)
if(context.isVersionSupported(Version::GLES320))
textureImplementation = &Framebuffer::textureImplementationDefault;
else if(context.isExtensionSupported<Extensions::GL::EXT::geometry_shader>())
textureImplementation = &Framebuffer::textureImplementationEXT;
else
textureImplementation = nullptr;
#endif
#ifdef MAGNUM_TARGET_GLES2
/* Framebuffer binding and checking on ES2 */
/* Optimistically set separate binding targets and check if one of the

12
src/Magnum/Mesh.cpp

@ -635,14 +635,14 @@ Debug& operator<<(Debug& debug, MeshPrimitive value) {
_c(LineStrip)
_c(LineLoop)
_c(Lines)
#ifndef MAGNUM_TARGET_GLES
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
_c(LineStripAdjacency)
_c(LinesAdjacency)
#endif
_c(TriangleStrip)
_c(TriangleFan)
_c(Triangles)
#ifndef MAGNUM_TARGET_GLES
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
_c(TriangleStripAdjacency)
_c(TrianglesAdjacency)
_c(Patches)
@ -680,14 +680,14 @@ std::string ConfigurationValue<Magnum::MeshPrimitive>::toString(Magnum::MeshPrim
_c(LineStrip)
_c(LineLoop)
_c(Lines)
#ifndef MAGNUM_TARGET_GLES
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
_c(LineStripAdjacency)
_c(LinesAdjacency)
#endif
_c(TriangleStrip)
_c(TriangleFan)
_c(Triangles)
#ifndef MAGNUM_TARGET_GLES
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
_c(TriangleStripAdjacency)
_c(TrianglesAdjacency)
_c(Patches)
@ -703,14 +703,14 @@ Magnum::MeshPrimitive ConfigurationValue<Magnum::MeshPrimitive>::fromString(cons
_c(LineStrip)
_c(LineLoop)
_c(Lines)
#ifndef MAGNUM_TARGET_GLES
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
_c(LineStripAdjacency)
_c(LinesAdjacency)
#endif
_c(TriangleStrip)
_c(TriangleFan)
_c(Triangles)
#ifndef MAGNUM_TARGET_GLES
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
_c(TriangleStripAdjacency)
_c(TrianglesAdjacency)
_c(Patches)

30
src/Magnum/Mesh.h

@ -64,18 +64,24 @@ enum class MeshPrimitive: GLenum {
*/
Lines = GL_LINES,
#ifndef MAGNUM_TARGET_GLES
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
/**
* Line strip with adjacency information.
* @requires_gl32 Extension @extension{ARB,geometry_shader4}
* @requires_gl Geometry shaders are not available in OpenGL ES or WebGL.
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_gles32 Extension @extension{ANDROID,extension_pack_es31a} /
* @extension{EXT,geometry_shader}
* @requires_gles Geometry shaders are not available in WebGL.
*/
LineStripAdjacency = GL_LINE_STRIP_ADJACENCY,
/**
* Lines with adjacency information.
* @requires_gl32 Extension @extension{ARB,geometry_shader4}
* @requires_gl Geometry shaders are not available in OpenGL ES or WebGL.
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_gles32 Extension @extension{ANDROID,extension_pack_es31a} /
* @extension{EXT,geometry_shader}
* @requires_gles Geometry shaders are not available in WebGL.
*/
LinesAdjacency = GL_LINES_ADJACENCY,
#endif
@ -95,26 +101,34 @@ enum class MeshPrimitive: GLenum {
/** Each three vertices define one triangle. */
Triangles = GL_TRIANGLES,
#ifndef MAGNUM_TARGET_GLES
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
/**
* Triangle strip with adjacency information.
* @requires_gl32 Extension @extension{ARB,geometry_shader4}
* @requires_gl Geometry shaders are not available in OpenGL ES or WebGL.
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_gles32 Extension @extension{ANDROID,extension_pack_es31a} /
* @extension{EXT,geometry_shader}
* @requires_gles Geometry shaders are not available in WebGL.
*/
TriangleStripAdjacency = GL_TRIANGLE_STRIP_ADJACENCY,
/**
* Triangles with adjacency information.
* @requires_gl32 Extension @extension{ARB,geometry_shader4}
* @requires_gl Geometry shaders are not available in OpenGL ES or WebGL.
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_gles32 Extension @extension{ANDROID,extension_pack_es31a} /
* @extension{EXT,geometry_shader}
* @requires_gles Geometry shaders are not available in WebGL.
*/
TrianglesAdjacency = GL_TRIANGLES_ADJACENCY,
/**
* Patches.
* @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_gles32 Extension @extension{ANDROID,extension_pack_es31a} /
* @extension{EXT,tessellation_shader}
* @requires_gles Tessellation shaders are not available in WebGL.
*/
Patches = GL_PATCHES
#endif

2
src/Magnum/PrimitiveQuery.h

@ -79,7 +79,7 @@ class MAGNUM_EXPORT PrimitiveQuery: public AbstractQuery {
* @ref result<UnsignedInt>() or @ref result<Int>() to retrieve the
* result.
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_es_extension Extension @extension{ANDROID,extension_pack_es31a}/
* @requires_gles32 Extension @extension{ANDROID,extension_pack_es31a} /
* @extension{EXT,geometry_shader}
* @requires_gles Geometry shaders are not available in WebGL.
*/

106
src/Magnum/Shader.cpp

@ -153,13 +153,8 @@ Int Shader::maxTessellationControlInputComponents() {
GLint& value = Context::current().state().shader->maxTessellationControlInputComponents;
/* Get the value, if not already cached */
if(value == 0) glGetIntegerv(
#ifndef MAGNUM_TARGET_GLES
GL_MAX_TESS_CONTROL_INPUT_COMPONENTS,
#else
GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_EXT,
#endif
&value);
if(value == 0)
glGetIntegerv(GL_MAX_TESS_CONTROL_INPUT_COMPONENTS, &value);
return value;
}
@ -176,13 +171,8 @@ Int Shader::maxTessellationControlOutputComponents() {
GLint& value = Context::current().state().shader->maxTessellationControlOutputComponents;
/* Get the value, if not already cached */
if(value == 0) glGetIntegerv(
#ifndef MAGNUM_TARGET_GLES
GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS,
#else
GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_EXT,
#endif
&value);
if(value == 0)
glGetIntegerv(GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS, &value);
return value;
}
@ -199,13 +189,8 @@ Int Shader::maxTessellationControlTotalOutputComponents() {
GLint& value = Context::current().state().shader->maxTessellationControlTotalOutputComponents;
/* Get the value, if not already cached */
if(value == 0) glGetIntegerv(
#ifndef MAGNUM_TARGET_GLES
GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS,
#else
GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_EXT,
#endif
&value);
if(value == 0)
glGetIntegerv(GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS, &value);
return value;
}
@ -222,13 +207,8 @@ Int Shader::maxTessellationEvaluationInputComponents() {
GLint& value = Context::current().state().shader->maxTessellationEvaluationInputComponents;
/* Get the value, if not already cached */
if(value == 0) glGetIntegerv(
#ifndef MAGNUM_TARGET_GLES
GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS,
#else
GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_EXT,
#endif
&value);
if(value == 0)
glGetIntegerv(GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS, &value);
return value;
}
@ -245,13 +225,8 @@ Int Shader::maxTessellationEvaluationOutputComponents() {
GLint& value = Context::current().state().shader->maxTessellationEvaluationOutputComponents;
/* Get the value, if not already cached */
if(value == 0) glGetIntegerv(
#ifndef MAGNUM_TARGET_GLES
GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS,
#else
GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_EXT,
#endif
&value);
if(value == 0)
glGetIntegerv(GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS, &value);
return value;
}
@ -269,13 +244,8 @@ Int Shader::maxGeometryInputComponents() {
/* Get the value, if not already cached */
/** @todo The extension has only `GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB`, this is supported since GL 3.2 (wtf?) */
if(value == 0) glGetIntegerv(
#ifndef MAGNUM_TARGET_GLES
GL_MAX_GEOMETRY_INPUT_COMPONENTS,
#else
GL_MAX_GEOMETRY_INPUT_COMPONENTS_EXT,
#endif
&value);
if(value == 0)
glGetIntegerv(GL_MAX_GEOMETRY_INPUT_COMPONENTS, &value);
return value;
}
@ -293,13 +263,8 @@ Int Shader::maxGeometryOutputComponents() {
/* Get the value, if not already cached */
/** @todo The extension has only `GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB`, this is supported since GL 3.2 (wtf?) */
if(value == 0) glGetIntegerv(
#ifndef MAGNUM_TARGET_GLES
GL_MAX_GEOMETRY_OUTPUT_COMPONENTS,
#else
GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_EXT,
#endif
&value);
if(value == 0)
glGetIntegerv(GL_MAX_GEOMETRY_OUTPUT_COMPONENTS, &value);
return value;
}
@ -316,13 +281,8 @@ Int Shader::maxGeometryTotalOutputComponents() {
GLint& value = Context::current().state().shader->maxGeometryTotalOutputComponents;
/* Get the value, if not already cached */
if(value == 0) glGetIntegerv(
#ifndef MAGNUM_TARGET_GLES
GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS,
#else
GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT,
#endif
&value);
if(value == 0)
glGetIntegerv(GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS, &value);
return value;
}
@ -370,13 +330,9 @@ Int Shader::maxAtomicCounterBuffers(const Type type) {
GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS,
GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS,
GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS,
#ifndef MAGNUM_TARGET_GLES
GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS,
GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS,
GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS
#else
GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_EXT
#endif
};
if(value == 0)
glGetIntegerv(what[index], &value);
@ -421,13 +377,9 @@ Int Shader::maxAtomicCounters(const Type type) {
GL_MAX_VERTEX_ATOMIC_COUNTERS,
GL_MAX_FRAGMENT_ATOMIC_COUNTERS,
GL_MAX_COMPUTE_ATOMIC_COUNTERS,
#ifndef MAGNUM_TARGET_GLES
GL_MAX_GEOMETRY_ATOMIC_COUNTERS,
GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS,
GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS,
#else
GL_MAX_GEOMETRY_ATOMIC_COUNTERS_EXT
#endif
GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS
};
if(value == 0)
glGetIntegerv(what[index], &value);
@ -472,13 +424,9 @@ Int Shader::maxImageUniforms(const Type type) {
GL_MAX_VERTEX_IMAGE_UNIFORMS,
GL_MAX_FRAGMENT_IMAGE_UNIFORMS,
GL_MAX_COMPUTE_IMAGE_UNIFORMS,
#ifndef MAGNUM_TARGET_GLES
GL_MAX_GEOMETRY_IMAGE_UNIFORMS,
GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS,
GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS
#else
GL_MAX_GEOMETRY_IMAGE_UNIFORMS_EXT
#endif
};
if(value == 0)
glGetIntegerv(what[index], &value);
@ -523,13 +471,9 @@ Int Shader::maxShaderStorageBlocks(const Type type) {
GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS,
GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS,
GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS,
#ifndef MAGNUM_TARGET_GLES
GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS,
GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS,
GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS
#else
GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_EXT
#endif
};
if(value == 0)
glGetIntegerv(what[index], &value);
@ -568,13 +512,9 @@ Int Shader::maxTextureImageUnits(const Type type) {
GL_MAX_TEXTURE_IMAGE_UNITS,
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS,
#endif
#ifndef MAGNUM_TARGET_GLES
GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS,
GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS,
GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS
#elif !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT
#endif
};
if(value == 0)
@ -611,13 +551,9 @@ Int Shader::maxUniformBlocks(const Type type) {
GL_MAX_FRAGMENT_UNIFORM_BLOCKS,
#ifndef MAGNUM_TARGET_WEBGL
GL_MAX_COMPUTE_UNIFORM_BLOCKS,
#endif
#ifndef MAGNUM_TARGET_GLES
GL_MAX_GEOMETRY_UNIFORM_BLOCKS,
GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS,
GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS
#elif !defined(MAGNUM_TARGET_WEBGL)
GL_MAX_GEOMETRY_UNIFORM_BLOCKS_EXT
#endif
};
if(value == 0)
@ -656,13 +592,9 @@ Int Shader::maxUniformComponents(const Type type) {
GL_MAX_FRAGMENT_UNIFORM_COMPONENTS,
#ifndef MAGNUM_TARGET_WEBGL
GL_MAX_COMPUTE_UNIFORM_COMPONENTS,
#endif
#ifndef MAGNUM_TARGET_GLES
GL_MAX_GEOMETRY_UNIFORM_COMPONENTS,
GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS,
GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS
#elif !defined(MAGNUM_TARGET_WEBGL)
GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT
#endif
};
if(value == 0)
@ -701,13 +633,9 @@ Int Shader::maxCombinedUniformComponents(const Type type) {
GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS,
#ifndef MAGNUM_TARGET_WEBGL
GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS,
#endif
#ifndef MAGNUM_TARGET_GLES
GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS,
GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS,
GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS
#elif !defined(MAGNUM_TARGET_WEBGL)
GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_EXT,
#endif
};
if(value == 0)

74
src/Magnum/Shader.h

@ -73,43 +73,31 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
* Tessellation control shader
* @requires_gl40 Extension @extension{ARB,tessellation_shader}
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_es_extension Extension @extension{ANDROID,extension_pack_es31a}/
* @requires_gles32 Extension @extension{ANDROID,extension_pack_es31a} /
* @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_gles30 Not defined in OpenGL ES 2.0.
* @requires_es_extension Extension @extension{ANDROID,extension_pack_es31a}/
* @requires_gles32 Extension @extension{ANDROID,extension_pack_es31a} /
* @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
/**
* Geometry shader
* @requires_gl32 Extension @extension{ARB,geometry_shader4}
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_es_extension Extension @extension{ANDROID,extension_pack_es31a}/
* @requires_gles32 Extension @extension{ANDROID,extension_pack_es31a} /
* @extension{EXT,geometry_shader}
* @requires_gles Geometry shaders are not available in WebGL.
*/
#ifndef MAGNUM_TARGET_GLES
Geometry = GL_GEOMETRY_SHADER,
#else
Geometry = GL_GEOMETRY_SHADER_EXT,
#endif
/**
* Compute shader
@ -144,12 +132,12 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
*
* The result is cached, repeated queries don't result in repeated
* OpenGL calls. If neither @extension{ARB,tessellation_shader} (part
* of OpenGL 4.0) nor @extension{ANDROID,extension_pack_es31a}/
* of OpenGL 4.0) nor @extension{ANDROID,extension_pack_es31a} /
* @extension{EXT,tessellation_shader} ES extension is available,
* returns @cpp 0 @ce.
* @see @fn_gl{Get} with @def_gl_keyword{MAX_TESS_CONTROL_INPUT_COMPONENTS}
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_gl Tessellation shaders are not available in WebGL.
* @requires_gles Tessellation shaders are not available in WebGL.
*/
static Int maxTessellationControlInputComponents();
@ -158,12 +146,12 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
*
* The result is cached, repeated queries don't result in repeated
* OpenGL calls. If neither @extension{ARB,tessellation_shader} (part
* of OpenGL 4.0) nor @extension{ANDROID,extension_pack_es31a}/
* @extension{EXT,tessellation_shader} ES extension is available,
* returns @cpp 0 @ce.
* of OpenGL 4.0) nor @extension{ANDROID,extension_pack_es31a} /
* @extension{EXT,tessellation_shader} (part of OpenGL ES 3.2) is
* available, returns @cpp 0 @ce.
* @see @fn_gl{Get} with @def_gl_keyword{MAX_TESS_CONTROL_OUTPUT_COMPONENTS}
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_gl Tessellation shaders are not available in WebGL.
* @requires_gles Tessellation shaders are not available in WebGL.
*/
static Int maxTessellationControlOutputComponents();
@ -172,12 +160,12 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
*
* The result is cached, repeated queries don't result in repeated
* OpenGL calls. If neither @extension{ARB,tessellation_shader} (part
* of OpenGL 4.0) nor @extension{ANDROID,extension_pack_es31a}/
* @extension{EXT,tessellation_shader} ES extension is available,
* returns @cpp 0 @ce.
* of OpenGL 4.0) nor @extension{ANDROID,extension_pack_es31a} /
* @extension{EXT,tessellation_shader} (part of OpenGL ES 3.2) is
* available, returns @cpp 0 @ce.
* @see @fn_gl{Get} with @def_gl_keyword{MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS}
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_gl Tessellation shaders are not available in WebGL.
* @requires_gles Tessellation shaders are not available in WebGL.
*/
static Int maxTessellationControlTotalOutputComponents();
@ -186,12 +174,12 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
*
* The result is cached, repeated queries don't result in repeated
* OpenGL calls. If neither @extension{ARB,tessellation_shader} (part
* of OpenGL 4.0) nor @extension{ANDROID,extension_pack_es31a}/
* @extension{EXT,tessellation_shader} ES extension is available,
* returns @cpp 0 @ce.
* of OpenGL 4.0) nor @extension{ANDROID,extension_pack_es31a} /
* @extension{EXT,tessellation_shader} (part of OpenGL ES 3.2) is
* available, returns @cpp 0 @ce.
* @see @fn_gl{Get} with @def_gl_keyword{MAX_TESS_EVALUATION_INPUT_COMPONENTS}
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_gl Tessellation shaders are not available in WebGL.
* @requires_gles Tessellation shaders are not available in WebGL.
*/
static Int maxTessellationEvaluationInputComponents();
@ -200,12 +188,12 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
*
* The result is cached, repeated queries don't result in repeated
* OpenGL calls. If neither @extension{ARB,tessellation_shader} (part
* of OpenGL 4.0) nor @extension{ANDROID,extension_pack_es31a}/
* @extension{EXT,tessellation_shader} ES extension is available,
* returns @cpp 0 @ce.
* @see @fn_gl{Get} with @def_gl_keyword{MAX_TESS_EVALUATION_OUTPUT_COMPONENTS}
* of OpenGL 4.0) nor @extension{ANDROID,extension_pack_es31a} /
* @extension{EXT,tessellation_shader} (part of OpenGL ES 3.2) is
* available, returns @cpp 0 @ce.
* @see @fn_gl{Get} with @def_gl{MAX_TESS_EVALUATION_OUTPUT_COMPONENTS}
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_gl Tessellation shaders are not available in WebGL.
* @requires_gles Tessellation shaders are not available in WebGL.
*/
static Int maxTessellationEvaluationOutputComponents();
@ -214,9 +202,9 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
*
* The result is cached, repeated queries don't result in repeated
* OpenGL calls. If neither @extension{ARB,geometry_shader4} (part of
* OpenGL 3.2) nor @extension{ANDROID,extension_pack_es31a}/
* @extension{EXT,geometry_shader} ES extension is not available,
* returns @cpp 0 @ce.
* OpenGL 3.2) nor @extension{ANDROID,extension_pack_es31a} /
* @extension{EXT,geometry_shader} (part of OpenGL ES 3.2) is not
* available, returns @cpp 0 @ce.
* @see @fn_gl{Get} with @def_gl_keyword{MAX_GEOMETRY_INPUT_COMPONENTS}
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_gles Geometry shaders are not available in WebGL.
@ -228,9 +216,9 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
*
* The result is cached, repeated queries don't result in repeated
* OpenGL calls. If neither @extension{ARB,geometry_shader4} (part of
* OpenGL 3.2) nor @extension{ANDROID,extension_pack_es31a}/
* @extension{EXT,geometry_shader} ES extension is not available,
* returns @cpp 0 @ce.
* OpenGL 3.2) nor @extension{ANDROID,extension_pack_es31a} /
* @extension{EXT,geometry_shader} (part of OpenGL ES 3.2) is not
* available, returns @cpp 0 @ce.
* @see @fn_gl{Get} with @def_gl_keyword{MAX_GEOMETRY_OUTPUT_COMPONENTS}
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_gles Geometry shaders are not available in WebGL.
@ -242,9 +230,9 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
*
* The result is cached, repeated queries don't result in repeated
* OpenGL calls. If neither @extension{ARB,geometry_shader4} (part of
* OpenGL 3.2) nor @extension{ANDROID,extension_pack_es31a}/
* @extension{EXT,geometry_shader} ES extension is not available,
* returns @cpp 0 @ce.
* OpenGL 3.2) nor @extension{ANDROID,extension_pack_es31a} /
* @extension{EXT,geometry_shader} (part of OpenGL ES 3.2) is not
* available, returns @cpp 0 @ce.
* @see @fn_gl{Get} with @def_gl_keyword{MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS}
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_gles Geometry shaders are not available in WebGL.

Loading…
Cancel
Save