Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline elasto  
#1 Posted : Thursday, February 9, 2012 6:33:10 PM(UTC)
elasto

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,
    }
}

Wanna join the discussion?! Login to your forum accountregister a new account. Or Connect via Facebook Twitter Google

Offline Benjamin  
#2 Posted : Friday, February 10, 2012 12:51:52 PM(UTC)
Benjamin

Medals: Admin

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.
Offline elasto  
#3 Posted : Friday, February 10, 2012 1:07:24 PM(UTC)
elasto

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!
Offline elasto  
#4 Posted : Saturday, February 11, 2012 2:19:38 AM(UTC)
elasto

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.
Offline Benjamin  
#5 Posted : Saturday, February 11, 2012 4:05:16 AM(UTC)
Benjamin

Medals: Admin

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.
Rss Feed  Atom Feed
Users browsing this topic
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.

Powered by YAF.NET | YAF.NET © 2003-2023, Yet Another Forum.NET
This page was generated in 0.049 seconds.