Add gdk_gl_context_has_framebuffer_blit()
This checks if the context supports GL_EXT_framebuffer_blit
This commit is contained in:
parent
5f9e6ec2dc
commit
21189b9f7e
@ -86,6 +86,7 @@ typedef struct {
|
|||||||
|
|
||||||
guint realized : 1;
|
guint realized : 1;
|
||||||
guint use_texture_rectangle : 1;
|
guint use_texture_rectangle : 1;
|
||||||
|
guint has_gl_framebuffer_blit : 1;
|
||||||
|
|
||||||
GdkGLContextPaintData *paint_data;
|
GdkGLContextPaintData *paint_data;
|
||||||
} GdkGLContextPrivate;
|
} GdkGLContextPrivate;
|
||||||
@ -350,6 +351,14 @@ gdk_gl_context_use_texture_rectangle (GdkGLContext *context)
|
|||||||
return priv->use_texture_rectangle;
|
return priv->use_texture_rectangle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gdk_gl_context_has_framebuffer_blit (GdkGLContext *context)
|
||||||
|
{
|
||||||
|
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
|
||||||
|
|
||||||
|
return priv->has_gl_framebuffer_blit;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gdk_gl_context_realize (GdkGLContext *context)
|
gdk_gl_context_realize (GdkGLContext *context)
|
||||||
{
|
{
|
||||||
@ -359,6 +368,8 @@ gdk_gl_context_realize (GdkGLContext *context)
|
|||||||
has_npot = epoxy_has_gl_extension ("GL_ARB_texture_non_power_of_two");
|
has_npot = epoxy_has_gl_extension ("GL_ARB_texture_non_power_of_two");
|
||||||
has_texture_rectangle = epoxy_has_gl_extension ("GL_ARB_texture_rectangle");
|
has_texture_rectangle = epoxy_has_gl_extension ("GL_ARB_texture_rectangle");
|
||||||
|
|
||||||
|
priv->has_gl_framebuffer_blit = epoxy_has_gl_extension ("GL_EXT_framebuffer_blit");
|
||||||
|
|
||||||
if (_gdk_gl_flags & GDK_GL_FLAGS_TEXTURE_RECTANGLE)
|
if (_gdk_gl_flags & GDK_GL_FLAGS_TEXTURE_RECTANGLE)
|
||||||
priv->use_texture_rectangle = TRUE;
|
priv->use_texture_rectangle = TRUE;
|
||||||
else if (has_npot)
|
else if (has_npot)
|
||||||
|
@ -49,13 +49,6 @@ struct _GdkGLContextClass
|
|||||||
cairo_region_t *region);
|
cairo_region_t *region);
|
||||||
};
|
};
|
||||||
|
|
||||||
gboolean gdk_gl_context_use_texture_rectangle (GdkGLContext *context);
|
|
||||||
void gdk_gl_context_end_frame (GdkGLContext *context,
|
|
||||||
cairo_region_t *painted,
|
|
||||||
cairo_region_t *damage);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
guint vertex_array_object;
|
guint vertex_array_object;
|
||||||
guint tmp_framebuffer;
|
guint tmp_framebuffer;
|
||||||
@ -73,7 +66,11 @@ typedef struct {
|
|||||||
} GdkGLContextPaintData;
|
} GdkGLContextPaintData;
|
||||||
|
|
||||||
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_has_framebuffer_blit (GdkGLContext *context);
|
||||||
|
void gdk_gl_context_end_frame (GdkGLContext *context,
|
||||||
|
cairo_region_t *painted,
|
||||||
|
cairo_region_t *damage);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user