Delta Engine
»
Support
»
Rendering
»
Plans to change Delta.Rendering.Enums.RenderLayer?
Joined: 8/23/2011(UTC) Posts: 245
Thanks: 6 times Was thanked: 12 time(s) in 11 post(s)
|
I was just wondering if there was any eta on changing Delta.Rendering.Enums.RenderLayer. Is it going to change to a 0-1 float like XNA? My 2D game game pretending to be a 3D game is finding only 3 levels beneath the UI layer to be a bit cramped ^_^ Code:
namespace Delta.Rendering.Enums
{
// Summary:
// Flag to determine which layer a 2D object (e.g. Material, Effect) should
// be drawn onto. Note: This system will be changed in the near future to be
// more flexible. Currently it causes a lot of overhead when rendering, but
// it allows sorting without depth buffers, which can be very useful for 2D
// games.
public enum RenderLayer
{
Background = 0,
Normal = 1,
Front = 2,
UI = 3,
Text = 4,
Overlay = 5,
OverlayText = 6,
}
}
|
|
|
|
Medals:  Joined: 8/20/2011(UTC) Posts: 1,421 Location: Hannover
Thanks: 18 times Was thanked: 97 time(s) in 92 post(s)
|
We had some big task for that written down a couple of months ago, but all teams with renderlayer issues have just enabled the depth buffer and hacked in their own layers .. maybe we should do the same in the engine. This months I won't probably have time for any rendering issues, but I have written down a new task for next month.
|
|
|
|
Joined: 8/23/2011(UTC) Posts: 245
Thanks: 6 times Was thanked: 12 time(s) in 11 post(s)
|
np. Just thought I'd ask on the off-chance.
I've already created my own button class because I need buttons that respond to my bespoke 2D camera's movement (ie buttons that stay attached to objects as the camera changes position - the same issue I had with the Effect class) so I will just use that class for my in-game UI. That way I've got all the layers open to me.
I'll definitely be using the DE Screen/BaseControl classes for a menu system though, it's extremely compact to invoke!
|
|
|
|
Joined: 8/23/2011(UTC) Posts: 245
Thanks: 6 times Was thanked: 12 time(s) in 11 post(s)
|
Btw, when the time comes around for you to review RenderLayer issues, my suggestion is that you include the static classes in Delta.Rendering.Basics.Drawing in all this and give them overloads too.
eg add in overloaded methods such as Delta.Rendering.Basics.Drawing.Rect.DrawFilled(Rectangle rect, Color color, float rotation, float renderLayer);
I haven't yet noticed which renderlayer such draws go to but I'm assuming it's RenderLayer.Normal which wouldn't give me too many problems.
|
|
|
|
Medals:  Joined: 8/20/2011(UTC) Posts: 1,421 Location: Hannover
Thanks: 18 times Was thanked: 97 time(s) in 92 post(s)
|
Yes, normally everything goes to RenderLayer.Normal (in drawing, rendering, 2d, 3d, etc.). Only UI stuff ends up in RenderLayer.UI by default and fonts end up in RenderLayer.Fonts by default.
|
|
|
|
Delta Engine
»
Support
»
Rendering
»
Plans to change Delta.Rendering.Enums.RenderLayer?
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.