From f5f1b6eba0d409abcda2a3c037a177d6f6e41a2e Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 4 Jan 2016 06:41:10 +0100 Subject: OPENGL: Introduce pipeline abstraction to cleanup code. --- backends/graphics/opengl/opengl-sys.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'backends/graphics/opengl/opengl-sys.h') diff --git a/backends/graphics/opengl/opengl-sys.h b/backends/graphics/opengl/opengl-sys.h index a584259abe..f68897ba58 100644 --- a/backends/graphics/opengl/opengl-sys.h +++ b/backends/graphics/opengl/opengl-sys.h @@ -87,6 +87,8 @@ enum ContextType { kContextGLES2 }; +class Pipeline; + /** * Description structure of the OpenGL (ES) context. */ @@ -126,20 +128,18 @@ struct Context { // programmable pipelines in the same fashion. // - /** - * Initializes the pipeline state. - */ - void initializePipeline(); - - /** - * Set color which shall be multiplied with each pixel. - */ - void setColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a); + /** Currently active rendering pipeline. */ + Pipeline *activePipeline; /** - * Set vertex and texture coordinates. + * Set new pipeline. + * + * Client is responsible for any memory management related to pipelines. + * + * @param pipeline Pipeline to activate. + * @return Formerly active pipeline. */ - void setDrawCoordinates(const GLfloat *vertices, const GLfloat *texCoords); + Pipeline *setPipeline(Pipeline *pipeline); }; /** -- cgit v1.2.3