#define TEXTOBJ_H
-#include "mtypes.h"
+#include "compiler.h"
+#include "glheader.h"
+struct gl_context;
/**
* \name Internal functions
GLuint name, GLenum target );
extern void
-_mesa_delete_texture_object( struct gl_context *ctx, struct gl_texture_object *obj );
+_mesa_delete_texture_object( struct gl_context *ctx,
+ struct gl_texture_object *obj );
extern void
_mesa_copy_texture_object( struct gl_texture_object *dest,
const struct gl_texture_object *src );
extern void
-_mesa_clear_texture_object(struct gl_context *ctx, struct gl_texture_object *obj);
+_mesa_clear_texture_object(struct gl_context *ctx,
+ struct gl_texture_object *obj);
extern void
+_mesa_reference_texobj_(struct gl_texture_object **ptr,
+ struct gl_texture_object *tex);
+
+static inline void
_mesa_reference_texobj(struct gl_texture_object **ptr,
- struct gl_texture_object *tex);
+ struct gl_texture_object *tex)
+{
+ if (*ptr != tex)
+ _mesa_reference_texobj_(ptr, tex);
+}
+
extern void
_mesa_test_texobj_completeness( const struct gl_context *ctx,
struct gl_texture_object *obj );
+extern GLboolean
+_mesa_cube_complete(const struct gl_texture_object *texObj);
+
extern void
_mesa_dirty_texobj(struct gl_context *ctx, struct gl_texture_object *texObj,
GLboolean invalidate_state);