blob: e9e88cad05ef71acf17072c10ed54297279eb27b (
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
28
|
#pragma once
#include <string>
#include <GL/glew.h>
class ComputeShader {
private:
const GLuint _id;
public:
struct Guard {
const GLuint _id;
Guard(GLuint id);
~Guard();
};
Guard use() const;
ComputeShader(const std::string& src);
~ComputeShader();
GLuint setUniform(const std::string& name, float x, float y) const;
void workOn(GLuint buffer) const;
void dispatch(std::size_t dimX) const;
};
|