Skip to content

Commit e6d304c

Browse files
committed
Tweak to avoid compilation warning
1 parent 4663cc0 commit e6d304c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/rlgl.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2056,9 +2056,10 @@ unsigned int rlLoadTextureDepth(int width, int height, int bits, bool useRenderB
20562056
unsigned int rlLoadTextureCubemap(void *data, int size, int format)
20572057
{
20582058
unsigned int cubemapId = 0;
2059-
unsigned int dataSize = GetPixelDataSize(size, size, format);
20602059

20612060
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
2061+
unsigned int dataSize = GetPixelDataSize(size, size, format);
2062+
20622063
glGenTextures(1, &cubemapId);
20632064
glBindTexture(GL_TEXTURE_CUBE_MAP, cubemapId);
20642065

@@ -2071,9 +2072,8 @@ unsigned int rlLoadTextureCubemap(void *data, int size, int format)
20712072
for (unsigned int i = 0; i < 6; i++)
20722073
{
20732074
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);
2074-
#if !defined(GRAPHICS_API_OPENGL_11)
20752075
else glCompressedTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glInternalFormat, size, size, 0, dataSize, (unsigned char *)data + i*dataSize);
2076-
#endif
2076+
20772077
#if defined(GRAPHICS_API_OPENGL_33)
20782078
if (format == UNCOMPRESSED_GRAYSCALE)
20792079
{

0 commit comments

Comments
 (0)