Fix texture stuff;

This commit is contained in:
bjorn 2018-02-20 23:09:36 -08:00
parent 67d3c49a76
commit 329f7d25c0
1 changed files with 4 additions and 0 deletions

View File

@ -139,6 +139,10 @@ void lovrTextureReplacePixels(Texture* texture, TextureData* textureData, int sl
// validation
}
if (!textureData->data) {
return;
}
GLenum glFormat = lovrTextureFormatGetGLFormat(textureData->format);
GLenum glInternalFormat = lovrTextureFormatGetGLInternalFormat(textureData->format, texture->srgb);
GLenum binding = (texture->type == TEXTURE_CUBE) ? GL_TEXTURE_CUBE_MAP_POSITIVE_X + slice : texture->type;