• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

SOLVED Can I make a surface beneath the application surface?

In another thread I've seen someone saying surfaces' depth is based on the order they are drawn, but I have a shader surface and it draws while application_surface_draw_enable is false, and being drawn before application surface, it's still shown above everything. (Application surface is manually drawn in Post Draw event while shadow surface is drawn in normal Draw.)

Once I tried to subtract from game surface to show the shadow surface beneath, but I couldn't create a shadow surface under the game so I'm now using shaders.

Thanks for any answers!
 
Last edited:

TheouAegis

Member
Where are you drawing the surface to? Just because you disabled the drawing of the application_surface doesn't mean it's no longer the drawing target. Draw them both in the GUI or Post Draw event, since the normal Draw (and Begin and End) target the application_surface by default.
 
Where are you drawing the surface to?
I'm drawing surface to where? I don't really get how application surface works, and why can't I draw anything without it. Isn't the game supposed to show drawn surfaces on screen even if application surface is not drawn at all? Why is it not the case?
 

TheouAegis

Member
Only the pre draw, post draw, and GUI events ignore the application surface. The normal draw events, including begin draw and end draw, are drawn to the application surface. If you completely disable the application_surface, then yes, it will draw to the screen buffer. But you didn't disable the application_surface, you disabled the drawing of it.
 
So if I unable automatic draw of application surface, draw another surface in pre-draw, and draw application surface in post-draw, it will really be under the application surface, is it what that means?
 
Last edited:

TheouAegis

Member
You can put the draw commands in the same event, just as long as they are not in any of the normal draw events. All you have to do is draw the surface before you draw the application surface.
 
Top