Cumulia Illustrator Rendering Engine v1.1.0
A Rendering engine for industrial CAD/CAE model and optimized for greatest performance
 
Loading...
Searching...
No Matches
renderer.h
1//##################################################################################################
2//
3// Copyright (c) 2024 Beijing Qiongqi Tech Co.,Ltd. All rights reserved.
4
5// This source code is confidential and proprietary to Beijing Qiongqi Tech Co.,Ltd(The Holder).
6// Any unauthorized use, copying, modification, or distribution of the code is strictly prohibited.
7// Any user shall obtain authorizaition from the Holder before modifying the source code. And the user shall not
8// sublicense, sell, distribute, or transfer the source code, whether in original or modified form, to any third party
9// without the prior written consent of the Holder.
10
11// This copyright notice and permission grant shall be included in all copies or substantial portions of the source code.
12
13// Author Cumulia Illustrator
14// Date 2024-10-31
15// Version V1.1.0
16//##################################################################################################
17
18#pragma once
19
20#include <memory>
21
22#include "assetmanager.h"
23#include "scenemanager.h"
24#include "rendercontext.h"
25#include "../scene/scene.h"
26
27namespace cil
28{
31 {
32 protected:
33 std::shared_ptr<RenderContext> renderContext;
34
35 private:
36 std::shared_ptr<AssetManager> assetManager;
37 std::shared_ptr<SceneManager> sceneManager;
38
39 public:
41 virtual ~Renderer();
42
44
47 virtual void render(const std::shared_ptr<Scene>& scene);
48
52 std::shared_ptr<Image2D> read(const std::shared_ptr<ImageBuffer>& buffer);
53
55 void add(const std::shared_ptr<Scene>& scene);
56 void add(const std::shared_ptr<Pass>& pass);
57 void add(const std::shared_ptr<Node>& node);
58 void add(const std::shared_ptr<Mesh>& mesh);
59 void add(const std::shared_ptr<Target>& target);
60 void add(const std::shared_ptr<Primitive>& primitive);
61 void add(const std::shared_ptr<Material>& material);
62 void add(const std::shared_ptr<Geometry>& geometry);
63 void add(const std::shared_ptr<Program>& program);
64 void add(const std::shared_ptr<Texture>& texture);
65 void add(const std::shared_ptr<Vertices>& vertices);
66 void add(const std::shared_ptr<ElementIndices>& indices);
67 void add(const std::shared_ptr<Source>& source);
68 void add(const std::shared_ptr<Image>& image);
69 void add(const std::shared_ptr<Sampler>& sampler);
70 void add(const std::shared_ptr<ArrayBuffer>& buffer);
71
73 void remove(const std::shared_ptr<Scene>& scene);
74 void remove(const std::shared_ptr<Pass>& pass);
75 void remove(const std::shared_ptr<Node>& node);
76 void remove(const std::shared_ptr<Mesh>& mesh);
77 void remove(const std::shared_ptr<Target>& target);
78 void remove(const std::shared_ptr<Primitive>& primitive);
79 void remove(const std::shared_ptr<Material>& material);
80 void remove(const std::shared_ptr<Geometry>& geometry);
81 void remove(const std::shared_ptr<Program>& program);
82 void remove(const std::shared_ptr<Texture>& texture);
83 void remove(const std::shared_ptr<Vertices>& vertices);
84 void remove(const std::shared_ptr<ElementIndices>& indices);
85 void remove(const std::shared_ptr<Source>& source);
86 void remove(const std::shared_ptr<Image>& image);
87 void remove(const std::shared_ptr<Sampler>& sampler);
88 void remove(const std::shared_ptr<ArrayBuffer>& buffer);
89
91 void update(const std::shared_ptr<Scene>& scene);
92 void update(const std::shared_ptr<Pass>& pass);
93 void update(const std::shared_ptr<Node>& node);
94 void update(const std::shared_ptr<Mesh>& mesh);
95 void update(const std::shared_ptr<Target>& target);
96 void update(const std::shared_ptr<Primitive>& primitive);
97 void update(const std::shared_ptr<Material>& material);
98 void update(const std::shared_ptr<Geometry>& geometry);
99 void update(const std::shared_ptr<Program>& program);
100 void update(const std::shared_ptr<Texture>& texture);
101 void update(const std::shared_ptr<Vertices>& vertices);
102 void update(const std::shared_ptr<ElementIndices>& indices);
103 void update(const std::shared_ptr<Source>& source);
104 void update(const std::shared_ptr<Image>& image);
105 void update(const std::shared_ptr<Sampler>& sampler);
106 void update(const std::shared_ptr<ArrayBuffer>& buffer);
107
109 void clear();
110
112 void free(bool unused = false);
113 };
114}
The Renderer class provides a comprehensive set of interfaces for managing and rendering scene.
Definition renderer.h:31
void clear()
Clears.
void remove(const std::shared_ptr< Program > &program)
void remove(const std::shared_ptr< Scene > &scene)
Removes the given object.
void add(const std::shared_ptr< Geometry > &geometry)
void makeCurrent()
void remove(const std::shared_ptr< Node > &node)
void add(const std::shared_ptr< ElementIndices > &indices)
void add(const std::shared_ptr< Node > &node)
void remove(const std::shared_ptr< Primitive > &primitive)
void remove(const std::shared_ptr< Image > &image)
virtual ~Renderer()
std::shared_ptr< Image2D > read(const std::shared_ptr< ImageBuffer > &buffer)
Reads data from the given image buffer.
void update(const std::shared_ptr< Sampler > &sampler)
void update(const std::shared_ptr< Geometry > &geometry)
void remove(const std::shared_ptr< Pass > &pass)
void update(const std::shared_ptr< Node > &node)
void add(const std::shared_ptr< Scene > &scene)
Adds the given object.
void add(const std::shared_ptr< Mesh > &mesh)
void add(const std::shared_ptr< Image > &image)
void remove(const std::shared_ptr< Mesh > &mesh)
void update(const std::shared_ptr< ArrayBuffer > &buffer)
void update(const std::shared_ptr< Material > &material)
void remove(const std::shared_ptr< Source > &source)
void add(const std::shared_ptr< Texture > &texture)
void remove(const std::shared_ptr< Geometry > &geometry)
void remove(const std::shared_ptr< Sampler > &sampler)
void add(const std::shared_ptr< Program > &program)
void free(bool unused=false)
Frees resources used by the renderer, ensuring that the renderer is properly terminated.
void update(const std::shared_ptr< ElementIndices > &indices)
void update(const std::shared_ptr< Target > &target)
void remove(const std::shared_ptr< Target > &target)
std::shared_ptr< RenderContext > renderContext
Definition renderer.h:33
void add(const std::shared_ptr< Primitive > &primitive)
void update(const std::shared_ptr< Source > &source)
void update(const std::shared_ptr< Mesh > &mesh)
void add(const std::shared_ptr< Target > &target)
virtual void render(const std::shared_ptr< Scene > &scene)
Renders the given scene.
void update(const std::shared_ptr< Texture > &texture)
void remove(const std::shared_ptr< ArrayBuffer > &buffer)
void remove(const std::shared_ptr< ElementIndices > &indices)
void update(const std::shared_ptr< Primitive > &primitive)
void remove(const std::shared_ptr< Texture > &texture)
void add(const std::shared_ptr< Pass > &pass)
void update(const std::shared_ptr< Pass > &pass)
void add(const std::shared_ptr< Source > &source)
void update(const std::shared_ptr< Vertices > &vertices)
void add(const std::shared_ptr< ArrayBuffer > &buffer)
void update(const std::shared_ptr< Scene > &scene)
Updates the given object.
void add(const std::shared_ptr< Sampler > &sampler)
void add(const std::shared_ptr< Vertices > &vertices)
void update(const std::shared_ptr< Image > &image)
void remove(const std::shared_ptr< Material > &material)
void add(const std::shared_ptr< Material > &material)
void remove(const std::shared_ptr< Vertices > &vertices)
void update(const std::shared_ptr< Program > &program)
Definition decal.h:23