forked from AuroraMiddleware/gtk
gl: Move getters for context options to the public API
They can be useful for third party code as well. https://bugzilla.gnome.org/show_bug.cgi?id=741946
This commit is contained in:
parent
f7497daee9
commit
6aaa6c337b
@ -426,19 +426,23 @@ gdk_gl_context_set_debug_enabled (GdkGLContext *context,
|
||||
priv->debug_enabled = enabled;
|
||||
}
|
||||
|
||||
/*< private >
|
||||
/**
|
||||
* gdk_gl_context_get_debug_enabled:
|
||||
* @context: a #GdkGLContext
|
||||
*
|
||||
* Retrieves the value set using gdk_gl_context_set_debug_enabled().
|
||||
*
|
||||
* Returns: %TRUE if debugging is enabled
|
||||
*
|
||||
* Since: 3.16
|
||||
*/
|
||||
gboolean
|
||||
gdk_gl_context_get_debug_enabled (GdkGLContext *context)
|
||||
{
|
||||
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
|
||||
|
||||
g_return_val_if_fail (GDK_IS_GL_CONTEXT (context), FALSE);
|
||||
|
||||
return priv->debug_enabled;
|
||||
}
|
||||
|
||||
@ -472,19 +476,23 @@ gdk_gl_context_set_forward_compatible (GdkGLContext *context,
|
||||
priv->forward_compatible = compatible;
|
||||
}
|
||||
|
||||
/*< private >
|
||||
/**
|
||||
* gdk_gl_context_get_forward_compatible:
|
||||
* @context: a #GdkGLContext
|
||||
*
|
||||
* Retrieves the value set using gdk_gl_context_set_forward_compatible().
|
||||
*
|
||||
* Returns: %TRUE if the context should be forward compatible
|
||||
*
|
||||
* Since: 3.16
|
||||
*/
|
||||
gboolean
|
||||
gdk_gl_context_get_forward_compatible (GdkGLContext *context)
|
||||
{
|
||||
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
|
||||
|
||||
g_return_val_if_fail (GDK_IS_GL_CONTEXT (context), FALSE);
|
||||
|
||||
return priv->forward_compatible;
|
||||
}
|
||||
|
||||
@ -520,7 +528,7 @@ gdk_gl_context_set_required_version (GdkGLContext *context,
|
||||
priv->minor = minor;
|
||||
}
|
||||
|
||||
/*< private >
|
||||
/**
|
||||
* gdk_gl_context_get_required_version:
|
||||
* @context: a #GdkGLContext
|
||||
* @major: (out) (nullable): return location for the major version to request
|
||||
@ -528,6 +536,8 @@ gdk_gl_context_set_required_version (GdkGLContext *context,
|
||||
*
|
||||
* Retrieves the major and minor version requested by calling
|
||||
* gdk_gl_context_set_required_version().
|
||||
*
|
||||
* Since: 3.16
|
||||
*/
|
||||
void
|
||||
gdk_gl_context_get_required_version (GdkGLContext *context,
|
||||
|
@ -56,11 +56,19 @@ void gdk_gl_context_set_required_version (GdkGLContext *
|
||||
int major,
|
||||
int minor);
|
||||
GDK_AVAILABLE_IN_3_16
|
||||
void gdk_gl_context_get_required_version (GdkGLContext *context,
|
||||
int *major,
|
||||
int *minor);
|
||||
GDK_AVAILABLE_IN_3_16
|
||||
void gdk_gl_context_set_debug_enabled (GdkGLContext *context,
|
||||
gboolean enabled);
|
||||
GDK_AVAILABLE_IN_3_16
|
||||
gboolean gdk_gl_context_get_debug_enabled (GdkGLContext *context);
|
||||
GDK_AVAILABLE_IN_3_16
|
||||
void gdk_gl_context_set_forward_compatible (GdkGLContext *context,
|
||||
gboolean compatible);
|
||||
GDK_AVAILABLE_IN_3_16
|
||||
gboolean gdk_gl_context_get_forward_compatible (GdkGLContext *context);
|
||||
|
||||
GDK_AVAILABLE_IN_3_16
|
||||
gboolean gdk_gl_context_realize (GdkGLContext *context,
|
||||
|
@ -74,11 +74,6 @@ typedef struct {
|
||||
GdkGLContextProgram *current_program;
|
||||
} GdkGLContextPaintData;
|
||||
|
||||
void gdk_gl_context_get_required_version (GdkGLContext *context,
|
||||
int *major,
|
||||
int *minor);
|
||||
gboolean gdk_gl_context_get_debug_enabled (GdkGLContext *context);
|
||||
gboolean gdk_gl_context_get_forward_compatible (GdkGLContext *context);
|
||||
GdkGLContextPaintData * gdk_gl_context_get_paint_data (GdkGLContext *context);
|
||||
gboolean gdk_gl_context_use_texture_rectangle (GdkGLContext *context);
|
||||
gboolean gdk_gl_context_has_framebuffer_blit (GdkGLContext *context);
|
||||
|
Loading…
Reference in New Issue
Block a user