VoxelEngine
 
Loading...
Searching...
No Matches
Skybox.h
1#pragma once
2
3#include <LWGL/buffer/Buffer.h>
4#include <LWGL/texture/CubeMap.h>
5
6#include "render/Material.h"
7#include "render/Renderable.h"
8
9namespace engine {
10
11 class Skybox : public Renderable {
12 public:
13 struct Settings {
14 std::string top;
15 std::string bottom;
16 std::string front;
17 std::string back;
18 std::string left;
19 std::string right;
20 };
21 Skybox(
22 const Settings& settings = {
23 .top = "resources/skybox/top.jpg",
24 .bottom = "resources/skybox/bottom.jpg",
25 .front = "resources/skybox/front.jpg",
26 .back = "resources/skybox/back.jpg",
27 .left = "resources/skybox/left.jpg",
28 .right = "resources/skybox/right.jpg",
29 }
30 );
31
32 void load(const Settings& settings);
33
34 void render(Engine& engine, const Camera* camera, int pass = 0) override;
35
36 private:
37 // gl::Attributes<SkyboxVertex> m_attributes;
38 gl::Buffer<float> m_buffer;
39 Material m_material;
40 gl::CubeMap m_cubeMap{false};
41 };
42} // namespace engine
Definition Camera.h:29
Definition Engine.h:36
Definition Material.h:7
Definition Renderable.h:10
Definition Skybox.h:11
void render(Engine &engine, const Camera *camera, int pass=0) override
Engine will call this method before rendering the object. You have to set at the very least the gl::A...
Definition Skybox.cpp:66
Definition Skybox.h:13