Files
demo/src/scene_renderer.h
T

36 lines
714 B
C++
Raw Normal View History

2022-04-24 07:15:30 +03:00
#pragma once
#include "scene_tree.h"
#include <string>
#include "shader_constants.h"
BEGIN_NAMESPACE
class shader;
class material;
class texture;
class scene_renderer {
public:
scene_renderer();
2022-04-24 10:27:17 +03:00
void render(const scene_tree &tree, const std::string &cameraName);
2022-04-24 07:15:30 +03:00
private:
void attach_depth_texture(texture &text) const;
void render_shadow_map(const scene_tree &scene, light_node &light);
std::shared_ptr<shader> first_pass_shadow_shader;
std::shared_ptr<material> first_pass_shadow_material;
std::shared_ptr<shader> second_pass_shadow_shader;
std::shared_ptr<material> second_pass_shadow_material;
shader_constants shader_consts;
GLuint fbo_id;
};
END_NAMESPACE