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

+2 -1
View File
@@ -360,6 +360,7 @@ void System_Wake() {
static bool pspIsInited = false;
static bool pspIsIniting = false;
static bool pspIsQuiting = false;
// Ugly!
bool PSP_InitStart(const CoreParameter &coreParam, std::string *error_string) {
if (pspIsIniting || pspIsQuiting) {
@@ -407,7 +408,7 @@ bool PSP_InitUpdate(std::string *error_string) {
bool success = coreParameter.fileToStart != "";
*error_string = coreParameter.errorString;
if (success) {
success = GPU_Init();
success = GPU_Init(coreParameter.graphicsContext);
if (!success) {
PSP_Shutdown();
*error_string = "Unable to initialize rendering engine.";