summaryrefslogtreecommitdiff
path: root/src/cairo-gl-private.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cairo-gl-private.h')
-rw-r--r--src/cairo-gl-private.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/cairo-gl-private.h b/src/cairo-gl-private.h
index b2d8545ce..f02a58763 100644
--- a/src/cairo-gl-private.h
+++ b/src/cairo-gl-private.h
@@ -60,12 +60,15 @@
#include <assert.h>
-#if CAIRO_HAS_GL_SURFACE
-#include <GL/gl.h>
-#include <GL/glext.h>
+#if CAIRO_HAS_GLESV3_SURFACE
+#include <GLES3/gl3.h>
+#include <GLES3/gl3ext.h>
#elif CAIRO_HAS_GLESV2_SURFACE
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
+#elif CAIRO_HAS_GL_SURFACE
+#include <GL/gl.h>
+#include <GL/glext.h>
#endif
#include "cairo-gl-ext-def-private.h"
@@ -99,11 +102,12 @@
typedef struct _cairo_gl_surface cairo_gl_surface_t;
-/* GL flavor */
+/* GL flavor is the type of GL supported by the underlying platform. */
typedef enum cairo_gl_flavor {
CAIRO_GL_FLAVOR_NONE = 0,
CAIRO_GL_FLAVOR_DESKTOP = 1,
- CAIRO_GL_FLAVOR_ES2 = 2
+ CAIRO_GL_FLAVOR_ES2 = 2,
+ CAIRO_GL_FLAVOR_ES3 = 3
} cairo_gl_flavor_t;
/* Indices for vertex attributes used by BindAttribLocation, etc. */
@@ -169,7 +173,7 @@ struct _cairo_gl_surface {
GLuint fb; /* GL framebuffer object wrapping our data. */
GLuint depth_stencil; /* GL renderbuffer object for holding stencil buffer clip. */
-#if CAIRO_HAS_GL_SURFACE
+#if CAIRO_HAS_GL_SURFACE || CAIRO_HAS_GLESV3_SURFACE
GLuint msaa_rb; /* The ARB MSAA path uses a renderbuffer. */
GLuint msaa_fb;
#endif
@@ -178,8 +182,12 @@ struct _cairo_gl_surface {
cairo_bool_t stencil_and_msaa_caps_initialized;
cairo_bool_t supports_stencil; /* Stencil support for for non-texture surfaces. */
cairo_bool_t supports_msaa;
+ GLint num_samples;
cairo_bool_t msaa_active; /* Whether the multisampling
framebuffer is active or not. */
+ cairo_bool_t content_in_texture; /* whether we just uploaded image
+ to texture, used for certain
+ gles2 extensions and glesv3 */
cairo_clip_t *clip_on_stencil_buffer;
int owns_tex;