Fixed mipmap generation bug.

This commit is contained in:
leo 2013-09-05 00:04:21 +00:00
parent 5cd24e9921
commit 92dc1315f5

View file

@ -102,13 +102,14 @@ bool lcTexture::Load(Image* images, int NumLevels, int Flags)
for (int Level = 1; ((Width != 1) || (Height != 1)); Level++)
{
int RowStride = Width * Components;
Width = lcMax(1, Width >> 1);
Height = lcMax(1, Height >> 1);
if (NumLevels == 1)
{
GLubyte *Out, *In;
int RowStride = Width * Components;
In = Out = (GLubyte*)Data;