gl context: Check for more GL extensions

These will be used in future commits.
This commit is contained in:
Matthias Clasen
2023-10-15 19:27:04 -04:00
parent 463307655c
commit b8b5835fc6
2 changed files with 13 additions and 0 deletions

View File

@@ -110,6 +110,7 @@ typedef struct {
guint has_unpack_subimage : 1;
guint has_debug_output : 1;
guint has_bgra : 1;
guint has_image_storage : 1;
guint extensions_checked : 1;
guint debug_enabled : 1;
guint forward_compatible : 1;
@@ -1558,6 +1559,8 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
epoxy_has_gl_extension ("GL_ARB_sync") ||
epoxy_has_gl_extension ("GL_APPLE_sync");
priv->has_image_storage = epoxy_has_gl_extension ("GL_EXT_EGL_image_storage");
#ifdef G_ENABLE_DEBUG
{
int max_texture_size;
@@ -1897,6 +1900,14 @@ gdk_gl_context_has_vertex_arrays (GdkGLContext *self)
}
}
gboolean
gdk_gl_context_has_image_storage (GdkGLContext *self)
{
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (self);
return priv->has_image_storage;
}
/* This is currently private! */
/* When using GL/ES, don't flip the 'R' and 'B' bits on Windows/ANGLE for glReadPixels() */
gboolean

View File

@@ -161,6 +161,8 @@ gboolean gdk_gl_context_has_bgra (GdkGLContext
gboolean gdk_gl_context_has_vertex_arrays (GdkGLContext *self) G_GNUC_PURE;
gboolean gdk_gl_context_has_image_storage (GdkGLContext *self) G_GNUC_PURE;
double gdk_gl_context_get_scale (GdkGLContext *self);
G_END_DECLS