------------------------------------------------------------------------------ Activate this is called once, as a result of createCanvas() in scripts. dumps OpenGL driver info for the current screen creates an initial window via setScreenMode
| 120 | // dumps OpenGL driver info for the current screen |
| 121 | // creates an initial window via setScreenMode |
| 122 | bool OpenGLDevice::activate(U32 width, U32 height, U32 bpp, bool fullScreen) |
| 123 | { |
| 124 | Con::printf(" OpenGLDevice activating..."); |
| 125 | |
| 126 | // gets opengl rendering capabilities of the screen pointed to by platState.hDisplay |
| 127 | // sets up dgl with the capabilities info, & reports opengl status. |
| 128 | |
| 129 | getGLCapabilities(); |
| 130 | |
| 131 | // Create the window or capture fullscreen |
| 132 | if (!setScreenMode(width, height, bpp, fullScreen, true, false)) |
| 133 | return false; |
| 134 | |
| 135 | // set the displayDevice pref to "OpenGL" |
| 136 | Con::setVariable("$pref::Video::displayDevice", mDeviceName); |
| 137 | |
| 138 | // set vertical sync now because it doesnt need setting every time we setScreenMode() |
| 139 | setVerticalSync(!Con::getBoolVariable("$pref::Video::disableVerticalSync")); |
| 140 | |
| 141 | return true; |
| 142 | } |
| 143 | |
| 144 | //------------------------------------------------------------------------------ |
| 145 | // returns TRUE if textures need resurrecting in future... |
nothing calls this directly
no test coverage detected