jes/src-c/gui/gl/GL.h
2018-07-25 20:47:02 -04:00

35 lines
741 B
C++

#ifndef GL_H
#define GL_H
#include "glcxx.hpp"
#include "TextShader.h"
#include "FlatShader.h"
#include "RectShader.h"
#include "Font.h"
#include <memory>
class GL
{
public:
GL();
void draw_rect(int x, int y, int width, int height,
float r, float g, float b, float a);
void draw_character(int x, int y, uint32_t character, Font & font,
float r, float g, float b, float a);
void resize(int width, int height);
protected:
struct
{
std::shared_ptr<TextShader> text;
std::shared_ptr<FlatShader> flat;
std::shared_ptr<RectShader> rect;
} m_shaders;
std::shared_ptr<glcxx::Array> m_rect_array;
std::shared_ptr<glcxx::Buffer> m_rect_buffer;
};
#endif