diff options
| author | Ray <[email protected]> | 2019-02-04 13:27:36 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2019-02-04 13:27:36 +0100 |
| commit | fce48e85f441215192d188011b48a0f35828e4b3 (patch) | |
| tree | 33f7b761f995993ac7e4a0f8f70c51f26e7f2be9 /src/raylib.h | |
| parent | 5755c5e310e6d77cd280a91d5a99a4f10a4c8ab3 (diff) | |
| download | raylib-fce48e85f441215192d188011b48a0f35828e4b3.tar.gz raylib-fce48e85f441215192d188011b48a0f35828e4b3.zip | |
ADDED: LoadTextureCubemap()
Probably uncomplete, not tested yet...
Diffstat (limited to 'src/raylib.h')
| -rw-r--r-- | src/raylib.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/raylib.h b/src/raylib.h index 55ecbcd5..94c91484 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -222,6 +222,9 @@ typedef struct Texture2D { // Texture type, same as Texture2D typedef Texture2D Texture; +// TextureCubemap type, actually, same as Texture2D +typedef Texture2D TextureCubemap; + // RenderTexture2D type, for texture rendering typedef struct RenderTexture2D { unsigned int id; // OpenGL Framebuffer Object (FBO) id @@ -749,6 +752,16 @@ typedef enum { FILTER_ANISOTROPIC_16X, // Anisotropic filtering 16x } TextureFilterMode; +// Cubemap layout type +typedef enum { + CUBEMAP_AUTO_DETECT = 0, // Automatically detect layout type + CUBEMAP_LINE_VERTICAL, // Layout is defined by a vertical line with faces + CUBEMAP_LINE_HORIZONTAL, // Layout is defined by an horizontal line with faces + CUBEMAP_CROSS_THREE_BY_FOUR, // Layout is defined by a 3x4 cross with cubemap faces + CUBEMAP_CROSS_FOUR_BY_THREE, // Layout is defined by a 4x3 cross with cubemap faces + CUBEMAP_PANORAMA // Layout is defined by a panorama image (equirectangular map) +} CubemapLayoutType; + // Texture parameters: wrap mode typedef enum { WRAP_REPEAT = 0, // Repeats texture in tiled mode @@ -1049,6 +1062,7 @@ RLAPI void ExportImage(Image image, const char *fileName); RLAPI void ExportImageAsCode(Image image, const char *fileName); // Export image as code file defining an array of bytes RLAPI Texture2D LoadTexture(const char *fileName); // Load texture from file into GPU memory (VRAM) RLAPI Texture2D LoadTextureFromImage(Image image); // Load texture from image data +RLAPI TextureCubemap LoadTextureCubemap(Image image, int layoutType); // Load cubemap from image, multiple image cubemap layouts supported RLAPI RenderTexture2D LoadRenderTexture(int width, int height); // Load texture for rendering (framebuffer) RLAPI void UnloadImage(Image image); // Unload image from CPU memory (RAM) RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM) |
