mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
mesa: Make target_enum_to_index available outside texobj.c
The next patch will use this function in another file. v2: Rename _mesa_target_enum_to_index to _mesa_tex_target_to_index. Suggested by Brian. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
9451281aca
commit
35e7027dab
2 changed files with 6 additions and 3 deletions
|
|
@ -1198,8 +1198,8 @@ _mesa_DeleteTextures( GLsizei n, const GLuint *textures)
|
|||
* Note that proxy targets are not valid here.
|
||||
* \return TEXTURE_x_INDEX or -1 if target is invalid
|
||||
*/
|
||||
static GLint
|
||||
target_enum_to_index(const struct gl_context *ctx, GLenum target)
|
||||
int
|
||||
_mesa_tex_target_to_index(const struct gl_context *ctx, GLenum target)
|
||||
{
|
||||
switch (target) {
|
||||
case GL_TEXTURE_1D:
|
||||
|
|
@ -1270,7 +1270,7 @@ _mesa_BindTexture( GLenum target, GLuint texName )
|
|||
_mesa_debug(ctx, "glBindTexture %s %d\n",
|
||||
_mesa_lookup_enum_by_nr(target), (GLint) texName);
|
||||
|
||||
targetIndex = target_enum_to_index(ctx, target);
|
||||
targetIndex = _mesa_tex_target_to_index(ctx, target);
|
||||
if (targetIndex < 0) {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glBindTexture(target)");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -54,6 +54,9 @@ _mesa_initialize_texture_object( struct gl_context *ctx,
|
|||
struct gl_texture_object *obj,
|
||||
GLuint name, GLenum target );
|
||||
|
||||
extern int
|
||||
_mesa_tex_target_to_index(const struct gl_context *ctx, GLenum target);
|
||||
|
||||
extern void
|
||||
_mesa_delete_texture_object( struct gl_context *ctx,
|
||||
struct gl_texture_object *obj );
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue