29#include <portability.h>
50 glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB, &numformats);
51 if (numformats == 0) {
56 result = (compressARB > 0) ?
true :
false;
69 const int BUFSIZE = 1024;
75 if (strcmp(optionName, tcEnabledStr) != 0) {
112 glGetIntegerv(GL_MAX_TEXTURE_SIZE, &result);
113 if (result > 16384) {
121 const int BUFSIZE = 1024;
183 GLfloat maxValue = 1.0f;
184 glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &maxValue);
185 if (maxValue >= 2.0f) {
187 maxAnisotropy = (int)maxValue;
199 const int BUFSIZE = 1024;
204 if (anisotropy < 0) {
206 }
else if (anisotropy < 2) {
245 glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT,
bool isCompressARBEnabled(void)
void checkCompressARBEnabled(bool &result)
void applyUserTextureAnisotropy(void)
int getGLTextureMaxSize(void)
void checkCompressARBAvailable(bool &result)
static int userTextureAnisotropy
static int getBestTextureAnisotropy(int requested)
int getUserTextureAnisotropy(void)
static int glTextureMaxAnisotropy
void checkTextureAnisotropyAvailable(bool &result, int &maxAnisotropy)
void updateUserTextureMaxSize(void)
void updateUserTextureAnisotropy(void)
static bool compressARBEnabled
static int glTextureMaxSize
static bool compressARBAvailable
static int userTextureMaxSize
bool isCompressARBAvailable(void)
int getUserTextureMaxSize(void)
static bool textureAnisotropyAvailable
int getGLTextureMaxAnisotropy(void)
void updateCompressARBEnabled(void)
bool isTextureAnisotropyAvailable(void)
void checkGLFeatures(void)
#define GR_ATT_TEXTUREANISOTROPY
#define GR_ATT_TEXTURECOMPRESSION_DISABLED
#define GR_ATT_TEXTURECOMPRESSION
#define GR_ATT_TEXTURESIZE
#define GR_ATT_TEXTURECOMPRESSION_ENABLED
#define GR_SCT_GLFEATURES
float tdble
Floating point type used in TORCS.
const char * GfParmGetStr(void *parmHandle, const char *path, const char *key, const char *deflt)
Get a string parameter from the parameter set handle.
tdble GfParmGetNum(void *handle, const char *path, const char *key, const char *unit, tdble deflt)
Get a numerical parameter from the parameter set handle.
void GfParmReleaseHandle(void *parmHandle)
Release given parameter set handle parmHandle.
void * GfParmReadFile(const char *file, int mode)
Read parameter set from file and return handle to parameter set.
int GfuiGlutExtensionSupported(const char *str)
Query an OpenGL extension through GLUT for the current rendering context.
static int textureAnisotropyOptionList[]
#define GFPARM_RMODE_CREAT
Allow an empty in-memory set on file-open failure; does not write a file.
#define GFPARM_RMODE_REREAD
Clear shared cached data and reread the file.