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:
@ -426,19 +426,23 @@ gdk_gl_context_set_debug_enabled (GdkGLContext *context,
|
|||||||
priv->debug_enabled = enabled;
|
priv->debug_enabled = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*< private >
|
/**
|
||||||
* gdk_gl_context_get_debug_enabled:
|
* gdk_gl_context_get_debug_enabled:
|
||||||
* @context: a #GdkGLContext
|
* @context: a #GdkGLContext
|
||||||
*
|
*
|
||||||
* Retrieves the value set using gdk_gl_context_set_debug_enabled().
|
* Retrieves the value set using gdk_gl_context_set_debug_enabled().
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if debugging is enabled
|
* Returns: %TRUE if debugging is enabled
|
||||||
|
*
|
||||||
|
* Since: 3.16
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gdk_gl_context_get_debug_enabled (GdkGLContext *context)
|
gdk_gl_context_get_debug_enabled (GdkGLContext *context)
|
||||||
{
|
{
|
||||||
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (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;
|
return priv->debug_enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -472,19 +476,23 @@ gdk_gl_context_set_forward_compatible (GdkGLContext *context,
|
|||||||
priv->forward_compatible = compatible;
|
priv->forward_compatible = compatible;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*< private >
|
/**
|
||||||
* gdk_gl_context_get_forward_compatible:
|
* gdk_gl_context_get_forward_compatible:
|
||||||
* @context: a #GdkGLContext
|
* @context: a #GdkGLContext
|
||||||
*
|
*
|
||||||
* Retrieves the value set using gdk_gl_context_set_forward_compatible().
|
* Retrieves the value set using gdk_gl_context_set_forward_compatible().
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if the context should be forward compatible
|
* Returns: %TRUE if the context should be forward compatible
|
||||||
|
*
|
||||||
|
* Since: 3.16
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gdk_gl_context_get_forward_compatible (GdkGLContext *context)
|
gdk_gl_context_get_forward_compatible (GdkGLContext *context)
|
||||||
{
|
{
|
||||||
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (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;
|
return priv->forward_compatible;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -520,7 +528,7 @@ gdk_gl_context_set_required_version (GdkGLContext *context,
|
|||||||
priv->minor = minor;
|
priv->minor = minor;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*< private >
|
/**
|
||||||
* gdk_gl_context_get_required_version:
|
* gdk_gl_context_get_required_version:
|
||||||
* @context: a #GdkGLContext
|
* @context: a #GdkGLContext
|
||||||
* @major: (out) (nullable): return location for the major version to request
|
* @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
|
* Retrieves the major and minor version requested by calling
|
||||||
* gdk_gl_context_set_required_version().
|
* gdk_gl_context_set_required_version().
|
||||||
|
*
|
||||||
|
* Since: 3.16
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gdk_gl_context_get_required_version (GdkGLContext *context,
|
gdk_gl_context_get_required_version (GdkGLContext *context,
|
||||||
|
@ -56,11 +56,19 @@ void gdk_gl_context_set_required_version (GdkGLContext *
|
|||||||
int major,
|
int major,
|
||||||
int minor);
|
int minor);
|
||||||
GDK_AVAILABLE_IN_3_16
|
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,
|
void gdk_gl_context_set_debug_enabled (GdkGLContext *context,
|
||||||
gboolean enabled);
|
gboolean enabled);
|
||||||
GDK_AVAILABLE_IN_3_16
|
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,
|
void gdk_gl_context_set_forward_compatible (GdkGLContext *context,
|
||||||
gboolean compatible);
|
gboolean compatible);
|
||||||
|
GDK_AVAILABLE_IN_3_16
|
||||||
|
gboolean gdk_gl_context_get_forward_compatible (GdkGLContext *context);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_3_16
|
GDK_AVAILABLE_IN_3_16
|
||||||
gboolean gdk_gl_context_realize (GdkGLContext *context,
|
gboolean gdk_gl_context_realize (GdkGLContext *context,
|
||||||
|
@ -74,11 +74,6 @@ typedef struct {
|
|||||||
GdkGLContextProgram *current_program;
|
GdkGLContextProgram *current_program;
|
||||||
} GdkGLContextPaintData;
|
} 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);
|
GdkGLContextPaintData * gdk_gl_context_get_paint_data (GdkGLContext *context);
|
||||||
gboolean gdk_gl_context_use_texture_rectangle (GdkGLContext *context);
|
gboolean gdk_gl_context_use_texture_rectangle (GdkGLContext *context);
|
||||||
gboolean gdk_gl_context_has_framebuffer_blit (GdkGLContext *context);
|
gboolean gdk_gl_context_has_framebuffer_blit (GdkGLContext *context);
|
||||||
|
Reference in New Issue
Block a user