summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2020-09-28 00:40:32 +0200
committerRay <[email protected]>2020-09-28 00:40:32 +0200
commita850246030dbd3b33ec71591441c1c5255fe572c (patch)
tree2f0a8c91d9d01845887d5fe045bfd448665c924c /src
parent446f9fff00ec877bf7f599b7082d481dabdc33a9 (diff)
downloadraylib-a850246030dbd3b33ec71591441c1c5255fe572c.tar.gz
raylib-a850246030dbd3b33ec71591441c1c5255fe572c.zip
Review Texture type
Texture type also maps to Texture2D and TextureCubemap
Diffstat (limited to 'src')
-rw-r--r--src/raylib.h24
-rw-r--r--src/rlgl.h14
2 files changed, 19 insertions, 19 deletions
diff --git a/src/raylib.h b/src/raylib.h
index 15ff9554..25e0b817 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -228,31 +228,31 @@ typedef struct Image {
int format; // Data format (PixelFormat type)
} Image;
-// Texture2D type
+// Texture type
// NOTE: Data stored in GPU memory
-typedef struct Texture2D {
+typedef struct Texture {
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 type)
-} Texture2D;
+} Texture;
-// Texture type, same as Texture2D
-typedef Texture2D Texture;
+// Texture2D type, same as Texture
+typedef Texture Texture2D;
-// TextureCubemap type, actually, same as Texture2D
-typedef Texture2D TextureCubemap;
+// TextureCubemap type, actually, same as Texture
+typedef Texture TextureCubemap;
-// RenderTexture2D type, for texture rendering
-typedef struct RenderTexture2D {
+// RenderTexture type, for texture rendering
+typedef struct RenderTexture {
unsigned int id; // OpenGL Framebuffer Object (FBO) id
Texture texture; // Color buffer attachment texture
Texture depth; // Depth buffer attachment texture
-} RenderTexture2D;
+} RenderTexture;
-// RenderTexture type, same as RenderTexture2D
-typedef RenderTexture2D RenderTexture;
+// RenderTexture2D type, same as RenderTexture
+typedef RenderTexture RenderTexture2D;
// N-Patch layout info
typedef struct NPatchInfo {
diff --git a/src/rlgl.h b/src/rlgl.h
index 03f6a0dc..28366fcc 100644
--- a/src/rlgl.h
+++ b/src/rlgl.h
@@ -251,21 +251,21 @@ typedef enum {
float height;
} Rectangle;
- // Texture2D type
+ // Texture type
// NOTE: Data stored in GPU memory
- typedef struct Texture2D {
+ typedef struct Texture {
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)
- } Texture2D;
+ } Texture;
- // Texture type, same as Texture2D
- typedef Texture2D Texture;
+ // Texture2D type, same as Texture
+ typedef Texture Texture2D;
- // TextureCubemap type, actually, same as Texture2D
- typedef Texture2D TextureCubemap;
+ // TextureCubemap type, actually, same as Texture
+ typedef Texture TextureCubemap;
// Vertex data definning a mesh
typedef struct Mesh {