Make Input an abstract base class, and move the current functionality into FlatInput...
[movit] / sandbox_effect.cpp
1 #define GL_GLEXT_PROTOTYPES 1
2
3 #include <math.h>
4 #include <GL/gl.h>
5 #include <GL/glext.h>
6 #include <assert.h>
7
8 #include "sandbox_effect.h"
9 #include "util.h"
10
11 SandboxEffect::SandboxEffect()
12         : parm(0.0f)
13 {
14         register_float("parm", &parm);
15 }
16
17 std::string SandboxEffect::output_fragment_shader()
18 {
19         return read_file("sandbox_effect.frag");
20 }
21
22 void SandboxEffect::set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num)
23 {
24         Effect::set_gl_state(glsl_program_num, prefix, sampler_num);
25
26         // Any OpenGL state you might want to set, goes here.
27 }