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:
parent
16053c08a0
commit
15de6e6b98
38 changed files with 230 additions and 145 deletions
|
@ -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.";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue