Merge: doc -> main

This commit is contained in:
PedroEdiaz
2024-10-02 13:10:08 -06:00
parent 3c9690a2a7
commit d22daff16d
17 changed files with 363 additions and 163 deletions

View File

@@ -3,9 +3,9 @@
#define TYPE GL_TEXTURE_2D_ARRAY
unsigned int config_texture( unsigned short type )
id_t config_texture( unsigned short type )
{
unsigned int texture;
id_t texture;
glGenTextures( 1, &texture );
glBindTexture( TYPE, texture );
@@ -18,7 +18,7 @@ unsigned int config_texture( unsigned short type )
return texture;
}
void use_texture( unsigned int texture )
void use_texture( id_t texture )
{
return glBindTexture( TYPE, texture );
}
@@ -28,9 +28,9 @@ void destroy_texture( unsigned int texture )
return glDeleteTextures( 1, &texture );
}
unsigned int create_palette_texture( const unsigned char * colors )
id_t create_palette_texture( const unsigned char * colors )
{
unsigned int texture = config_texture( TYPE );
id_t texture = config_texture( TYPE );
glTexImage3D( TYPE, 0, GL_RGBA,
1, 1, (*colors)/4, 0, GL_RGBA, GL_UNSIGNED_BYTE, colors+1);
return texture;