1
0
Fork 0

Grab max texture size in case we want to use it later ...

This commit is contained in:
curt 2000-09-18 21:02:59 +00:00
parent 6994086ea5
commit 18f5bbd027
2 changed files with 7 additions and 1 deletions

View file

@ -44,6 +44,7 @@ class FGGeneral {
char *glVendor;
char *glRenderer;
char *glVersion;
int glMaxTexSize;
// Last frame rate measurement
int frame_rate;
@ -57,6 +58,8 @@ public:
inline char* get_glRenderer() const { return glRenderer; }
inline void set_glRenderer( char *str ) { glRenderer = str; }
inline void set_glVersion( char *str ) { glVersion = str; }
inline void set_glMaxTexSize( int i ) { glMaxTexSize = i; }
inline int get_glMaxTexSize() const { return glMaxTexSize; }
inline double get_frame_rate() const { return frame_rate; }
#ifdef FANCY_FRAME_COUNTER
inline double get_frame(int idx) const { return frames[idx]; }

View file

@ -1201,8 +1201,11 @@ int fgGlutInit( int *argc, char **argv ) {
general.set_glVendor( (char *)glGetString ( GL_VENDOR ) );
general.set_glRenderer( (char *)glGetString ( GL_RENDERER ) );
general.set_glVersion( (char *)glGetString ( GL_VERSION ) );
int tmp;
glGetIntegerv( GL_MAX_TEXTURE_SIZE, &tmp );
general.set_glMaxTexSize( tmp );
FG_LOG ( FG_GENERAL, FG_INFO, general.get_glRenderer() );
FG_LOG ( FG_GENERAL, FG_INFO, "Max texture size = " << tmp );
#if 0
// try to determine if we should adjust the initial default