Move _cogl_texture_get_gl_format to -texture-gl.c
This moves the _cogl_texture_get_gl_format function from cogl-texture.c to cogl-texture-gl.c and renames it _cogl_texture_gl_get_format. Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit f8deec01eff7d8d9900b509048cf1ff1c86ca879)
This commit is contained in:
parent
a57195d16d
commit
0850eea162
@ -629,7 +629,7 @@ _cogl_atlas_texture_get_gl_format (CoglTexture *tex)
|
|||||||
CoglAtlasTexture *atlas_tex = COGL_ATLAS_TEXTURE (tex);
|
CoglAtlasTexture *atlas_tex = COGL_ATLAS_TEXTURE (tex);
|
||||||
|
|
||||||
/* Forward on to the sub texture */
|
/* Forward on to the sub texture */
|
||||||
return _cogl_texture_get_gl_format (atlas_tex->sub_texture);
|
return _cogl_texture_gl_get_format (atlas_tex->sub_texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -415,7 +415,7 @@ _cogl_sub_texture_get_gl_format (CoglTexture *tex)
|
|||||||
{
|
{
|
||||||
CoglSubTexture *sub_tex = COGL_SUB_TEXTURE (tex);
|
CoglSubTexture *sub_tex = COGL_SUB_TEXTURE (tex);
|
||||||
|
|
||||||
return _cogl_texture_get_gl_format (sub_tex->full_texture);
|
return _cogl_texture_gl_get_format (sub_tex->full_texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -1353,7 +1353,7 @@ _cogl_texture_2d_sliced_get_gl_format (CoglTexture *tex)
|
|||||||
|
|
||||||
/* Pass the call on to the first slice */
|
/* Pass the call on to the first slice */
|
||||||
slice_tex = g_array_index (tex_2ds->slice_textures, CoglTexture2D *, 0);
|
slice_tex = g_array_index (tex_2ds->slice_textures, CoglTexture2D *, 0);
|
||||||
return _cogl_texture_get_gl_format (COGL_TEXTURE (slice_tex));
|
return _cogl_texture_gl_get_format (COGL_TEXTURE (slice_tex));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -208,9 +208,6 @@ CoglTransformResult
|
|||||||
_cogl_texture_transform_quad_coords_to_gl (CoglTexture *texture,
|
_cogl_texture_transform_quad_coords_to_gl (CoglTexture *texture,
|
||||||
float *coords);
|
float *coords);
|
||||||
|
|
||||||
GLenum
|
|
||||||
_cogl_texture_get_gl_format (CoglTexture *texture);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_texture_pre_paint (CoglTexture *texture, CoglTexturePrePaintFlags flags);
|
_cogl_texture_pre_paint (CoglTexture *texture, CoglTexturePrePaintFlags flags);
|
||||||
|
|
||||||
|
@ -418,12 +418,6 @@ _cogl_texture_transform_quad_coords_to_gl (CoglTexture *texture,
|
|||||||
return texture->vtable->transform_quad_coords_to_gl (texture, coords);
|
return texture->vtable->transform_quad_coords_to_gl (texture, coords);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLenum
|
|
||||||
_cogl_texture_get_gl_format (CoglTexture *texture)
|
|
||||||
{
|
|
||||||
return texture->vtable->get_gl_format (texture);
|
|
||||||
}
|
|
||||||
|
|
||||||
CoglBool
|
CoglBool
|
||||||
cogl_texture_get_gl_texture (CoglTexture *texture,
|
cogl_texture_get_gl_texture (CoglTexture *texture,
|
||||||
GLuint *out_gl_handle,
|
GLuint *out_gl_handle,
|
||||||
|
@ -53,4 +53,7 @@ _cogl_texture_gl_maybe_update_max_level (CoglTexture *texture,
|
|||||||
void
|
void
|
||||||
_cogl_texture_gl_generate_mipmaps (CoglTexture *texture);
|
_cogl_texture_gl_generate_mipmaps (CoglTexture *texture);
|
||||||
|
|
||||||
|
GLenum
|
||||||
|
_cogl_texture_gl_get_format (CoglTexture *texture);
|
||||||
|
|
||||||
#endif /* _COGL_TEXTURE_GL_PRIVATE_H_ */
|
#endif /* _COGL_TEXTURE_GL_PRIVATE_H_ */
|
||||||
|
@ -135,3 +135,9 @@ _cogl_texture_gl_generate_mipmaps (CoglTexture *texture)
|
|||||||
_cogl_texture_is_foreign (texture));
|
_cogl_texture_is_foreign (texture));
|
||||||
GE( ctx, glGenerateMipmap (gl_target) );
|
GE( ctx, glGenerateMipmap (gl_target) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GLenum
|
||||||
|
_cogl_texture_gl_get_format (CoglTexture *texture)
|
||||||
|
{
|
||||||
|
return texture->vtable->get_gl_format (texture);
|
||||||
|
}
|
||||||
|
@ -244,7 +244,7 @@ _cogl_texture_driver_upload_subregion_to_gl (CoglContext *ctx,
|
|||||||
*/
|
*/
|
||||||
ctx->glTexImage2D (gl_target,
|
ctx->glTexImage2D (gl_target,
|
||||||
level,
|
level,
|
||||||
_cogl_texture_get_gl_format (texture),
|
_cogl_texture_gl_get_format (texture),
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
0,
|
0,
|
||||||
@ -265,7 +265,7 @@ _cogl_texture_driver_upload_subregion_to_gl (CoglContext *ctx,
|
|||||||
{
|
{
|
||||||
ctx->glTexImage2D (gl_target,
|
ctx->glTexImage2D (gl_target,
|
||||||
level,
|
level,
|
||||||
_cogl_texture_get_gl_format (texture),
|
_cogl_texture_gl_get_format (texture),
|
||||||
level_width,
|
level_width,
|
||||||
level_height,
|
level_height,
|
||||||
0,
|
0,
|
||||||
|
@ -283,7 +283,7 @@ _cogl_texture_driver_upload_subregion_to_gl (CoglContext *ctx,
|
|||||||
*/
|
*/
|
||||||
ctx->glTexImage2D (gl_target,
|
ctx->glTexImage2D (gl_target,
|
||||||
level,
|
level,
|
||||||
_cogl_texture_get_gl_format (texture),
|
_cogl_texture_gl_get_format (texture),
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
0,
|
0,
|
||||||
@ -303,7 +303,7 @@ _cogl_texture_driver_upload_subregion_to_gl (CoglContext *ctx,
|
|||||||
{
|
{
|
||||||
ctx->glTexImage2D (gl_target,
|
ctx->glTexImage2D (gl_target,
|
||||||
level,
|
level,
|
||||||
_cogl_texture_get_gl_format (texture),
|
_cogl_texture_gl_get_format (texture),
|
||||||
level_width,
|
level_width,
|
||||||
level_height,
|
level_height,
|
||||||
0,
|
0,
|
||||||
|
@ -942,7 +942,7 @@ _cogl_texture_pixmap_x11_get_gl_format (CoglTexture *tex)
|
|||||||
CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (tex);
|
CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (tex);
|
||||||
CoglTexture *child_tex = _cogl_texture_pixmap_x11_get_texture (tex_pixmap);
|
CoglTexture *child_tex = _cogl_texture_pixmap_x11_get_texture (tex_pixmap);
|
||||||
|
|
||||||
return _cogl_texture_get_gl_format (child_tex);
|
return _cogl_texture_gl_get_format (child_tex);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
Loading…
Reference in New Issue
Block a user