cogl: Add a slot for driver-private state to CoglContext

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1194
This commit is contained in:
Adam Jackson 2020-04-09 13:06:28 -04:00
parent 4ff58cc63f
commit e03c75bac7
3 changed files with 13 additions and 0 deletions

View File

@ -73,6 +73,8 @@ struct _CoglContext
const CoglDriverVtable *driver_vtable; const CoglDriverVtable *driver_vtable;
const CoglTextureDriver *texture_driver; const CoglTextureDriver *texture_driver;
void *driver_context;
int glsl_major; int glsl_major;
int glsl_minor; int glsl_minor;

View File

@ -76,6 +76,11 @@ _cogl_gl_error_to_string (GLenum error_code);
#endif /* COGL_GL_DEBUG */ #endif /* COGL_GL_DEBUG */
typedef struct _CoglGLContext CoglGLContext; /* opaque for the moment */
CoglGLContext *
_cogl_driver_gl_context (CoglContext *context);
gboolean gboolean
_cogl_driver_gl_context_init (CoglContext *context); _cogl_driver_gl_context_init (CoglContext *context);

View File

@ -75,6 +75,12 @@ _cogl_gl_error_to_string (GLenum error_code)
} }
#endif /* COGL_GL_DEBUG */ #endif /* COGL_GL_DEBUG */
CoglGLContext *
_cogl_driver_gl_context (CoglContext *context)
{
return context->driver_context;
}
gboolean gboolean
_cogl_driver_gl_context_init (CoglContext *context) _cogl_driver_gl_context_init (CoglContext *context)
{ {