Oxygen Engine
Modern C++ 3D Engine using OpenGL
Loading...
Searching...
No Matches
dynamic_cubemap.h
1#ifndef OE_RENDER_DYNAMIC_CUBEMAP_H
2#define OE_RENDER_DYNAMIC_CUBEMAP_H
3
4#include <functional>
5
6#include "cubemap.h"
7#include "../scene/camera.h"
8
9namespace oe::render
10{
11 class DynamicCubemap : public Cubemap
12 {
13 public:
14 DynamicCubemap(const int32_t size = 1024, const int32_t internal_format = 0, const int32_t format = 0, const int32_t type = 0);
16
17 void generate(const std::function<void(scene::Camera& camera)>& render_scene);
18 void generateMipmaps(const std::function<void(scene::Camera& camera, const uint8_t mip)>& render_scene, const uint8_t max_mips);
19 scene::Camera getCamera() const { return _camera; }
20
21 void fillFaceFromTexture(oe::render::Texture* texture, const int32_t x, const int32_t y, const uint32_t face, const uint32_t mip_level);
22 private:
23 scene::Camera _camera;
24 uint32_t _depth_rbo;
25 uint32_t _fbo;
26
27 uint32_t _temp_texture;
28 uint32_t _temp_fbo;
29
30 friend class oe::render::Cubemap;
31 };
32}
33
34#endif
Definition cubemap.h:9
Definition dynamic_cubemap.h:12
Definition texture.h:31
The "eye of the scene".
Definition camera.h:31
Render related abstractions (Shader, Framebuffer, Cubemaps, Textures)
Definition opengl.h:10