#pragma once #include #include "GL/glew.h" #include #include #include "IDrawable.h" #include "ColorCube.h" #include "Loader.h" #include "ModelView.h" #include "Viewer.h" #include "CheckeredFloor.h" #include "WireCube.h" #include "LineSegment.h" #include "Sphere.h" #include "vboteapot.h" #include "Plane.h" #include "Models/Mesh.h" struct vertexAttr { GLfloat posX, posY, posZ; GLfloat r, g, b; }; class MyGlWindow { public: MyGlWindow(int w, int h); MyGlWindow(); ~MyGlWindow(); void draw(); void setBgColor(float bgColor[3]); std::map floatValues; void AddDrawable(ADrawable *); void resize(int w, int h); Viewer viewer; private: ShaderProgram *_staticShader; ShaderProgram *_lightShader; int m_width; int m_height; float _bgColor[3]; GLuint _vaoHandle; GLuint _iboHandle; std::vector _static_drawables; std::vector _light_drawables; void setup(); void setViewFromBox(glm::vec3 &eye, glm::vec3 &look, glm::vec3 &up); };