mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-12-18 10:57:04 +00:00
36 lines
882 B
C++
36 lines
882 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include "thin3d/thin3d.h"
|
|
|
|
// Init is done differently on each platform, and done close to the creation, so it's
|
|
// expected to be implemented by subclasses.
|
|
class GraphicsContext {
|
|
public:
|
|
virtual ~GraphicsContext() {}
|
|
|
|
virtual void Shutdown() = 0;
|
|
virtual void SwapInterval(int interval) = 0;
|
|
|
|
virtual void SwapBuffers() = 0;
|
|
|
|
// Used during window resize. Must be called from the window thread,
|
|
// not the rendering thread or CPU thread.
|
|
virtual void Pause() {}
|
|
virtual void Resume() {}
|
|
|
|
virtual void Resize() = 0;
|
|
|
|
virtual Thin3DContext *CreateThin3DContext() = 0;
|
|
};
|
|
|
|
class DummyGraphicsContext : public GraphicsContext {
|
|
public:
|
|
void Shutdown() override {}
|
|
void SwapInterval(int interval) override {}
|
|
void SwapBuffers() override {}
|
|
void Resize() override {}
|
|
|
|
Thin3DContext *CreateThin3DContext() override { return nullptr; }
|
|
}; |