@@ -13,60 +13,34 @@ namespace cage
1313 class ProvisionalGraphics ;
1414 class AssetsOnDemand ;
1515
16- struct LodSelection
16+ struct CAGE_ENGINE_API LodSelection
1717 {
1818 Vec3 center; // center of camera
1919 Real screenSize = 0 ; // vertical size of screen in pixels, one meter in front of the camera
2020 bool orthographic = false ;
2121 };
2222
23- struct CAGE_ENGINE_API RenderPipelineCamera
23+ struct CAGE_ENGINE_API RenderPipelineConfig
2424 {
25- CameraCommonProperties camera;
26- ScreenSpaceEffectsComponent effects;
27- LodSelection lodSelection;
2825 String name;
26+ ScreenSpaceEffectsComponent effects;
2927 Mat4 projection;
3028 Transform transform;
3129 TextureHandle target;
32- Vec2i resolution;
33- };
34-
35- struct CAGE_ENGINE_API RenderPipelineDebugVisualization
36- {
37- TextureHandle texture;
38- Holder<ShaderProgram> shader;
39- };
40-
41- struct CAGE_ENGINE_API RenderPipelineResult
42- {
43- Holder<PointerRange<RenderPipelineDebugVisualization>> debugVisualizations;
44- Holder<RenderQueue> renderQueue;
45- };
46-
47- class CAGE_ENGINE_API RenderPipeline : private Immovable
48- {
49- public:
30+ CameraCommonProperties camera;
31+ LodSelection lodSelection;
5032 uint64 currentTime = 0 ;
5133 uint64 elapsedTime = 1000000 / 60 ; // microseconds since last frame
52- uint32 frameIndex = 0 ;
53- Real interpolationFactor = 1 ;
54-
55- bool reinitialize ();
56-
57- // thread-safe: you may render multiple cameras simultaneously in threads
58- RenderPipelineResult render (const RenderPipelineCamera &camera);
59- };
60-
61- struct CAGE_ENGINE_API RenderPipelineCreateConfig
62- {
34+ Vec2i resolution;
6335 AssetsManager *assets = nullptr ;
6436 ProvisionalGraphics *provisionalGraphics = nullptr ;
6537 EntityManager *scene = nullptr ;
6638 AssetsOnDemand *onDemand = nullptr ;
39+ uint32 frameIndex = 0 ;
40+ Real interpolationFactor = 1 ;
6741 };
6842
69- CAGE_ENGINE_API Holder<RenderPipeline> newRenderPipeline (const RenderPipelineCreateConfig &config);
43+ CAGE_ENGINE_API Holder<RenderQueue> renderPipeline (const RenderPipelineConfig &config);
7044}
7145
7246#endif // guard_renderPipeline_h_4hg1s8596drfh4
0 commit comments