63 lines
1.0 KiB
C++
63 lines
1.0 KiB
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"
|
|
#include "Multipass.h"
|
|
|
|
enum SceneChoice
|
|
{
|
|
MOUNTAIN,
|
|
CUBES,
|
|
TEAPOTS
|
|
};
|
|
|
|
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]);
|
|
void orbitLights(float timePassed, float speed);
|
|
void loadScene(SceneChoice scene);
|
|
|
|
std::vector<std::shared_ptr<Mesh>> meshes;
|
|
|
|
void resize(int w, int h);
|
|
Viewer viewer;
|
|
|
|
SceneContext scnctx;
|
|
Multipass multipassManager;
|
|
SceneChoice scene;
|
|
private:
|
|
int m_width;
|
|
int m_height;
|
|
|
|
float _bgColor[3];
|
|
|
|
|
|
|
|
GLuint _vaoHandle;
|
|
GLuint _iboHandle;
|
|
|
|
void drawDebugGBuffer();
|
|
void drawForwardLight();
|
|
void drawDeferredLight();
|
|
void textureSetup();
|
|
void multipassSetup();
|
|
void setup();
|
|
}; |