aboutsummaryrefslogtreecommitdiff
path: root/src/textures.c
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2015-03-01 16:00:52 +0100
committerraysan5 <raysan5@gmail.com>2015-03-01 16:00:52 +0100
commitc062f8d4fe3b600ea63a7a7f783963cf3d6aca84 (patch)
treebe3e4eb5e73c66a3bc26cc5b8c3c2da07afdbf2c /src/textures.c
parentee4b553c2a7bb0784b53583988c60e023f340220 (diff)
downloadraylib-c062f8d4fe3b600ea63a7a7f783963cf3d6aca84.tar.gz
raylib-c062f8d4fe3b600ea63a7a7f783963cf3d6aca84.zip
Redesign shader system and more
Shader system has been completely redesigned Added support for multiple texture color modes
Diffstat (limited to 'src/textures.c')
-rw-r--r--src/textures.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/textures.c b/src/textures.c
index 768ead78..c56816e0 100644
--- a/src/textures.c
+++ b/src/textures.c
@@ -306,7 +306,7 @@ Texture2D LoadTexture(const char *fileName)
if (image.compFormat == 0)
{
- texture.id = rlglLoadTexture(image.data, image.width, image.height, false);
+ texture.id = rlglLoadTexture(image.data, image.width, image.height, R8G8B8A8, false);
}
else
{
@@ -352,6 +352,8 @@ Texture2D LoadTexture(const char *fileName)
return texture;
}
+// TODO: Texture2D LoadTextureEx(const char *imageData, int width, int height, int colorMode)
+
// Load a texture from image data
// NOTE: image is not unloaded, it must be done manually
Texture2D LoadTextureFromImage(Image image, bool genMipmaps)
@@ -380,7 +382,7 @@ Texture2D LoadTextureFromImage(Image image, bool genMipmaps)
}
// NOTE: rlglLoadTexture() can generate mipmaps (POT image required)
- texture.id = rlglLoadTexture(imgData, image.width, image.height, genMipmaps);
+ texture.id = rlglLoadTexture(imgData, image.width, image.height, R8G8B8A8, genMipmaps);
texture.width = image.width;
texture.height = image.height;