Files
panopainter/engine/app.h

36 lines
768 B
C++

#pragma once
#include "shader.h"
#include "shape.h"
#include "texture.h"
#include "layout.h"
class App
{
Sampler sampler;
Texture2D tex;
LayoutManager layout;
stbtt_fontinfo font;
Texture2D font_tex;
std::vector<stbtt_bakedchar> chars;
Plane plane;
GLuint font_array;
int font_array_count = 0;
GLuint font_buffers[2];
const int w = 512;
const int h = 512;
const int num_chars = 96;
const int start_char = 32;
public:
static App I;
float width;
float height;
void init();
void create();
void update(float dt);
void resize(float w, float h);
void mouse_down(int button, float x, float y);
void mouse_move(float x, float y);
void mouse_up(int button, float x, float y);
};