#include "samplerobj.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/**
* \name Internal functions
*/
extern struct gl_texture_object *
_mesa_lookup_texture(struct gl_context *ctx, GLuint id);
+extern struct gl_texture_object *
+_mesa_lookup_texture_err(struct gl_context *ctx, GLuint id, const char* func);
+
+extern void
+_mesa_begin_texture_lookups(struct gl_context *ctx);
+
+extern void
+_mesa_end_texture_lookups(struct gl_context *ctx);
+
+extern struct gl_texture_object *
+_mesa_lookup_texture_locked(struct gl_context *ctx, GLuint id);
+
+extern struct gl_texture_object *
+_mesa_get_current_tex_object(struct gl_context *ctx, GLenum target);
+
extern struct gl_texture_object *
_mesa_new_texture_object( struct gl_context *ctx, GLuint name, GLenum target );
_mesa_reference_texobj_(ptr, tex);
}
+/**
+ * Lock a texture for updating. See also _mesa_lock_context_textures().
+ */
+static inline void
+_mesa_lock_texture(struct gl_context *ctx, struct gl_texture_object *texObj)
+{
+ mtx_lock(&ctx->Shared->TexMutex);
+ ctx->Shared->TextureStateStamp++;
+ (void) texObj;
+}
+
+static inline void
+_mesa_unlock_texture(struct gl_context *ctx, struct gl_texture_object *texObj)
+{
+ (void) texObj;
+ mtx_unlock(&ctx->Shared->TexMutex);
+}
+
/**
* Return number of faces for a texture target. This will be 6 for
_mesa_test_texobj_completeness( const struct gl_context *ctx,
struct gl_texture_object *obj );
+extern GLboolean
+_mesa_cube_level_complete(const struct gl_texture_object *texObj,
+ const GLint level);
+
extern GLboolean
_mesa_cube_complete(const struct gl_texture_object *texObj);
extern GLuint
_mesa_total_texture_memory(struct gl_context *ctx);
+extern GLenum
+_mesa_texture_base_format(const struct gl_texture_object *texObj);
+
extern void
_mesa_unlock_context_textures( struct gl_context *ctx );
extern void
_mesa_lock_context_textures( struct gl_context *ctx );
+extern struct gl_texture_object *
+_mesa_create_nameless_texture(struct gl_context *ctx, GLenum target);
+
+extern void
+_mesa_delete_nameless_texture(struct gl_context *ctx,
+ struct gl_texture_object *texObj);
+
+extern void
+_mesa_bind_texture_unit(struct gl_context *ctx,
+ GLuint unit,
+ struct gl_texture_object *texObj);
+
/*@}*/
/**
/*@{*/
extern void GLAPIENTRY
-_mesa_GenTextures( GLsizei n, GLuint *textures );
+_mesa_GenTextures(GLsizei n, GLuint *textures);
+extern void GLAPIENTRY
+_mesa_CreateTextures(GLenum target, GLsizei n, GLuint *textures);
extern void GLAPIENTRY
_mesa_DeleteTextures( GLsizei n, const GLuint *textures );
extern void GLAPIENTRY
_mesa_BindTexture( GLenum target, GLuint texture );
+extern void GLAPIENTRY
+_mesa_BindTextureUnit(GLuint unit, GLuint texture);
extern void GLAPIENTRY
_mesa_BindTextures( GLuint first, GLsizei count, const GLuint *textures );
/*@}*/
+#ifdef __cplusplus
+}
+#endif
+
+
#endif