Start the scene drawing by clearing and setting the matrixmode
| 419 | |
| 420 | // Start the scene drawing by clearing and setting the matrixmode |
| 421 | void Graphics::startDraw(vec2 start, vec2 end, ScreenType screen_type) { |
| 422 | PROFILER_GPU_ZONE(g_profiler_ctx, "Graphics::startDraw()"); |
| 423 | if (screen_type == kRender) { |
| 424 | setViewport((GLint)((float)render_dims[0] * start[0]), |
| 425 | (GLint)((float)render_dims[1] * start[1]), |
| 426 | (GLint)((float)render_dims[0] * end[0]), |
| 427 | (GLint)((float)render_dims[1] * end[1])); |
| 428 | } else if (screen_type == kWindow) { |
| 429 | setViewport((GLint)((float)window_dims[0] * start[0]), |
| 430 | (GLint)((float)window_dims[1] * start[1]), |
| 431 | (GLint)((float)window_dims[0] * end[0]), |
| 432 | (GLint)((float)window_dims[1] * end[1])); |
| 433 | } else if (screen_type == kTexture) { |
| 434 | setViewport((GLint)((float)start[0]), |
| 435 | (GLint)((float)start[1]), |
| 436 | (GLint)((float)end[0]), |
| 437 | (GLint)((float)end[1])); |
| 438 | } |
| 439 | } |
| 440 | |
| 441 | void Graphics::TakeScreenshot() { |
| 442 | unsigned long width = window_dims[0]; |
no outgoing calls
no test coverage detected