Browse Source

Fixed compilation of Renderer on OpenGL ES.

pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
cee40d5852
  1. 8
      src/Renderer.cpp
  2. 24
      src/Renderer.h

8
src/Renderer.cpp

@ -41,9 +41,11 @@ void Renderer::setClearColor(const Color4<>& color) {
glClearColor(color.r(), color.g(), color.b(), color.a());
}
#ifndef MAGNUM_TARGET_GLES
void Renderer::setClearDepth(const Double depth) {
glClearDepth(depth);
}
#endif
void Renderer::setClearDepth(const Float depth) {
glClearDepthf(depth);
@ -57,6 +59,7 @@ void Renderer::setFrontFace(const FrontFace mode) {
glFrontFace(GLenum(mode));
}
#ifndef MAGNUM_TARGET_GLES
void Renderer::setProvokingVertex(const ProvokingVertex mode) {
glProvokingVertex(GLenum(mode));
}
@ -64,6 +67,7 @@ void Renderer::setProvokingVertex(const ProvokingVertex mode) {
void Renderer::setPolygonMode(const PolygonMode mode) {
glPolygonMode(GL_FRONT_AND_BACK, GLenum(mode));
}
#endif
void Renderer::setPolygonOffset(const Float factor, const Float units) {
glPolygonOffset(factor, units);
@ -73,9 +77,11 @@ void Renderer::setLineWidth(const Float width) {
glLineWidth(width);
}
#ifndef MAGNUM_TARGET_GLES
void Renderer::setPointSize(const Float size) {
glPointSize(size);
}
#endif
void Renderer::setScissor(const Rectanglei& rectangle) {
glScissor(rectangle.left(), rectangle.bottom(), rectangle.width(), rectangle.height());
@ -137,8 +143,10 @@ void Renderer::setBlendColor(const Color4<>& color) {
glBlendColor(color.r(), color.g(), color.b(), color.a());
}
#ifndef MAGNUM_TARGET_GLES
void Renderer::setLogicOperation(const LogicOperation operation) {
glLogicOp(GLenum(operation));
}
#endif
}

24
src/Renderer.h

@ -75,15 +75,6 @@ class MAGNUM_EXPORT Renderer {
*/
Blending = GL_BLEND,
/**
* Seamless cube map texture.
* @see CubeMapTexture, CubeMapTextureArray
* @requires_gl32 %Extension @extension{ARB,seamless_cube_map}
* @requires_gl Not available in OpenGL ES 2.0, always enabled in
* OpenGL ES 3.0.
*/
SeamlessCubeMapTexture = GL_TEXTURE_CUBE_MAP_SEAMLESS,
#ifndef MAGNUM_TARGET_GLES
/**
* Depth clamping. If enabled, ignores near and far clipping plane.
@ -157,6 +148,7 @@ class MAGNUM_EXPORT Renderer {
PolygonOffsetPoint = GL_POLYGON_OFFSET_POINT,
#endif
#ifndef MAGNUM_TARGET_GLES
/**
* Programmable point size. If enabled, the point size is taken
* from vertex/geometry shader builtin `gl_PointSize`.
@ -164,6 +156,7 @@ class MAGNUM_EXPORT Renderer {
* @requires_gl Always enabled on OpenGL ES.
*/
ProgramPointSize = GL_PROGRAM_POINT_SIZE,
#endif
/**
* Scissor test
@ -171,6 +164,17 @@ class MAGNUM_EXPORT Renderer {
*/
ScissorTest = GL_SCISSOR_TEST,
#ifndef MAGNUM_TARGET_GLES
/**
* Seamless cube map texture.
* @see CubeMapTexture, CubeMapTextureArray
* @requires_gl32 %Extension @extension{ARB,seamless_cube_map}
* @requires_gl Not available in OpenGL ES 2.0, always enabled in
* OpenGL ES 3.0.
*/
SeamlessCubeMapTexture = GL_TEXTURE_CUBE_MAP_SEAMLESS,
#endif
/**
* Stencil test
* @see setClearStencil(), setStencilFunction(),
@ -289,9 +293,7 @@ class MAGNUM_EXPORT Renderer {
* @requires_gl OpenGL ES behaves always like the default.
*/
static void setProvokingVertex(ProvokingVertex mode);
#endif
#ifndef MAGNUM_TARGET_GLES
/**
* @brief Polygon mode
*

Loading…
Cancel
Save