mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-12 22:38:14 +00:00
Review Texture type
Texture type also maps to Texture2D and TextureCubemap
This commit is contained in:
24
src/raylib.h
24
src/raylib.h
@@ -228,31 +228,31 @@ typedef struct Image {
|
|||||||
int format; // Data format (PixelFormat type)
|
int format; // Data format (PixelFormat type)
|
||||||
} Image;
|
} Image;
|
||||||
|
|
||||||
// Texture2D type
|
// Texture type
|
||||||
// NOTE: Data stored in GPU memory
|
// NOTE: Data stored in GPU memory
|
||||||
typedef struct Texture2D {
|
typedef struct Texture {
|
||||||
unsigned int id; // OpenGL texture id
|
unsigned int id; // OpenGL texture id
|
||||||
int width; // Texture base width
|
int width; // Texture base width
|
||||||
int height; // Texture base height
|
int height; // Texture base height
|
||||||
int mipmaps; // Mipmap levels, 1 by default
|
int mipmaps; // Mipmap levels, 1 by default
|
||||||
int format; // Data format (PixelFormat type)
|
int format; // Data format (PixelFormat type)
|
||||||
} Texture2D;
|
} Texture;
|
||||||
|
|
||||||
// Texture type, same as Texture2D
|
// Texture2D type, same as Texture
|
||||||
typedef Texture2D Texture;
|
typedef Texture Texture2D;
|
||||||
|
|
||||||
// TextureCubemap type, actually, same as Texture2D
|
// TextureCubemap type, actually, same as Texture
|
||||||
typedef Texture2D TextureCubemap;
|
typedef Texture TextureCubemap;
|
||||||
|
|
||||||
// RenderTexture2D type, for texture rendering
|
// RenderTexture type, for texture rendering
|
||||||
typedef struct RenderTexture2D {
|
typedef struct RenderTexture {
|
||||||
unsigned int id; // OpenGL Framebuffer Object (FBO) id
|
unsigned int id; // OpenGL Framebuffer Object (FBO) id
|
||||||
Texture texture; // Color buffer attachment texture
|
Texture texture; // Color buffer attachment texture
|
||||||
Texture depth; // Depth buffer attachment texture
|
Texture depth; // Depth buffer attachment texture
|
||||||
} RenderTexture2D;
|
} RenderTexture;
|
||||||
|
|
||||||
// RenderTexture type, same as RenderTexture2D
|
// RenderTexture2D type, same as RenderTexture
|
||||||
typedef RenderTexture2D RenderTexture;
|
typedef RenderTexture RenderTexture2D;
|
||||||
|
|
||||||
// N-Patch layout info
|
// N-Patch layout info
|
||||||
typedef struct NPatchInfo {
|
typedef struct NPatchInfo {
|
||||||
|
14
src/rlgl.h
14
src/rlgl.h
@@ -251,21 +251,21 @@ typedef enum {
|
|||||||
float height;
|
float height;
|
||||||
} Rectangle;
|
} Rectangle;
|
||||||
|
|
||||||
// Texture2D type
|
// Texture type
|
||||||
// NOTE: Data stored in GPU memory
|
// NOTE: Data stored in GPU memory
|
||||||
typedef struct Texture2D {
|
typedef struct Texture {
|
||||||
unsigned int id; // OpenGL texture id
|
unsigned int id; // OpenGL texture id
|
||||||
int width; // Texture base width
|
int width; // Texture base width
|
||||||
int height; // Texture base height
|
int height; // Texture base height
|
||||||
int mipmaps; // Mipmap levels, 1 by default
|
int mipmaps; // Mipmap levels, 1 by default
|
||||||
int format; // Data format (PixelFormat)
|
int format; // Data format (PixelFormat)
|
||||||
} Texture2D;
|
} Texture;
|
||||||
|
|
||||||
// Texture type, same as Texture2D
|
// Texture2D type, same as Texture
|
||||||
typedef Texture2D Texture;
|
typedef Texture Texture2D;
|
||||||
|
|
||||||
// TextureCubemap type, actually, same as Texture2D
|
// TextureCubemap type, actually, same as Texture
|
||||||
typedef Texture2D TextureCubemap;
|
typedef Texture TextureCubemap;
|
||||||
|
|
||||||
// Vertex data definning a mesh
|
// Vertex data definning a mesh
|
||||||
typedef struct Mesh {
|
typedef struct Mesh {
|
||||||
|
Reference in New Issue
Block a user