gramods
Loading...
Searching...
No Matches
RasterProcessor.hh
1
2#ifndef GRAMODS_GRAPHICS_RASTERPROCESSOR
3#define GRAMODS_GRAPHICS_RASTERPROCESSOR
4
5#include <gmGraphics/config.hh>
6
7#include <string>
8#include <memory>
9
10#include <GL/glew.h>
11#include <GL/gl.h>
12
13BEGIN_NAMESPACE_GMGRAPHICS;
14
19class RasterProcessor {
20
21public:
22
23 RasterProcessor();
24 virtual ~RasterProcessor();
25
31 void setVertexCode(std::string code);
32
37 void setFragmentCode(std::string code);
38
42 bool init();
43
47 void run();
48
53 GLuint getProgramId();
54
55private:
56
57 struct Impl;
58 std::unique_ptr<Impl> _impl;
59
60};
61
62END_NAMESPACE_GMGRAPHICS;
63
64#endif
void setFragmentCode(std::string code)
Set the fragment shader code to run in the raster processor.
Definition RasterProcessor.cpp:56
bool init()
Initialize the raster processor.
Definition RasterProcessor.cpp:62
GLuint getProgramId()
Returns the program id.
Definition RasterProcessor.cpp:70
void run()
Execute the raster processor on the current render target.
Definition RasterProcessor.cpp:66
void setVertexCode(std::string code)
Set the vertex shader code to run in the raster processor.
Definition RasterProcessor.cpp:50
Definition RasterProcessor.cpp:9