mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 07:20:49 +00:00
0e3a84b4a8
It works after the move, on Windows and Android at least. Deletes the D3DX9 shader compiler loader, which was not used.
46 lines
1.2 KiB
C++
46 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include "Common/GPU/OpenGL/GLRenderManager.h"
|
|
#include "AndroidGraphicsContext.h"
|
|
#include "Common/GL/GLInterfaceBase.h"
|
|
|
|
class AndroidEGLGraphicsContext : public AndroidGraphicsContext {
|
|
public:
|
|
AndroidEGLGraphicsContext() : draw_(nullptr), wnd_(nullptr), gl(nullptr) {}
|
|
bool InitFromRenderThread(ANativeWindow *wnd, int desiredBackbufferSizeX, int desiredBackbufferSizeY, int backbufferFormat, int androidVersion) override;
|
|
void ShutdownFromRenderThread() override;
|
|
void Shutdown() override;
|
|
void SwapBuffers() override;
|
|
void SwapInterval(int interval) override {}
|
|
void Resize() override {}
|
|
Draw::DrawContext *GetDrawContext() override {
|
|
return draw_;
|
|
}
|
|
bool Initialized() override {
|
|
return draw_ != nullptr;
|
|
}
|
|
|
|
void ThreadStart() override {
|
|
renderManager_->ThreadStart(draw_);
|
|
}
|
|
|
|
bool ThreadFrame() override {
|
|
return renderManager_->ThreadFrame();
|
|
}
|
|
|
|
void ThreadEnd() override {
|
|
renderManager_->ThreadEnd();
|
|
}
|
|
|
|
void StopThread() override {
|
|
renderManager_->WaitUntilQueueIdle();
|
|
renderManager_->StopThread();
|
|
}
|
|
|
|
private:
|
|
Draw::DrawContext *draw_;
|
|
ANativeWindow *wnd_;
|
|
cInterfaceBase *gl;
|
|
GLRenderManager *renderManager_ = nullptr;
|
|
};
|