All Classes Files Functions Variables Typedefs Pages
Program.hpp
1 #pragma once
2 #include "GLObject.hpp"
3 #include "Program.fpp"
4 #include "HotProgram.fpp"
5 #include "RenderContext.fpp"
6 #include "Shader.hpp"
7 #include "PrimitiveProcessing.hpp"
8 #include "PerFragmentProcessing.hpp"
9 #include "../config/BaseProxy.hpp"
10 
11 #include <GL/glew.h>
12 #include <functional>
13 #include <string>
14 
15 namespace lumina {
16 
27 class Program : public GLObject {
28 public:
29  Program();
30  ~Program();
31 
38  void create(VShader& vs, FShader& fs);
39 
46  void prime(std::function<void(HotProgram&)> func);
47 
50 
53 
54 protected:
55  static bool s_isPrimed;
56 
57  GLuint m_handle;
58 
59  friend HotProgram;
60 };
61 
62 }
63 
64 #include "Program.tpp"
PerFragmentProcessing perFragProc
PerFragmentProcessing pipeline stage.
Definition: Program.hpp:52
void prime(std::function< void(HotProgram &)> func)
Primes the Program in order to use it.
Definition: Program.cpp:50
Hot version of Program.
Definition: HotProgram.hpp:18
Definition: GLObject.hpp:37
Represents an OpenGL Shader.
Definition: Shader.fpp:7
void create(VShader &vs, FShader &fs)
Links the shaders and creates the Program.
Definition: Program.cpp:12
PrimitiveProcessing primitiveProc
PrimitiveProcessing pipeline stage.
Definition: Program.hpp:49
Definition: PerFragmentProcessing.hpp:12
Represents the configuration of an OpenGL pipeline.
Definition: Program.hpp:27
Definition: PrimitiveProcessing.hpp:22