Skip to content

Commit 728ba97

Browse files
committed
rewrite renderPipeline
generates a single list of renders that is quickly sorted adds render layer to the RenderComponent and TextComponent
1 parent 7644e15 commit 728ba97

File tree

3 files changed

+668
-593
lines changed

3 files changed

+668
-593
lines changed

sources/include/cage-engine/scene.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ namespace cage
2020
Real opacity = Real::Nan();
2121
uint32 object = 0;
2222
uint32 sceneMask = 1;
23+
sint32 layer = 0;
2324
};
2425

2526
union CAGE_ENGINE_API ShaderDataComponent
@@ -74,9 +75,10 @@ namespace cage
7475
// real opacity; // todo
7576
uint32 textId = 0;
7677
uint32 font = 0;
77-
uint32 sceneMask = 1;
78-
Real lineSpacing = 1;
7978
TextAlignEnum align = TextAlignEnum::Center;
79+
Real lineSpacing = 1;
80+
uint32 sceneMask = 1;
81+
sint32 renderLayer = 0;
8082
};
8183

8284
struct CAGE_ENGINE_API CameraCommonProperties

sources/libcore/geometry/geometry.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,9 @@ namespace cage
488488

489489
bool intersects(Sphere sphere, const Frustum &frustum)
490490
{
491+
return intersects(Aabb(sphere), frustum);
492+
493+
// the following seems broken
491494
// https://www.flipcode.com/archives/Frustum_Culling.shtml modified
492495
for (int i = 0; i < 6; i++)
493496
{

0 commit comments

Comments
 (0)