mirror of https://github.com/bjornbytes/lovr.git
Scope a variable better;
This commit is contained in:
parent
1d6b7619ea
commit
45648baa1c
|
@ -1665,7 +1665,6 @@ void lovrTextureAllocate(Texture* texture, uint32_t width, uint32_t height, uint
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLenum glFormat = convertTextureFormat(format);
|
|
||||||
GLenum internalFormat = convertTextureFormatInternal(format, texture->srgb);
|
GLenum internalFormat = convertTextureFormatInternal(format, texture->srgb);
|
||||||
#ifdef LOVR_GL
|
#ifdef LOVR_GL
|
||||||
if (GLAD_GL_ARB_texture_storage) {
|
if (GLAD_GL_ARB_texture_storage) {
|
||||||
|
@ -1677,6 +1676,7 @@ void lovrTextureAllocate(Texture* texture, uint32_t width, uint32_t height, uint
|
||||||
}
|
}
|
||||||
#ifdef LOVR_GL
|
#ifdef LOVR_GL
|
||||||
} else {
|
} else {
|
||||||
|
GLenum glFormat = convertTextureFormat(format);
|
||||||
for (uint32_t i = 0; i < texture->mipmapCount; i++) {
|
for (uint32_t i = 0; i < texture->mipmapCount; i++) {
|
||||||
switch (texture->type) {
|
switch (texture->type) {
|
||||||
case TEXTURE_2D:
|
case TEXTURE_2D:
|
||||||
|
|
Loading…
Reference in New Issue