matf-rg-engine 1.0.0
Base for project for the Computer Graphics course at Faculty of Mathematics, University of Belgrade
Loading...
Searching...
No Matches
Skybox.hpp
Go to the documentation of this file.
1
6#ifndef SKYBOX_HPP
7#define SKYBOX_HPP
8#include <cstdint>
9#include <filesystem>
10#include <utility>
11
12namespace engine::resources {
17 class Skybox {
18 friend class ResourcesController;
19
20 public:
25 uint32_t vao() const {
26 return m_vao;
27 }
28
33 uint32_t texture() const {
34 return m_texture_id;
35 }
36
40 void destroy();
41
42 private:
43 Skybox() = default;
44
45 uint32_t m_vao{0};
46 uint32_t m_texture_id{0};
47 std::filesystem::path m_path{};
48 std::string m_name{};
49
57 Skybox(uint32_t vao, uint32_t texture_id, std::filesystem::path path, std::string name)
58 : m_vao(vao)
59 , m_texture_id(texture_id)
60 , m_path(std::move(path))
61 , m_name(std::move(name)) {
62 }
63 };
64}
65
66#endif //SKYBOX_HPP
Manages app resources: Model, Texture, Shader, and Skybox.
Definition ResourcesController.hpp:21
Represents a skybox object within the OpenGL context.
Definition Skybox.hpp:17
void destroy()
Destroys the skybox object in the OpenGL context.
Skybox(uint32_t vao, uint32_t texture_id, std::filesystem::path path, std::string name)
Constructs a Skybox object.
Definition Skybox.hpp:57
uint32_t m_vao
Definition Skybox.hpp:45
uint32_t texture() const
Returns the OpenGL ID of the skybox texture.
Definition Skybox.hpp:33
uint32_t m_texture_id
Definition Skybox.hpp:46
uint32_t vao() const
Returns the OpenGL ID of the skybox.
Definition Skybox.hpp:25
std::filesystem::path m_path
Definition Skybox.hpp:47
std::string m_name
Definition Skybox.hpp:48
Definition GraphicsController.hpp:14