summaryrefslogtreecommitdiff
path: root/cogl/cogl-texture-2d.c
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2012-09-10 20:35:39 +0100
committerRobert Bragg <robert@linux.intel.com>2013-01-22 17:47:58 +0000
commit8326c71b6b1d4c00b51601651406bdd509c8e79e (patch)
treec6fc503f9a31455b04da7869f23c21aca4dac18d /cogl/cogl-texture-2d.c
parentab72a2275fd3dcee2f93be83d3d8cf6aa8358f9c (diff)
downloadcogl-8326c71b6b1d4c00b51601651406bdd509c8e79e.tar.gz
texture: rename texobj flush code as gl specific
This renames the set_filters and set_wrap_mode_parameters texture virtual functions to gl_flush_legacy_texobj_filters and gl_flush_legacy_texobj_wrap_modes respectively to clarify that they are opengl driver specific and that they are only used to support the legacy opengl apis for setting filters and wrap modes where the state is associated with texture objects instead of being associated with sampler objects. This part of an effort to clearly delimit our abstraction over opengl so that we can start to consider non-opengl backends for Cogl. Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit 6f78b8a613340d7c6b736e51a16c625f52154430)
Diffstat (limited to 'cogl/cogl-texture-2d.c')
-rw-r--r--cogl/cogl-texture-2d.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/cogl/cogl-texture-2d.c b/cogl/cogl-texture-2d.c
index 52ce9ca5..e69b044b 100644
--- a/cogl/cogl-texture-2d.c
+++ b/cogl/cogl-texture-2d.c
@@ -64,10 +64,10 @@ typedef struct _CoglTexture2DManualRepeatData
} CoglTexture2DManualRepeatData;
static void
-_cogl_texture_2d_set_wrap_mode_parameters (CoglTexture *tex,
- GLenum wrap_mode_s,
- GLenum wrap_mode_t,
- GLenum wrap_mode_p)
+_cogl_texture_2d_gl_flush_legacy_texobj_wrap_modes (CoglTexture *tex,
+ GLenum wrap_mode_s,
+ GLenum wrap_mode_t,
+ GLenum wrap_mode_p)
{
CoglTexture2D *tex_2d = COGL_TEXTURE_2D (tex);
CoglContext *ctx = tex->context;
@@ -75,8 +75,8 @@ _cogl_texture_2d_set_wrap_mode_parameters (CoglTexture *tex,
/* Only set the wrap mode if it's different from the current value
to avoid too many GL calls. Texture 2D doesn't make use of the r
coordinate so we can ignore its wrap mode */
- if (tex_2d->wrap_mode_s != wrap_mode_s ||
- tex_2d->wrap_mode_t != wrap_mode_t)
+ if (tex_2d->gl_legacy_texobj_wrap_mode_s != wrap_mode_s ||
+ tex_2d->gl_legacy_texobj_wrap_mode_t != wrap_mode_t)
{
_cogl_bind_gl_texture_transient (GL_TEXTURE_2D,
tex_2d->gl_texture,
@@ -88,8 +88,8 @@ _cogl_texture_2d_set_wrap_mode_parameters (CoglTexture *tex,
GL_TEXTURE_WRAP_T,
wrap_mode_t) );
- tex_2d->wrap_mode_s = wrap_mode_s;
- tex_2d->wrap_mode_t = wrap_mode_t;
+ tex_2d->gl_legacy_texobj_wrap_mode_s = wrap_mode_s;
+ tex_2d->gl_legacy_texobj_wrap_mode_t = wrap_mode_t;
}
}
@@ -165,12 +165,12 @@ _cogl_texture_2d_create_base (CoglContext *ctx,
tex_2d->auto_mipmap = TRUE;
/* We default to GL_LINEAR for both filters */
- tex_2d->min_filter = GL_LINEAR;
- tex_2d->mag_filter = GL_LINEAR;
+ tex_2d->gl_legacy_texobj_min_filter = GL_LINEAR;
+ tex_2d->gl_legacy_texobj_mag_filter = GL_LINEAR;
/* Wrap mode not yet set */
- tex_2d->wrap_mode_s = GL_FALSE;
- tex_2d->wrap_mode_t = GL_FALSE;
+ tex_2d->gl_legacy_texobj_wrap_mode_s = GL_FALSE;
+ tex_2d->gl_legacy_texobj_wrap_mode_t = GL_FALSE;
tex_2d->is_foreign = FALSE;
@@ -481,8 +481,8 @@ cogl_texture_2d_new_from_foreign (CoglContext *ctx,
tex_2d->gl_format = gl_int_format;
/* Unknown filter */
- tex_2d->min_filter = GL_FALSE;
- tex_2d->mag_filter = GL_FALSE;
+ tex_2d->gl_legacy_texobj_min_filter = GL_FALSE;
+ tex_2d->gl_legacy_texobj_mag_filter = GL_FALSE;
return _cogl_texture_2d_object_new (tex_2d);
}
@@ -724,20 +724,20 @@ _cogl_texture_2d_get_gl_texture (CoglTexture *tex,
}
static void
-_cogl_texture_2d_set_filters (CoglTexture *tex,
- GLenum min_filter,
- GLenum mag_filter)
+_cogl_texture_2d_gl_flush_legacy_texobj_filters (CoglTexture *tex,
+ GLenum min_filter,
+ GLenum mag_filter)
{
CoglTexture2D *tex_2d = COGL_TEXTURE_2D (tex);
CoglContext *ctx = tex->context;
- if (min_filter == tex_2d->min_filter
- && mag_filter == tex_2d->mag_filter)
+ if (min_filter == tex_2d->gl_legacy_texobj_min_filter
+ && mag_filter == tex_2d->gl_legacy_texobj_mag_filter)
return;
/* Store new values */
- tex_2d->min_filter = min_filter;
- tex_2d->mag_filter = mag_filter;
+ tex_2d->gl_legacy_texobj_min_filter = min_filter;
+ tex_2d->gl_legacy_texobj_mag_filter = mag_filter;
/* Apply new filters to the texture */
_cogl_bind_gl_texture_transient (GL_TEXTURE_2D,
@@ -934,10 +934,10 @@ cogl_texture_2d_vtable =
_cogl_texture_2d_transform_coords_to_gl,
_cogl_texture_2d_transform_quad_coords_to_gl,
_cogl_texture_2d_get_gl_texture,
- _cogl_texture_2d_set_filters,
+ _cogl_texture_2d_gl_flush_legacy_texobj_filters,
_cogl_texture_2d_pre_paint,
_cogl_texture_2d_ensure_non_quad_rendering,
- _cogl_texture_2d_set_wrap_mode_parameters,
+ _cogl_texture_2d_gl_flush_legacy_texobj_wrap_modes,
_cogl_texture_2d_get_format,
_cogl_texture_2d_get_gl_format,
_cogl_texture_2d_get_width,