GLBasic forum

Main forum => GLBasic - en => Topic started by: MrTAToad on 2011-Mar-24

Title: Rendering order with ALPHAMODE
Post by: MrTAToad on 2011-Mar-24
For some reason rendering order seems to have been changed when using ALPHAMODE -0.2

Normally, the background is displayed before everything else, but for some reason I find that it appears to be rendered after the tiles have been, if ALPHAMODE -0.2

I use this to make everything dark so I can display the in-game menu.

Included are a screenshot of it as normal and the pause window.



[attachment deleted by admin]
Title: Re: Rendering order with ALPHAMODE
Post by: Wampus on 2011-Mar-24
Is the display drawn all within one STARTPOLY to ENDPOLY? If so, try ALPHAMODE -0.99 just after STARTPOLY and ALPHAMODE -0.99 just before ENDPOLY. I had some issues a little similar to this and that fixed it.
Title: Re: Rendering order with ALPHAMODE
Post by: MrTAToad on 2011-Mar-24
Its actually all sprites, although the same thing happens with DRAWLINE :)
Title: Re: Rendering order with ALPHAMODE
Post by: Kitty Hello on 2011-Mar-24
can you make a small example?
Title: Re: Rendering order with ALPHAMODE
Post by: MrTAToad on 2011-Mar-24
Hmm - that would be rather tricky as the display routine is rather large and over a couple files.

Could send the project if you like...
Title: Re: Rendering order with ALPHAMODE
Post by: MrTAToad on 2011-Mar-24
I've got a feeling its more of an illusion than anything, with the board area being somewhat transparent, making the background visible.

The best way around it (and it can also be used when the program is being paused too), would be to grab the contents the screen, display that and then the menu options.  The advantage is less processing needed when the game is paused...