MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / activate

Method activate

engine/source/platformEmscripten/EmscriptenOGLVideo.cpp:176–207  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

174
175//------------------------------------------------------------------------------
176bool 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//------------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 5

printfFunction · 0.85
setVariableFunction · 0.85
getBoolVariableFunction · 0.85
setBoolVariableFunction · 0.85
getGLCapabilitiesFunction · 0.70

Tested by

no test coverage detected