48 lines
735 B
C++
48 lines
735 B
C++
#pragma once
|
|
|
|
#include <iostream>
|
|
#include "GL/glew.h"
|
|
#include <string>
|
|
#include <vector>
|
|
#include "Shader.h"
|
|
#include "ModelView.h"
|
|
#include "Viewer.h"
|
|
#include "Light.h"
|
|
#include "SceneContext.h"
|
|
#include "Models/Mesh.h"
|
|
|
|
struct vertexAttr {
|
|
GLfloat posX, posY, posZ;
|
|
GLfloat r, g, b;
|
|
};
|
|
|
|
class MyGlWindow {
|
|
public:
|
|
MyGlWindow(int w, int h);
|
|
~MyGlWindow();
|
|
|
|
void draw();
|
|
void setBgColor(float bgColor[3]);
|
|
|
|
std::map<std::string, Shader> shaders;
|
|
std::vector<Mesh> meshes;
|
|
|
|
void resize(int w, int h);
|
|
Viewer viewer;
|
|
|
|
private:
|
|
Shader *ToonShader;
|
|
SceneContext _scnctx;
|
|
int m_width;
|
|
int m_height;
|
|
|
|
float _bgColor[3];
|
|
|
|
GLuint _vaoHandle;
|
|
GLuint _iboHandle;
|
|
|
|
std::vector<Mesh> _drawables;
|
|
|
|
void setup();
|
|
};
|