Massive refactoring of xenia::ui and GL swap behavior.
This seems to dramatically improve most games (especially with --vsync=false), though it may cause swap issues with others. New code should be easier to port, and enables elemental-forms to be drawn for any emulator UI.
This commit is contained in:
@@ -28,7 +28,7 @@ GL4ElementalRenderer::GL4Bitmap::GL4Bitmap(GLContext* context,
|
||||
: context_(context), renderer_(renderer) {}
|
||||
|
||||
GL4ElementalRenderer::GL4Bitmap::~GL4Bitmap() {
|
||||
GLContextLock lock(context_);
|
||||
GraphicsContextLock lock(context_);
|
||||
|
||||
// Must flush and unbind before we delete the texture.
|
||||
renderer_->FlushBitmap(this);
|
||||
@@ -69,7 +69,7 @@ GL4ElementalRenderer::GL4ElementalRenderer(GLContext* context)
|
||||
vertex_buffer_(max_vertex_batch_size() * sizeof(Vertex)) {}
|
||||
|
||||
GL4ElementalRenderer::~GL4ElementalRenderer() {
|
||||
GLContextLock lock(context_);
|
||||
GraphicsContextLock lock(context_);
|
||||
vertex_buffer_.Shutdown();
|
||||
glDeleteVertexArrays(1, &vao_);
|
||||
glDeleteProgram(program_);
|
||||
@@ -77,6 +77,7 @@ GL4ElementalRenderer::~GL4ElementalRenderer() {
|
||||
|
||||
std::unique_ptr<GL4ElementalRenderer> GL4ElementalRenderer::Create(
|
||||
GLContext* context) {
|
||||
GraphicsContextLock lock(context);
|
||||
auto renderer = std::make_unique<GL4ElementalRenderer>(context);
|
||||
if (!renderer->Initialize()) {
|
||||
XELOGE("Failed to initialize TurboBadger GL4 renderer");
|
||||
|
||||
Reference in New Issue
Block a user