REVIEWED: GetTextureData(), allow retrieving 32bit float data
This commit is contained in:
parent
43b9113c0c
commit
5073619962
2 changed files with 2 additions and 2 deletions
|
@ -2944,7 +2944,7 @@ void *rlReadTexturePixels(Texture2D texture)
|
||||||
|
|
||||||
if ((glInternalFormat != -1) && (texture.format < COMPRESSED_DXT1_RGB))
|
if ((glInternalFormat != -1) && (texture.format < COMPRESSED_DXT1_RGB))
|
||||||
{
|
{
|
||||||
pixels = (unsigned char *)RL_MALLOC(size);
|
pixels = RL_MALLOC(size);
|
||||||
glGetTexImage(GL_TEXTURE_2D, 0, glFormat, glType, pixels);
|
glGetTexImage(GL_TEXTURE_2D, 0, glFormat, glType, pixels);
|
||||||
}
|
}
|
||||||
else TRACELOG(LOG_WARNING, "TEXTURE: [ID %i] Data retrieval not suported for pixel format (%i)", texture.id, texture.format);
|
else TRACELOG(LOG_WARNING, "TEXTURE: [ID %i] Data retrieval not suported for pixel format (%i)", texture.id, texture.format);
|
||||||
|
|
|
@ -2835,7 +2835,7 @@ Image GetTextureData(Texture2D texture)
|
||||||
{
|
{
|
||||||
Image image = { 0 };
|
Image image = { 0 };
|
||||||
|
|
||||||
if (texture.format < 8)
|
if (texture.format < COMPRESSED_DXT1_RGB)
|
||||||
{
|
{
|
||||||
image.data = rlReadTexturePixels(texture);
|
image.data = rlReadTexturePixels(texture);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue