summaryrefslogtreecommitdiffstats
path: root/src/graphics/Shader.hpp
blob: 90db5f73a66c0de21c6dd0658bdbcef87fa786af (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once
#include <string>
#include <fstream>
#include <sstream>
#include <iostream>

#include <GL/glew.h>

class Shader
{
private:
    const GLchar *vertex;
    const GLchar *fragment;
public:
    // Идентификатор программы
    GLuint Program;
    // Конструктор считывает и собирает шейдер
    Shader(const GLchar* vertexPath, const GLchar* fragmentPath);
    // Использование программы
    void Use();

    void Reload();
};