SimpleOpenGL3App.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef SIMPLE_OPENGL3_APP_H
  2. #define SIMPLE_OPENGL3_APP_H
  3. #include "../OpenGLWindow/GLInstancingRenderer.h"
  4. #include "../OpenGLWindow/GLPrimitiveRenderer.h"
  5. #include "../CommonInterfaces/CommonWindowInterface.h"
  6. #include "../CommonInterfaces/CommonGraphicsAppInterface.h"
  7. struct SimpleOpenGL3App : public CommonGraphicsApp
  8. {
  9. struct SimpleInternalData* m_data;
  10. class GLPrimitiveRenderer* m_primRenderer;
  11. class GLInstancingRenderer* m_instancingRenderer;
  12. virtual void setBackgroundColor(float red, float green, float blue);
  13. SimpleOpenGL3App(const char* title, int width,int height, bool allowRetina);
  14. virtual ~SimpleOpenGL3App();
  15. virtual int registerCubeShape(float halfExtentsX=1.f,float halfExtentsY=1.f, float halfExtentsZ = 1.f, int textureIndex = -1, float textureScaling = 1);
  16. virtual int registerGraphicsUnitSphereShape(EnumSphereLevelOfDetail lod, int textureId=-1);
  17. virtual void registerGrid(int xres, int yres, float color0[4], float color1[4]);
  18. void dumpNextFrameToPng(const char* pngFilename);
  19. void dumpFramesToVideo(const char* mp4Filename);
  20. void drawGrid(DrawGridData data=DrawGridData());
  21. virtual void setUpAxis(int axis);
  22. virtual int getUpAxis() const;
  23. virtual void swapBuffer();
  24. virtual void drawText( const char* txt, int posX, int posY);
  25. virtual void drawText3D( const char* txt, float posX, float posZY, float posZ, float size);
  26. struct sth_stash* getFontStash();
  27. };
  28. #endif //SIMPLE_OPENGL3_APP_H