mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Work towards threaded GL on Android. Now TextDrawer barfs on wrong JNI context.
This commit is contained in:
1 parent
e7c9afd7bb
commit
7abb8702ce
9 files changed
+172
-50
No files matched your search
@@ -4,16 +4,25 @@
|
||||
#include "Core/System.h"
|
||||
|
||||
AndroidJavaEGLGraphicsContext::AndroidJavaEGLGraphicsContext() {
|
||||
SetGPUBackend(GPUBackend::OPENGL);
|
||||
}
|
||||
|
||||
bool AndroidJavaEGLGraphicsContext::InitFromRenderThread(ANativeWindow *wnd, int desiredBackbufferSizeX, int desiredBackbufferSizeY, int backbufferFormat, int androidVersion) {
|
||||
ILOG("AndroidJavaEGLGraphicsContext::InitFromRenderThread");
|
||||
CheckGLExtensions();
|
||||
draw_ = Draw::T3DCreateGLContext();
|
||||
SetGPUBackend(GPUBackend::OPENGL);
|
||||
renderManager_ = (GLRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
|
||||
bool success = draw_->CreatePresets();
|
||||
assert(success);
|
||||
return success;
|
||||
}
|
||||
|
||||
void AndroidJavaEGLGraphicsContext::ShutdownFromRenderThread() {
|
||||
ILOG("AndroidJavaEGLGraphicsContext::Shutdown");
|
||||
renderManager_ = nullptr; // owned by draw_.
|
||||
delete draw_;
|
||||
draw_ = nullptr;
|
||||
}
|
||||
|
||||
void AndroidJavaEGLGraphicsContext::Shutdown() {
|
||||
ILOG("AndroidJavaEGLGraphicsContext::Shutdown");
|
||||
delete draw_;
|
||||
draw_ = nullptr;
|
||||
NativeShutdownGraphics();
|
||||
// TODO
|
||||
}
|
||||
Reference in new issue
Block a user