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:
@@ -17,7 +17,7 @@
|
||||
#include "xenia/cpu/processor.h"
|
||||
#include "xenia/memory.h"
|
||||
#include "xenia/ui/loop.h"
|
||||
#include "xenia/ui/platform.h"
|
||||
#include "xenia/ui/window.h"
|
||||
#include "xenia/xbox.h"
|
||||
|
||||
namespace xe {
|
||||
@@ -32,13 +32,15 @@ class GraphicsSystem {
|
||||
virtual ~GraphicsSystem();
|
||||
|
||||
static std::unique_ptr<GraphicsSystem> Create(Emulator* emulator);
|
||||
virtual std::unique_ptr<ui::GraphicsContext> CreateContext(
|
||||
ui::Window* target_window) = 0;
|
||||
|
||||
Emulator* emulator() const { return emulator_; }
|
||||
Memory* memory() const { return memory_; }
|
||||
cpu::Processor* processor() const { return processor_; }
|
||||
|
||||
virtual X_STATUS Setup(cpu::Processor* processor, ui::Loop* target_loop,
|
||||
ui::PlatformWindow* target_window);
|
||||
ui::Window* target_window);
|
||||
virtual void Shutdown();
|
||||
|
||||
void SetInterruptCallback(uint32_t callback, uint32_t user_data);
|
||||
@@ -46,8 +48,6 @@ class GraphicsSystem {
|
||||
virtual void EnableReadPointerWriteBack(uint32_t ptr,
|
||||
uint32_t block_size) = 0;
|
||||
|
||||
virtual void RequestSwap() = 0;
|
||||
|
||||
void DispatchInterruptCallback(uint32_t source, uint32_t cpu);
|
||||
|
||||
virtual void RequestFrameTrace() {}
|
||||
@@ -68,7 +68,7 @@ class GraphicsSystem {
|
||||
Memory* memory_ = nullptr;
|
||||
cpu::Processor* processor_ = nullptr;
|
||||
ui::Loop* target_loop_ = nullptr;
|
||||
ui::PlatformWindow* target_window_ = nullptr;
|
||||
ui::Window* target_window_ = nullptr;
|
||||
|
||||
uint32_t interrupt_callback_ = 0;
|
||||
uint32_t interrupt_callback_data_ = 0;
|
||||
|
||||
Reference in New Issue
Block a user