[2D_Refactor] Softpoly ignores status bar displacement

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Rachael
Posts: 13542
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

[2D_Refactor] Softpoly ignores status bar displacement

Post by Rachael »

When screenblocks <=11 the status bar is not calculated in the view plane.
Attachments
vid_rendermode 3 (softpoly)
vid_rendermode 3 (softpoly)
vid_rendermode 4 (opengl)
vid_rendermode 4 (opengl)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [2D_Refactor] Softpoly ignores status bar displacement

Post by Graf Zahl »

This one's for dpJudas. Was this even working before? Since I tend to run the game without status bar it's something I never checked.
User avatar
Rachael
Posts: 13542
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: [2D_Refactor] Softpoly ignores status bar displacement

Post by Rachael »

Yeah it works fine in the master branch still.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [2D_Refactor] Softpoly ignores status bar displacement

Post by Graf Zahl »

Thanks to _mental_ for fixing the Linux/Mac backends.

So if this one gets fixed I'd like to prepare a first public beta with the new code, after fixing the broken wipes.
dpJudas
 
 
Posts: 3040
Joined: Sat May 28, 2016 1:01 pm

Re: [2D_Refactor] Softpoly ignores status bar displacement

Post by dpJudas »

Fixed the displacement bug, but there's a second one that I'm a bit more puzzled about. The player sprite doesn't position itself correctly anymore.

Should the player sprite drawing be handled by the renderers at all? At the moment RenderPolyPlayerSprites is a copy paste of RenderPlayerSprites with some minor changes. But couldn't we just get rid of both and use the GL renderer's 2D drawing code?
dpJudas
 
 
Posts: 3040
Joined: Sat May 28, 2016 1:01 pm

Re: [2D_Refactor] Softpoly ignores status bar displacement

Post by dpJudas »

Pushed a fix for the player sprite bug.

I also removed the DFrameBuffer::GetCanvas function as it was always returning null now. This actually revealed a bug: the software renderer isn't using accelerated sprites at the moment.

I added a comment in the source code. If this is uncommented it adds the gun to AcceleratedSprites and then in RenderPlayerSprites::RenderRemaining it tries to draw it using the canvas. This fails for some reason - probably because DFrameBuffer::Draw2D() is never called.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [2D_Refactor] Softpoly ignores status bar displacement

Post by Graf Zahl »

I noticed that it wasn't using accelerated sprites. I'll have a look into the drawing code later. But I do not understand your Draw2D comment. That cannot be the cause, both the software rendered scene and the color blend are run through it and get drawn, and the weapon sprite lies right between those calls. If it doesn't work there must be some other problem.
dpJudas
 
 
Posts: 3040
Joined: Sat May 28, 2016 1:01 pm

Re: [2D_Refactor] Softpoly ignores status bar displacement

Post by dpJudas »

Hmm okay - I didn't take a closer look. The debugger did show it reach the line where it adds the texture in m2DDrawer, but I didn't examine if it was broken input.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [2D_Refactor] Softpoly ignores status bar displacement

Post by Graf Zahl »

The problem with the weapon was that it got an alpha of 0 in the light color. The old code didn't fall into that trap because it used another method to pass the colormap info to the drawer. Since all of that was quite redundant with existing features I removed it and used more generic fields to pass the info. But that activated the alpha in the light value. Working now.
Post Reply

Return to “Closed Bugs [GZDoom]”