diff --git a/es-core/src/resources/TextureResource.cpp b/es-core/src/resources/TextureResource.cpp index 06380d94c..c20db779e 100644 --- a/es-core/src/resources/TextureResource.cpp +++ b/es-core/src/resources/TextureResource.cpp @@ -85,7 +85,7 @@ void TextureResource::initFromPixels(const unsigned char* dataRGBA, size_t width mTextureData->initFromRGBA(dataRGBA, width, height); // Cache the image dimensions. mSize = glm::ivec2 {static_cast(width), static_cast(height)}; - mSourceSize = glm::vec2 {mTextureData->sourceWidth(), mTextureData->sourceHeight()}; + mSourceSize = glm::vec2 {static_cast(width), static_cast(height)}; } void TextureResource::initFromMemory(const char* data, size_t length)