Files
demo/src/scene_renderer.h
T
2022-04-24 10:27:17 +03:00

36 lines
714 B
C++

#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();
void render(const scene_tree &tree, const std::string &cameraName);
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