summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2021-04-06 00:43:38 +0200
committerRay <[email protected]>2021-04-06 00:43:38 +0200
commit802ca161d378a0a4f9d191138d2cbc7c93345836 (patch)
tree0dd03376326bfbb5ef52170859014022434a721e /src
parenta8dd4127f37c52cbd166eecf23a068b3687c1bb1 (diff)
downloadraylib-802ca161d378a0a4f9d191138d2cbc7c93345836.tar.gz
raylib-802ca161d378a0a4f9d191138d2cbc7c93345836.zip
REVIEWED: Some rlgl cleaning on unused types
Diffstat (limited to 'src')
-rw-r--r--src/rlgl.h40
1 files changed, 4 insertions, 36 deletions
diff --git a/src/rlgl.h b/src/rlgl.h
index 6f78ed52..e1160afb 100644
--- a/src/rlgl.h
+++ b/src/rlgl.h
@@ -309,29 +309,15 @@ typedef enum {
unsigned char a;
} Color;
- // Rectangle type
- typedef struct Rectangle {
- float x;
- float y;
- float width;
- float height;
- } Rectangle;
-
// Texture type
// NOTE: Data stored in GPU memory
- typedef struct Texture {
+ typedef struct Texture2D {
unsigned int id; // OpenGL texture id
int width; // Texture base width
int height; // Texture base height
int mipmaps; // Mipmap levels, 1 by default
int format; // Data format (PixelFormat)
- } Texture;
-
- // Texture2D type, same as Texture
- typedef Texture Texture2D;
-
- // TextureCubemap type, actually, same as Texture
- typedef Texture TextureCubemap;
+ } Texture2D;
// Shader type (generic)
typedef struct Shader {
@@ -451,24 +437,6 @@ typedef enum {
SHADER_UNIFORM_IVEC4,
SHADER_UNIFORM_SAMPLER2D
} ShaderUniformDataType;
-
- // Material map type
- typedef enum {
- MATERIAL_MAP_ALBEDO = 0, // MATERIAL_MAP_DIFFUSE
- MATERIAL_MAP_METALNESS = 1, // MATERIAL_MAP_SPECULAR
- MATERIAL_MAP_NORMAL = 2,
- MATERIAL_MAP_ROUGHNESS = 3,
- MATERIAL_MAP_OCCLUSION,
- MATERIAL_MAP_EMISSION,
- MATERIAL_MAP_HEIGHT,
- MATERIAL_MAP_CUBEMAP, // NOTE: Uses GL_TEXTURE_CUBE_MAP
- MATERIAL_MAP_IRRADIANCE, // NOTE: Uses GL_TEXTURE_CUBE_MAP
- MATERIAL_MAP_PREFILTER, // NOTE: Uses GL_TEXTURE_CUBE_MAP
- MATERIAL_MAP_BRDG
- } MaterialMapIndex;
-
- #define MATERIAL_MAP_DIFFUSE MATERIAL_MAP_ALBEDO
- #define MATERIAL_MAP_SPECULAR MATERIAL_MAP_METALNESS
#endif
#if defined(__cplusplus)
@@ -906,7 +874,7 @@ static void rlUnloadShaderDefault(void); // Unload default shader (RLGL.State
#endif // GRAPHICS_API_OPENGL_33 || GRAPHICS_API_OPENGL_ES2
#if defined(GRAPHICS_API_OPENGL_11)
static int rlGenerateMipmapsData(unsigned char *data, int baseWidth, int baseHeight); // Generate mipmaps data on CPU side
-static Color *rlGenNextMipmapData(Color *srcData, int srcWidth, int srcHeight); // Geenrate next mipmap level on CPU side
+static Color *rlGenNextMipmapData(Color *srcData, int srcWidth, int srcHeight); // Generate next mipmap level on CPU side
#endif
static int rlGetPixelDataSize(int width, int height, int format); // Get pixel data size in bytes (image or texture)
@@ -3938,7 +3906,7 @@ static Color *rlGenNextMipmapData(Color *srcData, int srcWidth, int srcHeight)
return mipmap;
}
-#endif
+#endif // GRAPHICS_API_OPENGL_11
// Get pixel data size in bytes (image or texture)
// NOTE: Size depends on pixel format