50 static std::shared_ptr<Cubemap>
from_faces(
const std::vector<std::string> &faces);
77 void bind(
unsigned int slot = 0)
const;
84 inline unsigned int get_id()
const {
return m_renderer_id; }
100 bool load_faces(
const std::vector<std::string> &faces);
110 bool load_equirectangular(
const std::string &path);
113 unsigned int m_renderer_id = 0;
134 Skybox(std::shared_ptr<Cubemap> cubemap,
const std::string &shader_path =
"shaders/skybox.glsl");
147 void render(std::shared_ptr<Camera> camera);
156 inline void set_cubemap(std::shared_ptr<Cubemap> cubemap) { m_cubemap = cubemap; }
163 inline std::shared_ptr<Cubemap>
get_cubemap()
const {
return m_cubemap; }
184 inline std::shared_ptr<renderer::Shader>
get_shader()
const {
return m_shader; }
193 void init_cube_geometry();
196 std::shared_ptr<Cubemap> m_cubemap;
199 std::shared_ptr<renderer::Shader> m_shader;
202 std::shared_ptr<renderer::VertexArray> m_vao;
205 float m_exposure = 1.0f;
208 unsigned int m_vbo = 0;
Declaration of the Camera class for managing viewport and projection.
Represents a cubemap texture for skybox rendering.
Definition skybox.hpp:38
void bind(unsigned int slot=0) const
Binds the cubemap texture to a specified texture slot.
Definition skybox.cpp:174
unsigned int get_id() const
Retrieves the OpenGL texture ID of the cubemap.
Definition skybox.hpp:84
~Cubemap()
Destructor for the Cubemap class.
Definition skybox.cpp:35
static std::shared_ptr< Cubemap > from_faces(const std::vector< std::string > &faces)
Creates a Cubemap from six face images.
Definition skybox.cpp:15
static std::shared_ptr< Cubemap > from_equirectangular(const std::string &path)
Creates a Cubemap from an equirectangular image.
Definition skybox.cpp:27
~Skybox()
Destructor for the Skybox class.
Definition skybox.cpp:190
std::shared_ptr< Cubemap > get_cubemap() const
Retrieves the cubemap texture used by the skybox.
Definition skybox.hpp:163
float get_exposure() const
Retrieves the exposure level for the skybox rendering.
Definition skybox.hpp:177
Skybox(std::shared_ptr< Cubemap > cubemap, const std::string &shader_path="shaders/skybox.glsl")
Constructs a Skybox with the given cubemap and shader.
Definition skybox.cpp:181
void set_exposure(float exposure)
Sets the exposure level for the skybox rendering.
Definition skybox.hpp:170
void render(std::shared_ptr< Camera > camera)
Renders the skybox using the specified camera.
Definition skybox.cpp:250
std::shared_ptr< renderer::Shader > get_shader() const
Retrieves the shader used for rendering the skybox.
Definition skybox.hpp:184
void set_cubemap(std::shared_ptr< Cubemap > cubemap)
Sets the cubemap texture for the skybox.
Definition skybox.hpp:156
Namespace for scene-related classes and functions.
Definition camera.cpp:7
Forward declarations for Assimp Material structure.
Definition model_loader.cpp:12
Declaration of the Shader class for managing shader programs in OpenGL.
Declaration of the VertexArray class for managing Vertex Array Objects (VAOs) in OpenGL.