19 #ifndef GENERIC_RENDERER_H
20 #define GENERIC_RENDERER_H
25 #include "../renderer.h"
26 #include "../gl_renderer.h"
27 #include "../../assets/material.h"
28 #include "../batching/render_queue.h"
32 struct GL2RenderGroupImpl;
33 class GenericRenderer;
41 batcher::Iteration iteration;
55 void apply_lights(
const LightPtr* lights,
const uint8_t count);
64 const Light* light_ =
nullptr;
68 void do_visit(
const Renderable* renderable,
const MaterialPass* material_pass, batcher::Iteration iteration);
85 const uint8_t pass_number,
86 const bool is_blended,
87 const float distance_to_camera
90 void init_context()
override;
92 std::shared_ptr<batcher::RenderQueueVisitor> get_render_queue_visitor(
CameraPtr camera)
override;
94 GPUProgramID new_or_existing_gpu_program(
const std::string& vertex_shader_source,
const std::string& fragment_shader_source)
override;
96 GPUProgramPtr gpu_program(
const GPUProgramID& program_id)
const override;
98 bool supports_gpu_programs()
const override {
return true; }
101 std::string name()
const override {
105 void prepare_to_render(
const Renderable* renderable)
override;
110 std::shared_ptr<VBOManager> buffer_manager_;
118 void set_blending_mode(BlendType type);
122 std::shared_ptr<GPUBuffer> buffer_stash_;
129 #endif // GENERIC_RENDERER_H