cogl/gl: Share context_init implementation between GL/GLES

By using GObject features instead of calling the function manually.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4132>
This commit is contained in:
Bilal Elmoussaoui 2024-11-14 09:46:18 +01:00
parent 71381c2e7f
commit ab85aa74eb
3 changed files with 2 additions and 2 deletions

View File

@ -41,6 +41,7 @@ cogl_driver_gl_class_init (CoglDriverGLClass *klass)
{
CoglDriverClass *driver_klass = COGL_DRIVER_CLASS (klass);
driver_klass->context_init = _cogl_driver_gl_context_init;
driver_klass->context_deinit = _cogl_driver_gl_context_deinit;
driver_klass->get_vendor = _cogl_context_get_gl_vendor;
driver_klass->is_hardware_accelerated = _cogl_driver_gl_is_hardware_accelerated;

View File

@ -46,7 +46,7 @@ cogl_driver_gl3_context_init (CoglDriver *driver,
{
GLuint vertex_array;
_cogl_driver_gl_context_init (driver, context);
COGL_DRIVER_CLASS (cogl_driver_gl3_parent_class)->context_init (driver, context);
/* In a forward compatible context, GL 3 doesn't support rendering
* using the default vertex array object. Cogl doesn't use vertex

View File

@ -866,7 +866,6 @@ cogl_driver_gles2_class_init (CoglDriverGLES2Class *klass)
{
CoglDriverClass *driver_klass = COGL_DRIVER_CLASS (klass);
driver_klass->context_init = _cogl_driver_gl_context_init;
driver_klass->pixel_format_to_gl = cogl_driver_gles2_pixel_format_to_gl;
driver_klass->get_read_pixels_format = cogl_driver_gles2_get_read_pixels_format;
driver_klass->update_features = cogl_driver_gles2_update_features;