So this is more of a general question but I believe it can be solved using OpenGL.
My system at the moment, renders Two layers, Bottom and Top and in between the player, so that when the player moves, anything on the top layer is above him and hides him and anything on the bottom layer is above him(he looks like hes standing on it). You know, basic 2D RPG 101.
Now suggest for a minute that I want something in the top layer to be behind the player, but it’s transparent so I dont want it in the bottom layer.
My question is, is there anyway I can render to memory, then display things in a specific order? Like it’ll render
Bottom(+things in top that are transparent)
Top(-things that are transparent)
I was thinking FBOs but I’m not quite sure if they are what I want and it would need a bit of an overhaul to use FBOs.