2019-03-20 16:15:44 +09:00

49 lines
787 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"
#include "imgui/stb_image.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::map<std::string, Mesh *> meshes;
void resize(int w, int h);
Viewer viewer;
private:
SceneContext _scnctx;
int m_width;
int m_height;
float _bgColor[3];
GLuint _vaoHandle;
GLuint _iboHandle;
void textureSetup();
void shaderSetup();
void lightSetup();
void setup();
};