54 lines
901 B
C++
54 lines
901 B
C++
#pragma once
|
|
|
|
#include <iostream>
|
|
#include "GL/glew.h"
|
|
#include <string>
|
|
#include <vector>
|
|
#include "Skybox.h"
|
|
#include "Shader.h"
|
|
#include "ModelView.h"
|
|
#include "Viewer.h"
|
|
#include "Light.h"
|
|
#include "SceneContext.h"
|
|
#include "Models/Mesh.h"
|
|
#include "imgui/stb_image.h"
|
|
#include "Multipass.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;
|
|
|
|
SceneContext _scnctx;
|
|
private:
|
|
int m_width;
|
|
int m_height;
|
|
|
|
float _bgColor[3];
|
|
|
|
Multipass _multipassManager;
|
|
|
|
Skybox skybox;
|
|
GLuint _vaoHandle;
|
|
GLuint _iboHandle;
|
|
|
|
void textureSetup();
|
|
void shaderSetup();
|
|
void lightSetup();
|
|
void multipassSetup();
|
|
void setup();
|
|
}; |