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 <vector>
5#include <functional>
6
7#include "cubemap.h"
8#include "../scene/camera.h"
9
10namespace oe::render
11{
12 class DynamicCubemap : public Cubemap
13 {
14 public:
15 DynamicCubemap(const int& size = 1024, const int& internal_format = 0, const int& format = 0, const int& type = 0);
17
18 void generate(const std::function<void(scene::Camera& camera)>& render_scene);
19 void generateMipmaps(const std::function<void(scene::Camera& camera, const uint8_t mip)>& render_scene, const uint8_t& max_mips);
20 scene::Camera getCamera() const { return _camera; }
21
22 void fillFaceFromTexture(oe::render::Texture* texture, const int& x, const int& y, const unsigned int& face, const unsigned int& mip_level);
23 private:
24 scene::Camera _camera;
25 unsigned int _depth_rbo;
26 unsigned int _fbo;
27
28 unsigned int _temp_texture;
29 unsigned int _temp_fbo;
30
31 friend class oe::render::Cubemap;
32 };
33}
34
35#endif
Definition cubemap.h:9
Definition dynamic_cubemap.h:13
Definition texture.h:27
The "eye of the scene".
Definition camera.h:33
Render related abstractions (Shader, Framebuffer, Cubemaps, Textures)
Definition opengl.h:10