mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-14 04:31:09 +00:00
d85ec2cbb4
If desired, try creating GL_SRGB images. Pass a try_srgb boolean down to the image creation functions and have them attempt to create images like that. When it is not possible to create srgb images in the given format, just fall back to regular images. The calling code is meant to check the GSK_GPU_IMAGE_SRGB flags to determine the actual format of the resulting image.
45 lines
3.0 KiB
C
45 lines
3.0 KiB
C
#pragma once
|
|
|
|
#include "gskgpuimageprivate.h"
|
|
|
|
#include "gskgldeviceprivate.h"
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
#define GSK_TYPE_GL_IMAGE (gsk_gl_image_get_type ())
|
|
|
|
G_DECLARE_FINAL_TYPE (GskGLImage, gsk_gl_image, GSK, GL_IMAGE, GskGpuImage)
|
|
|
|
GskGpuImage * gsk_gl_image_new_backbuffer (GskGLDevice *device,
|
|
GdkGLContext *context,
|
|
GdkMemoryFormat format,
|
|
gboolean is_srgb,
|
|
gsize width,
|
|
gsize height);
|
|
GskGpuImage * gsk_gl_image_new (GskGLDevice *device,
|
|
GdkMemoryFormat format,
|
|
gboolean try_srgb,
|
|
GskGpuImageFlags required_flags,
|
|
gsize width,
|
|
gsize height);
|
|
GskGpuImage * gsk_gl_image_new_for_texture (GskGLDevice *device,
|
|
GdkTexture *owner,
|
|
GLuint tex_id,
|
|
gboolean take_ownership,
|
|
GskGpuImageFlags extra_flags);
|
|
|
|
|
|
void gsk_gl_image_bind_texture (GskGLImage *self);
|
|
void gsk_gl_image_bind_framebuffer (GskGLImage *self);
|
|
void gsk_gl_image_bind_framebuffer_target (GskGLImage *self,
|
|
GLenum target);
|
|
|
|
gboolean gsk_gl_image_is_flipped (GskGLImage *self);
|
|
GLint gsk_gl_image_get_gl_internal_format (GskGLImage *self);
|
|
GLenum gsk_gl_image_get_gl_format (GskGLImage *self);
|
|
GLenum gsk_gl_image_get_gl_type (GskGLImage *self);
|
|
|
|
GLuint gsk_gl_image_steal_texture (GskGLImage *self);
|
|
|
|
G_END_DECLS
|