diff options
author | Robert Bragg <robert@linux.intel.com> | 2010-04-26 10:01:43 +0100 |
---|---|---|
committer | Robert Bragg <robert@linux.intel.com> | 2010-06-09 17:26:15 +0100 |
commit | 82e80e67650ac8ec119f2d909423ab5b707206a7 (patch) | |
tree | 490b42e0021fcacb09ffc1b00091c6946c60e5e0 /cogl/cogl-texture-private.h | |
parent | acc44161c108dafef63d730b585b4f68b935f6ad (diff) |
material: Avoid redundant glBindTexture calls
This adds a _cogl_bind_gl_texture_transient function that should be used
instead of glBindTexture so we can have a consistent cache of the
textures bound to each texture unit so we can avoid some redundant
binding.
Diffstat (limited to 'cogl/cogl-texture-private.h')
-rw-r--r-- | cogl/cogl-texture-private.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cogl/cogl-texture-private.h b/cogl/cogl-texture-private.h index 0f97233e..74ffe033 100644 --- a/cogl/cogl-texture-private.h +++ b/cogl/cogl-texture-private.h @@ -118,6 +118,8 @@ struct _CoglTextureVtable GLenum (* get_gl_format) (CoglTexture *tex); int (* get_width) (CoglTexture *tex); int (* get_height) (CoglTexture *tex); + + gboolean (* is_foreign) (CoglTexture *tex); }; struct _CoglTexture @@ -126,6 +128,20 @@ struct _CoglTexture const CoglTextureVtable *vtable; }; +typedef enum _CoglTextureChangeFlags +{ + /* Whenever the internals of a texture are changed such that the + * underlying GL textures that represent the CoglTexture change then + * we notify cogl-material.c via + * _cogl_material_texture_pre_change_notify + */ + COGL_TEXTURE_CHANGE_GL_TEXTURES + +} CoglTextureChangeFlags; + +void +_cogl_texture_free (CoglTexture *texture); + void _cogl_texture_foreach_sub_texture_in_region (CoglHandle handle, float virtual_tx_1, @@ -215,4 +231,7 @@ _cogl_texture_draw_and_read (CoglHandle handle, GLuint target_gl_format, GLuint target_gl_type); +gboolean +_cogl_texture_is_foreign (CoglHandle handle); + #endif /* __COGL_TEXTURE_PRIVATE_H */ |