PGR Copakond OpenGL Engine - Bowling
Loading...
Searching...
No Matches
skybox.h
Go to the documentation of this file.
1#ifndef PGR_SEM_COPAKOND_SKYBOX_H
2#define PGR_SEM_COPAKOND_SKYBOX_H
3
5#include "../mesh.h"
7
8namespace copakond {
10 class Skybox : public Mesh {
11 private:
12 GLuint _shaderProgram = 0;
13 GLuint _skyboxDayTextureUID = 0;
14 GLuint _skyboxNightTextureUID = 0;
15
16 GLuint _viewUID = 0;
17 GLuint _projectionUID = 0;
18 GLuint _blendingCoeffUID = 0;
19
20 public:
28 Skybox(const std::string &dRight, const std::string &dLeft, const std::string &dTop, const std::string &dBottom, const std::string &dFront, const std::string &dBack,
29 const std::string &nRight, const std::string &nLeft, const std::string &nTop, const std::string &nBottom, const std::string &nFront, const std::string &nBack,
30 const std::string &fileSkyboxVertexShader, const std::string &fileSkyboxFragmentShader);
31 void draw(float deltaTime) override;
32
37 void update(Camera &camera, int winWidth, int winHeight, float deltaTime, float blendingCoeff);
38 };
39
40}
41
42#endif //PGR_SEM_COPAKOND_SKYBOX_H
Camera for generating view and projection matrices.
Definition camera.h:20
Mesh()
Definition mesh.cpp:12
Skybox(const std::string &dRight, const std::string &dLeft, const std::string &dTop, const std::string &dBottom, const std::string &dFront, const std::string &dBack, const std::string &nRight, const std::string &nLeft, const std::string &nTop, const std::string &nBottom, const std::string &nFront, const std::string &nBack, const std::string &fileSkyboxVertexShader, const std::string &fileSkyboxFragmentShader)
Initializes a skybox with two separate cubemaps for day and night.
Definition skybox.cpp:5
void update(Camera &camera, int winWidth, int winHeight, float deltaTime, float blendingCoeff)
Updates shader matrices (removing translation) and binds textures for blending.
Definition skybox.cpp:121
PGR Semestral work with sample scenes and bowling. doxygen was generated with a help of LLM.
Definition bezier.cpp:3
int winHeight
Definition main.cpp:35
int winWidth
Definition main.cpp:34
void draw()
Main render loop. Handles updates, physics, and rendering of all scene elements.
Definition main.cpp:97