- moved the CVAR definitions from gl/ to hwrenderer/.

- disabled gl_texture_format because in its existing form it is mostly a useless feature.
This commit is contained in:
Christoph Oelckers 2018-04-25 20:33:55 +02:00
commit ceeb479261
25 changed files with 49 additions and 70 deletions

View file

@ -60,20 +60,6 @@ CUSTOM_CVAR(Int, gl_texture_filter, 4, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINI
if (GLRenderer != NULL && GLRenderer->mSamplerManager != NULL) GLRenderer->mSamplerManager->SetTextureFilterMode();
}
CUSTOM_CVAR(Int, gl_texture_format, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCALL)
{
// [BB] The number of available texture modes depends on the GPU capabilities.
// RFL_TEXTURE_COMPRESSION gives us one additional mode and RFL_TEXTURE_COMPRESSION_S3TC
// another three.
int numOfAvailableTextureFormat = 4;
if ( gl.flags & RFL_TEXTURE_COMPRESSION && gl.flags & RFL_TEXTURE_COMPRESSION_S3TC )
numOfAvailableTextureFormat = 8;
else if ( gl.flags & RFL_TEXTURE_COMPRESSION )
numOfAvailableTextureFormat = 5;
if (self < 0 || self > numOfAvailableTextureFormat-1) self=0;
GLRenderer->FlushTextures();
}
CUSTOM_CVAR(Bool, gl_texture_usehires, true, CVAR_ARCHIVE|CVAR_NOINITCALL)
{
if (GLRenderer != NULL) GLRenderer->FlushTextures();
@ -83,25 +69,3 @@ CVAR(Bool, gl_precache, false, CVAR_ARCHIVE)
CVAR(Bool, gl_trimsprites, true, CVAR_ARCHIVE);
TexFilter_s TexFilter[]={
{GL_NEAREST, GL_NEAREST, false},
{GL_NEAREST_MIPMAP_NEAREST, GL_NEAREST, true},
{GL_LINEAR, GL_LINEAR, false},
{GL_LINEAR_MIPMAP_NEAREST, GL_LINEAR, true},
{GL_LINEAR_MIPMAP_LINEAR, GL_LINEAR, true},
{GL_NEAREST_MIPMAP_LINEAR, GL_NEAREST, true},
{GL_LINEAR_MIPMAP_LINEAR, GL_NEAREST, true},
};
int TexFormat[]={
GL_RGBA8,
GL_RGB5_A1,
GL_RGBA4,
GL_RGBA2,
// [BB] Added compressed texture formats.
GL_COMPRESSED_RGBA_ARB,
GL_COMPRESSED_RGBA_S3TC_DXT1_EXT,
GL_COMPRESSED_RGBA_S3TC_DXT3_EXT,
GL_COMPRESSED_RGBA_S3TC_DXT5_EXT,
};