#ifndef GLPROGRAM_H
#define GLPROGRAM_H

#include "ruby.h"
#include "gl3w.h"
#include <unordered_map>

enum
{
    UNIFORM_VIEWPORT_SIZE,
    UNIFORM_POSITION,
    UNIFORM_SIZE,
    UNIFORM_TEXTURE,
    UNIFORM_COLOR,
};

struct GLProgram
{
    GLuint id;
    std::unordered_map<int, GLint> uniforms;
};

void GLProgram_Init();

static inline GLProgram * GLProgram_FromRuby(VALUE glprogram_obj)
{
    GLProgram * glprogram;
    Data_Get_Struct(glprogram_obj, GLProgram, glprogram);
    return glprogram;
}

#endif
