1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
matabstrix/src/executable.hpp

36 lines
601 B
C++

#ifndef _EXECUTABLE_HPP_
#define _EXECUTABLE_HPP_
#include "gl.hpp"
#include "shader.hpp"
#include <vector>
struct Executable
{
void use() const;
inline GLuint uniform(unsigned index) const;
private:
friend struct Program;
Executable();
void attach_shader(const Shader &shader);
void bind_attrib_location(GLuint index, const GLchar *name);
void link();
void get_uniforms(unsigned count, const GLchar *const names[]);
GLuint id;
std::vector<GLuint> uniforms;
};
GLuint Executable::uniform(unsigned index) const
{
return uniforms.at(index);
}
#endif // _EXECUTABLE_HPP_