16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 17:59:18 +02:00
Files
maszyna/gl/shader.h
milek7 13ba3fcd13 work
2018-07-08 21:33:26 +02:00

39 lines
727 B
C++

#pragma once
#include <string>
#include <vector>
#include <functional>
#include "object.h"
#include "bindable.h"
namespace gl
{
class shader : public object
{
public:
shader(const std::string &filename);
~shader();
private:
void expand_includes(std::string &str);
std::string read_file(const std::string &filename);
};
class program : public object, public bindable<program>
{
public:
program();
program(std::vector<std::reference_wrapper<const gl::shader>>);
~program();
using bindable::bind;
static void bind(GLuint i);
void attach(const shader &);
void link();
virtual void init();
};
}