mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 23:02:01 +00:00
OpenGL2: Faster mipmap generation.
This commit is contained in:
parent
ba59df8c8c
commit
89701a1a45
1 changed files with 9 additions and 1 deletions
|
@ -1980,8 +1980,16 @@ static void RawImage_UploadTexture(GLuint texture, byte *data, int x, int y, int
|
||||||
RawImage_UploadToRgtc2Texture(texture, miplevel, x, y, width, height, data);
|
RawImage_UploadToRgtc2Texture(texture, miplevel, x, y, width, height, data);
|
||||||
else
|
else
|
||||||
qglTextureSubImage2DEXT(texture, target, miplevel, x, y, width, height, dataFormat, dataType, data);
|
qglTextureSubImage2DEXT(texture, target, miplevel, x, y, width, height, dataFormat, dataType, data);
|
||||||
|
}
|
||||||
|
|
||||||
if (rgba8 && !lastMip && numMips < 2)
|
if (!lastMip && numMips < 2)
|
||||||
|
{
|
||||||
|
if (glRefConfig.framebufferObject)
|
||||||
|
{
|
||||||
|
qglGenerateTextureMipmapEXT(texture, target);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (rgba8)
|
||||||
{
|
{
|
||||||
if (type == IMGTYPE_NORMAL || type == IMGTYPE_NORMALHEIGHT)
|
if (type == IMGTYPE_NORMAL || type == IMGTYPE_NORMALHEIGHT)
|
||||||
R_MipMapNormalHeight(data, data, width, height, glRefConfig.swizzleNormalmap);
|
R_MipMapNormalHeight(data, data, width, height, glRefConfig.swizzleNormalmap);
|
||||||
|
|
Loading…
Reference in a new issue