8 // Container for texture objects
13 BC_Texture(int w
, int h
, int colormodel
);
18 // Create a new texture if *texture if 0
19 // or update the existing texture if *texture is
20 // nonzero. The created texture object is stored in *texture.
21 // The texture parameters are stored in the texture manager.
22 // The user must delete *texture when finished with it.
23 // The texture is bound to the current texture unit and enabled.
24 // Must be called from a synchronous opengl thread after enable_opengl.
25 static void new_texture(BC_Texture
**texture
,
30 // Bind the frame's texture to GL_TEXTURE_2D and enable it.
31 // If a texture_unit is supplied, the texture unit is made active
32 // and the commands are run in the right sequence to
33 // initialize it to our preferred specifications.
34 // The texture unit initialization requires the texture to be bound.
35 void bind(int texture_unit
= -1);
37 // Calculate the power of 2 size for allocating textures
38 static int calculate_texture_size(int w
, int *max
= 0);
42 int get_texture_components();
48 // creates a new texture or updates an existing texture to work with the
50 void create_texture(int w
, int h
, int colormodel
);
57 int texture_components
;