mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 06:21:50 +00:00
day-night loop, dynamic skybox, clock on debug panel
This commit is contained in:
parent
4a9a4ddd14
commit
c08c31b0ad
24 changed files with 599 additions and 48 deletions
30
src/frontend/graphics/Skybox.h
Normal file
30
src/frontend/graphics/Skybox.h
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#ifndef FRONTEND_GRAPHICS_SKYBOX_H_
|
||||
#define FRONTEND_GRAPHICS_SKYBOX_H_
|
||||
|
||||
#include "../../typedefs.h"
|
||||
|
||||
class Mesh;
|
||||
class Shader;
|
||||
|
||||
class Skybox {
|
||||
uint fbo;
|
||||
uint cubemap;
|
||||
uint size;
|
||||
Mesh* mesh;
|
||||
Shader* shader;
|
||||
bool ready = false;
|
||||
public:
|
||||
Skybox(uint size, Shader* shader);
|
||||
~Skybox();
|
||||
|
||||
void draw(Shader* shader);
|
||||
|
||||
void refresh(float t, float mie, uint quality);
|
||||
void bind() const;
|
||||
void unbind() const;
|
||||
bool isReady() const {
|
||||
return ready;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // FRONTEND_GRAPHICS_SKYBOX_H_
|
||||
Loading…
Add table
Add a link
Reference in a new issue