diff --git a/Core/HLE/sceDisplay.cpp b/Core/HLE/sceDisplay.cpp index 35ccc4d707..cd13abb232 100644 --- a/Core/HLE/sceDisplay.cpp +++ b/Core/HLE/sceDisplay.cpp @@ -15,18 +15,6 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -#if defined(ANDROID) || defined(BLACKBERRY) -#include -#include -#else -#include -#if defined(__APPLE__) -#include -#else -#include -#endif -#endif - #include //#include "base/timeutil.h" @@ -46,7 +34,7 @@ #include "../../GPU/GLES/Framebuffer.h" #include "../../GPU/GLES/ShaderManager.h" #include "../../GPU/GPUState.h" - +#include "../../GPU/GPUInterface.h" // Internal drawing library #include "../Util/PPGeDraw.h" @@ -190,9 +178,7 @@ u32 sceDisplaySetMode(u32 unknown, u32 xres, u32 yres) DEBUG_LOG(HLE,"sceDisplaySetMode(%d,%d,%d)",unknown,xres,yres); host->BeginFrame(); - glClearColor(0,0,0,1); -// glClearColor(1,0,1,1); - glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); + gpu->InitClear(); return 0; } diff --git a/GPU/GLES/DisplayListInterpreter.cpp b/GPU/GLES/DisplayListInterpreter.cpp index 4e02d04609..49e8b41bae 100644 --- a/GPU/GLES/DisplayListInterpreter.cpp +++ b/GPU/GLES/DisplayListInterpreter.cpp @@ -76,6 +76,13 @@ bool finished; u8 bezierBuf[16000]; +void GLES_GPU::InitClear() +{ + glClearColor(0,0,0,1); + // glClearColor(1,0,1,1); + glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); +} + bool GLES_GPU::ProcessDLQueue() { std::vector::iterator iter = dlQueue.begin(); diff --git a/GPU/GLES/DisplayListInterpreter.h b/GPU/GLES/DisplayListInterpreter.h index 6a67b42f19..bf21e28811 100644 --- a/GPU/GLES/DisplayListInterpreter.h +++ b/GPU/GLES/DisplayListInterpreter.h @@ -25,6 +25,7 @@ class GLES_GPU : public GPUInterface { public: GLES_GPU() : interruptsEnabled_(true) {} + virtual void InitClear(); virtual u32 EnqueueList(u32 listpc, u32 stall); virtual void UpdateStall(int listid, u32 newstall); virtual void ExecuteOp(u32 op, u32 diff); diff --git a/GPU/GPUInterface.h b/GPU/GPUInterface.h index 049f720833..24476cc082 100644 --- a/GPU/GPUInterface.h +++ b/GPU/GPUInterface.h @@ -22,6 +22,7 @@ class GPUInterface { public: + virtual void InitClear() = 0; virtual u32 EnqueueList(u32 listpc, u32 stall) = 0; virtual void UpdateStall(int listid, u32 newstall) = 0; virtual void ExecuteOp(u32 op, u32 diff) = 0; diff --git a/GPU/Null/NullGpu.h b/GPU/Null/NullGpu.h index 6f55182097..bf1953a798 100644 --- a/GPU/Null/NullGpu.h +++ b/GPU/Null/NullGpu.h @@ -25,6 +25,7 @@ class NullGPU : public GPUInterface { public: NullGPU() : interruptsEnabled_(true) {} + virtual void InitClear() {} virtual u32 EnqueueList(u32 listpc, u32 stall); virtual void UpdateStall(int listid, u32 newstall); virtual void ExecuteOp(u32 op, u32 diff);