Advertisement
Guest User

Context.hpp

a guest
Aug 23rd, 2013
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. #ifndef CONTEXT_H
  2. #define CONTEXT_H
  3.  
  4. #include <GL/glew.h>
  5.  
  6. class Context {
  7. public:
  8.     Context(size_t triangles);
  9.     ~Context();
  10.  
  11.     void init();
  12.     void draw();
  13.  
  14.     Context(const Context& other);
  15.     Context& operator=(const Context& other);
  16.  
  17.     Context(Context&& other);
  18.     Context& operator=(Context&& other);
  19.    
  20. private:
  21.     void initProgram();
  22.     void initVbo();
  23.  
  24.     GLuint m_programId;
  25.     GLuint m_vertexArrayId;
  26.     GLuint m_vertexShaderId;
  27.     GLuint m_fragmentShaderId;
  28.     GLuint m_vertexBufferId;
  29.     size_t m_triangles;
  30. };
  31.  
  32. #endif // CONTEXT_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement