GraphicsContext: Abstract away things like swapbuffers etc before adding even more backends.

Needed to prevent clutter all over the codebase.

Does not go all the way yet, goal would be a common render loop between platforms but not there yet.
This commit is contained in:
Henrik Rydgard committed 2016-01-01 14:40:16 +01:00
1 parent 16053c08a0
commit 15de6e6b98
38 files changed
+230 -145

No files matched your search

+5 -7
View File
@@ -288,12 +288,10 @@ namespace MainWindow
}
void ToggleFullscreen(HWND hWnd, bool goingFullscreen) {
GraphicsContext *graphicsContext = PSP_CoreParameter().graphicsContext;
// Make sure no rendering is happening during the switch.
bool isOpenGL = g_Config.iGPUBackend == GPU_BACKEND_OPENGL;
if (isOpenGL) {
GL_Pause();
if (graphicsContext) {
graphicsContext->Pause();
}
int oldWindowState = g_WindowState;
@@ -355,8 +353,8 @@ namespace MainWindow
WindowsRawInput::NotifyMenu();
if (isOpenGL) {
GL_Resume();
if (graphicsContext) {
graphicsContext->Resume();
}
}