diff options
Diffstat (limited to 'backends/graphics/opengl/opengl-graphics.h')
-rw-r--r-- | backends/graphics/opengl/opengl-graphics.h | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h index 5a2b1bb373..37ab1f8591 100644 --- a/backends/graphics/opengl/opengl-graphics.h +++ b/backends/graphics/opengl/opengl-graphics.h @@ -41,6 +41,9 @@ namespace OpenGL { #define USE_OSD 1 class Texture; +#if !USE_FORCED_GL && !USE_FORCED_GLES +class Shader; +#endif enum { GFX_LINEAR = 0, @@ -117,9 +120,9 @@ public: protected: /** - * Whether an GLES context is active. + * Whether an GLES or GLES2 context is active. */ - bool isGLESContext() const { return g_context.type == kContextGLES; } + bool isGLESContext() const { return g_context.type == kContextGLES || g_context.type == kContextGLES2; } /** * Set up the actual screen size available for the OpenGL code to do any @@ -300,6 +303,14 @@ private: */ void initializeGLContext(); + /** + * Set color which shall be multiplied with each pixel. + * + * This serves as a wrapper around glColor4f for fixed-function and our + * shader pipeline. + */ + void setColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a); + protected: /** * Query the address of an OpenGL function by name. @@ -518,6 +529,22 @@ private: */ uint _scissorOverride; +#if !USE_FORCED_GL && !USE_FORCED_GLES + // + // Shaders + // + + /** + * Active shader. + */ + Shader *_shader; + + /** + * Projection matrix used. + */ + GLfloat _projectionMatrix[4*4]; +#endif + #ifdef USE_OSD // // OSD |