| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <memory> |
| 7 |
|
| 8 |
#include "Common/CommonTypes.h" |
| 9 |
#include "Common/MathUtil.h" |
| 10 |
|
| 11 |
class AbstractTexture; |
| 12 |
class GLContext; |
| 13 |
struct WindowSystemInfo; |
| 14 |
|
| 15 |
class SWOGLWindow |
| 16 |
{ |
| 17 |
public: |
| 18 |
~SWOGLWindow(); |
| 19 |
|
| 20 |
GLContext* GetContext() const { return m_gl_context.get(); } |
| 21 |
bool IsHeadless() const; |
| 22 |
|
| 23 |
|
| 24 |
void ShowImage(const AbstractTexture* image, const MathUtil::Rectangle<int>& xfb_region); |
| 25 |
|
| 26 |
static std::unique_ptr<SWOGLWindow> Create(const WindowSystemInfo& wsi); |
| 27 |
|
| 28 |
private: |
| 29 |
SWOGLWindow(); |
| 30 |
|
| 31 |
bool Initialize(const WindowSystemInfo& wsi); |
| 32 |
|
| 33 |
u32 m_image_program = 0; |
| 34 |
u32 m_image_texture = 0; |
| 35 |
u32 m_image_vao = 0; |
| 36 |
|
| 37 |
std::unique_ptr<GLContext> m_gl_context; |
| 38 |
}; |