ppsspp/libretro/LibretroGLContext.h
Henrik Rydgård 0e3a84b4a8 Move most GPU things to Common.
It works after the move, on Windows and Android at least.

Deletes the D3DX9 shader compiler loader, which was not used.
2020-10-04 23:39:02 +02:00

42 lines
1.1 KiB
C++

#pragma once
#include "Common/GPU/OpenGL/GLCommon.h"
#include "libretro/LibretroGraphicsContext.h"
#include "Common/GPU/OpenGL/GLRenderManager.h"
class LibretroGLContext : public LibretroHWRenderContext {
public:
LibretroGLContext()
#ifdef USING_GLES2
: LibretroHWRenderContext(RETRO_HW_CONTEXT_OPENGLES2)
#else
: LibretroHWRenderContext(RETRO_HW_CONTEXT_OPENGL)
#endif
{
hw_render_.bottom_left_origin = true;
}
bool Init() override;
void CreateDrawContext() override;
void DestroyDrawContext() override;
void SetRenderTarget() override {
extern GLuint g_defaultFBO;
g_defaultFBO = hw_render_.get_current_framebuffer();
}
void ThreadStart() override { renderManager_->ThreadStart(draw_); }
bool ThreadFrame() override { return renderManager_->ThreadFrame(); }
void ThreadEnd() override { renderManager_->ThreadEnd(); }
void StopThread() override {
renderManager_->WaitUntilQueueIdle();
renderManager_->StopThread();
}
GPUCore GetGPUCore() override { return GPUCORE_GLES; }
const char *Ident() override { return "OpenGL"; }
private:
GLRenderManager *renderManager_ = nullptr;
bool glewInitDone = false;
};