| e8555c89 Andy McCall |
1 |
#ifndef GL_CONTEXT_HH |
| 2 |
#define GL_CONTEXT_HH |
| 3 |
|
| 4 |
#include "GLUtil.hh" |
| 5 |
#include "gl_mat.hh" |
| 6 |
#include <memory> |
| 7 |
#include <optional> |
| 8 |
|
| 9 |
namespace openmsx { class GLScaler; } |
| 10 |
|
| 11 |
namespace gl { |
| 12 |
|
| 13 |
struct Context |
| 14 |
{ |
| 15 |
|
| 16 |
|
| 17 |
Context(); |
| 18 |
~Context(); |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
ShaderProgram progTex; |
| 30 |
GLint unifTexColor; |
| 31 |
GLint unifTexMvp; |
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
ShaderProgram progFill; |
| 40 |
GLint unifFillMvp; |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
mat4 pixelMvp; |
| 46 |
|
| 47 |
|
| 48 |
openmsx::GLScaler& getFallbackScaler(); |
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
void setupMvpMatrix(gl::vec2 logicalSize); |
| 54 |
|
| 55 |
private: |
| 56 |
std::unique_ptr<openmsx::GLScaler> fallbackScaler; |
| 57 |
}; |
| 58 |
|
| 59 |
extern std::optional<Context> context; |
| 60 |
|
| 61 |
} |
| 62 |
|
| 63 |
#endif |