Advertisement
x89codered89x

glcontroller.h

Aug 21st, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.33 KB | None | 0 0
  1. #ifndef GLCONTROLLER_H
  2. #define GLCONTROLLER_H
  3.  
  4. //#include "globalconstants.h"
  5.  
  6. #include <string>
  7. #include <SFML/Graphics.hpp>
  8. #include <SFML/OpenGL.hpp>
  9.  
  10. #include "vec.h"
  11. #include "base.h"
  12. #include "screen.h"
  13.  
  14. /*
  15.     eventually i need an interface class for different accelerated hardware to be used
  16. */
  17. class GLcontroller: public virtual GenericBase{
  18.     public:
  19.     //Birth and Death
  20.     GLcontroller();
  21.     virtual ~GLcontroller();
  22.  
  23.     //Modifiers
  24.     static void clearScreenData();
  25.     void unregisterImage(unsigned int& textureID_);
  26.     void registerImage(sf::Image * image, unsigned int& textureID_);
  27.     void setCamera(const GLfloat& fieldOfView_, const GLfloat& width_, const GLfloat& height_, const GLfloat& zNearClip_, const GLfloat& zFarClip_, const GLfloat& zCamera_);
  28.     void drawCircle(const vec<float>& X, float r_, unsigned int edges_);
  29.     void drawImage(const unsigned int& textureID_,  const vec<float>& X);
  30.     void moveCamera(const vec<float>& dx_);
  31.    
  32.     static void updateStaticData();
  33.     protected:
  34.    
  35.     virtual void updateInstanceData() override;
  36.  
  37.     private:
  38.     void initializeGL(); // doesn't need to be registered in state.
  39.  
  40.     static bool _initialized;
  41.     static GenericScreen _screen;//vessel only
  42. };
  43. bool GLcontroller::_initialized = false;
  44. GenericScreen GLcontroller::_screen;//default desktop mode
  45. #include "glcontroller.cxx"
  46.  
  47. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement