57 lines
1.8 KiB
C++
57 lines
1.8 KiB
C++
|
|
#pragma once
|
|
#include "glm.hpp"
|
|
#include "glew.h"
|
|
#include <map>
|
|
#include <string>
|
|
#include "src/Shader_Loader.h"
|
|
#include "src/Texture.h"
|
|
#include "src/Render_Utils.h"
|
|
#include <random>
|
|
|
|
namespace Core {
|
|
class Engine {
|
|
public:
|
|
static const float skyboxVerticeParameter;
|
|
GLuint textureShader, skyboxShader, bubbleShader, particleShader;
|
|
GLuint submarineTexture, bubbleTexture, terrainTexture, skyboxTexture,
|
|
fishTexture, fangtoothTexture, sharkTexture, secondFishTexture,
|
|
plant1Texture, plant2Texture, plant3Texture, coral1Texture,
|
|
rocktower1Texture, archTexture;
|
|
|
|
GLuint skyboxVAO;
|
|
Core::RenderContext submarineContext, bubbleContext, terrainContext, fishContext,
|
|
fangtoothContext, sharkContext, secondFishContext,
|
|
plant1Context, plant2Context, plant3Context, coral1Context, rocktower1Context, archContext;
|
|
|
|
std::vector<glm::vec3> bubbleArray[300];
|
|
std::vector<float> objectSize;
|
|
std::vector<float> objectRotation;
|
|
glm::vec3 objectArray[200];
|
|
std::vector<glm::vec3> fishKeyPointsFirst, fishKeyPointsSecond, fishKeyPointsThird, sharkKeyPoints;
|
|
void initShaderPrograms();
|
|
void shutdownShaderPrograms();
|
|
void initRenderContexts();
|
|
void initTextures();
|
|
void initSkybox();
|
|
void initBubbles();
|
|
void generateObjectArray();
|
|
void generateObjectSize();
|
|
void generateObjectRotation();
|
|
void initRandomGenerator(std::default_random_engine gen, std::uniform_int_distribution<> distr);
|
|
void initKeyPoints();
|
|
|
|
private:
|
|
GLuint skyboxVBO;
|
|
Shader_Loader shaderLoader;
|
|
static const float cubeVertices[216], skyboxVertices[108];
|
|
std::uniform_int_distribution<> distr;
|
|
std::default_random_engine gen;
|
|
void initCube();
|
|
void generateBubbleArray();
|
|
std::vector<glm::vec3> genBubbleKeyPoints();
|
|
std::vector<glm::vec3> parse(std::string filename);
|
|
};
|
|
|
|
}
|