------------------------------------------------------------------------------
| 174 | |
| 175 | //------------------------------------------------------------------------------ |
| 176 | bool OpenGLDevice::activate( U32 width, U32 height, U32 bpp, bool fullScreen ) |
| 177 | { |
| 178 | if (!setScreenMode(width, height, bpp, fullScreen)) |
| 179 | { |
| 180 | Con::printf("Unable to set screen mode."); |
| 181 | return false; |
| 182 | } |
| 183 | |
| 184 | // Output some driver info to the console |
| 185 | const char* vendorString = (const char*) glGetString( GL_VENDOR ); |
| 186 | const char* rendererString = (const char*) glGetString( GL_RENDERER ); |
| 187 | const char* versionString = (const char*) glGetString( GL_VERSION ); |
| 188 | Con::printf( "OpenGL driver information:" ); |
| 189 | if ( vendorString ) |
| 190 | Con::printf( " Vendor: %s", vendorString ); |
| 191 | if ( rendererString ) |
| 192 | Con::printf( " Renderer: %s", rendererString ); |
| 193 | if ( versionString ) |
| 194 | Con::printf( " Version: %s", versionString ); |
| 195 | |
| 196 | getGLCapabilities(); |
| 197 | |
| 198 | Con::setVariable( "$pref::Video::displayDevice", mDeviceName ); |
| 199 | |
| 200 | // Do this here because we now know about the extensions: |
| 201 | if ( gGLState.suppSwapInterval ) |
| 202 | setVerticalSync( |
| 203 | !Con::getBoolVariable( "$pref::Video::disableVerticalSync" ) ); |
| 204 | Con::setBoolVariable("$pref::OpenGL::allowTexGen", true); |
| 205 | |
| 206 | return true; |
| 207 | } |
| 208 | |
| 209 | |
| 210 | //------------------------------------------------------------------------------ |
nothing calls this directly
no test coverage detected