mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
cogl-texture-2d-sliced: Use the other backends for the slices
Instead of directly manipulating GL textures itself, CoglTexture2DSliced now works in terms of CoglHandles. It creates the texture slices using cogl_texture_new_with_size which should always end up creating a CoglTexture2D because the size should fit. This allows us to avoid replicating some code such as the first pixel mipmap tracking and it better enforces the separation that each texture backend is the only place that contains code dealing with each texture target.
This commit is contained in:
parent
61f2f1c024
commit
d5634e37a2
@ -38,29 +38,11 @@ struct _CoglTexture2DSliced
|
||||
CoglTexture _parent;
|
||||
GArray *slice_x_spans;
|
||||
GArray *slice_y_spans;
|
||||
GArray *slice_gl_handles;
|
||||
GArray *slice_textures;
|
||||
int max_waste;
|
||||
|
||||
/* The internal format of the GL texture represented as a
|
||||
CoglPixelFormat */
|
||||
CoglPixelFormat format;
|
||||
/* The internal format of the GL texture represented as a GL enum */
|
||||
GLenum gl_format;
|
||||
GLenum gl_target;
|
||||
int width;
|
||||
int height;
|
||||
GLenum min_filter;
|
||||
GLenum mag_filter;
|
||||
gboolean is_foreign;
|
||||
GLenum wrap_mode_s;
|
||||
GLenum wrap_mode_t;
|
||||
gboolean auto_mipmap;
|
||||
gboolean mipmaps_dirty;
|
||||
|
||||
/* This holds a copy of the first pixel in each slice. It is only
|
||||
used to force an automatic update of the mipmaps when
|
||||
glGenerateMipmap is not available. */
|
||||
CoglTexturePixel *first_pixels;
|
||||
};
|
||||
|
||||
GQuark
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user