SimpleOpenGL2App.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef SIMPLE_OPENGL2_APP_H
  2. #define SIMPLE_OPENGL2_APP_H
  3. #include "../CommonInterfaces/CommonGraphicsAppInterface.h"
  4. class SimpleOpenGL2App : public CommonGraphicsApp
  5. {
  6. protected:
  7. struct SimpleOpenGL2AppInternalData* m_data;
  8. public:
  9. SimpleOpenGL2App(const char* title, int width, int height);
  10. virtual ~SimpleOpenGL2App();
  11. virtual void drawGrid(DrawGridData data=DrawGridData());
  12. virtual void setUpAxis(int axis);
  13. virtual int getUpAxis() const;
  14. virtual void swapBuffer();
  15. virtual void drawText( const char* txt, int posX, int posY);
  16. virtual void drawTexturedRect(float x0, float y0, float x1, float y1, float color[4], float u0,float v0, float u1, float v1, int useRGBA){};
  17. virtual void setBackgroundColor(float red, float green, float blue);
  18. virtual int registerCubeShape(float halfExtentsX,float halfExtentsY, float halfExtentsZ, int textureIndex = -1, float textureScaling = 1)
  19. {
  20. return 0;
  21. }
  22. virtual int registerGraphicsUnitSphereShape(EnumSphereLevelOfDetail lod, int textureId=-1)
  23. {
  24. return 0;
  25. }
  26. virtual void drawText3D( const char* txt, float posX, float posZY, float posZ, float size);
  27. virtual void registerGrid(int xres, int yres, float color0[4], float color1[4]);
  28. };
  29. #endif //SIMPLE_OPENGL2_APP_H