summaryrefslogtreecommitdiff
path: root/chisel/backends/opengl/gfx.h
blob: e84ad5b4e16f363954ba87416b9dbcf218918f53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma once

#include <glad/glad.h>
#include "drawable.h"
#include "program.h"

namespace gfx {
    extern class Shaders {
        Program* _standard = nullptr;
    public:
        Program* standard();
    } shaders;

    namespace state {
        extern GLuint current_program_id;
        extern float width;
        extern float height;
    }

    enum constants {
        VERTEX_SHADER = GL_VERTEX_SHADER,
        FRAGMENT_SHADER = GL_FRAGMENT_SHADER
    };

    void viewport(int w, int h);
    void draw(Drawable& object);
}