In my project, I have drawn two objects. They are moving on the screen with mouse inputs and in some situations they have to share the same location but with different depth values. In that case, the one at the back have to be seen, that means the one on the front should be translucent.
Therefore to make it translucent, I am using blending functions. However, since the order of object creation is important, it works if the second created object is front of the other, but it doesnt work if the first created object comes in front of the second one.
Is there a way to make those functions work independent of the creation order? I mean do I always have to create the behind object first ?