Tweak to avoid compilation warning
This commit is contained in:
parent
4663cc03f3
commit
e6d304cdc2
@ -2056,9 +2056,10 @@ unsigned int rlLoadTextureDepth(int width, int height, int bits, bool useRenderB
|
|||||||
unsigned int rlLoadTextureCubemap(void *data, int size, int format)
|
unsigned int rlLoadTextureCubemap(void *data, int size, int format)
|
||||||
{
|
{
|
||||||
unsigned int cubemapId = 0;
|
unsigned int cubemapId = 0;
|
||||||
unsigned int dataSize = GetPixelDataSize(size, size, format);
|
|
||||||
|
|
||||||
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
|
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
|
||||||
|
unsigned int dataSize = GetPixelDataSize(size, size, format);
|
||||||
|
|
||||||
glGenTextures(1, &cubemapId);
|
glGenTextures(1, &cubemapId);
|
||||||
glBindTexture(GL_TEXTURE_CUBE_MAP, cubemapId);
|
glBindTexture(GL_TEXTURE_CUBE_MAP, cubemapId);
|
||||||
|
|
||||||
@ -2071,9 +2072,8 @@ unsigned int rlLoadTextureCubemap(void *data, int size, int format)
|
|||||||
for (unsigned int i = 0; i < 6; i++)
|
for (unsigned int i = 0; i < 6; i++)
|
||||||
{
|
{
|
||||||
if (format < COMPRESSED_DXT1_RGB) glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glInternalFormat, size, size, 0, glFormat, glType, (unsigned char *)data + i*dataSize);
|
if (format < COMPRESSED_DXT1_RGB) glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glInternalFormat, size, size, 0, glFormat, glType, (unsigned char *)data + i*dataSize);
|
||||||
#if !defined(GRAPHICS_API_OPENGL_11)
|
|
||||||
else glCompressedTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glInternalFormat, size, size, 0, dataSize, (unsigned char *)data + i*dataSize);
|
else glCompressedTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glInternalFormat, size, size, 0, dataSize, (unsigned char *)data + i*dataSize);
|
||||||
#endif
|
|
||||||
#if defined(GRAPHICS_API_OPENGL_33)
|
#if defined(GRAPHICS_API_OPENGL_33)
|
||||||
if (format == UNCOMPRESSED_GRAYSCALE)
|
if (format == UNCOMPRESSED_GRAYSCALE)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user