SimpleOpenGL2App.h 1.3 KB

1234567891011121314151617181920212223242526272829303132
  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, float size, float colorRGBA[4]);
  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. virtual int registerGraphicsUnitSphereShape(EnumSphereLevelOfDetail lod, int textureId = -1);
  20. virtual void drawText3D(const char* txt, float posX, float posZY, float posZ, float size);
  21. virtual void drawText3D(const char* txt, float position[3], float orientation[4], float color[4], float size, int optionFlag);
  22. virtual void registerGrid(int xres, int yres, float color0[4], float color1[4]);
  23. };
  24. #endif //SIMPLE_OPENGL2_APP_H