aboutsummaryrefslogtreecommitdiff
path: root/src/textures.c
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2018-01-06 18:17:38 +0100
committerraysan5 <raysan5@gmail.com>2018-01-06 18:17:38 +0100
commitb97134c3e157f241cef485b34b8fb0e09575e7bc (patch)
tree04f2219c2f8c9aafe71ad942cb77797cd5f3a066 /src/textures.c
parent7caa3201d51a04b739122ffadac476493bd05395 (diff)
downloadraylib-b97134c3e157f241cef485b34b8fb0e09575e7bc.tar.gz
raylib-b97134c3e157f241cef485b34b8fb0e09575e7bc.zip
Review float pixel format textures support
Diffstat (limited to 'src/textures.c')
-rw-r--r--src/textures.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/textures.c b/src/textures.c
index 7ea54c2c..fe75bd74 100644
--- a/src/textures.c
+++ b/src/textures.c
@@ -417,6 +417,7 @@ void UnloadRenderTexture(RenderTexture2D target)
}
// Get pixel data from image in the form of Color struct array
+// TODO: Support float pixel data retrieval
Color *GetImageData(Image image)
{
Color *pixels = (Color *)malloc(image.width*image.height*sizeof(Color));
@@ -719,7 +720,7 @@ void ImageFormat(Image *image, int newFormat)
case UNCOMPRESSED_R32:
{
image->data = (float *)malloc(image->width*image->height*sizeof(float));
-
+
for (int i = 0; i < image->width*image->height; i++)
{
((float *)image->data)[i] = (float)((float)pixels[i].r*0.299f/255.0f + (float)pixels[i].g*0.587f/255.0f + (float)pixels[i].b*0.114f/255.0f);