From 18f5bbd0277b2246797f45bc33cb06395f06a153 Mon Sep 17 00:00:00 2001 From: curt Date: Mon, 18 Sep 2000 21:02:59 +0000 Subject: [PATCH] Grab max texture size in case we want to use it later ... --- src/Include/general.hxx | 3 +++ src/Main/main.cxx | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Include/general.hxx b/src/Include/general.hxx index 9d7fecb6d..9b2eea4d1 100644 --- a/src/Include/general.hxx +++ b/src/Include/general.hxx @@ -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]; } diff --git a/src/Main/main.cxx b/src/Main/main.cxx index ef3bf9cdb..c577ba9ce 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -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