0

I am trying to render an transparent object in opengl but sometimes the textures are visible through each other and sometimes they are not. As far as I know I have to render them from the back to the front and it is looking fine when I do it manually but only from a Specific perspective. Is there any method to calculate the order in which they should be rendererd?

genpfault
  • 51,148
  • 11
  • 85
  • 139
Busti
  • 5,492
  • 2
  • 21
  • 34

1 Answers1

0

If you have transparent objects, then you need to use Depth Peeling or some other Order-independent transparency method in order to properly render them if you aren't going to sort them.

user1118321
  • 25,567
  • 4
  • 55
  • 86
  • Is there an opengl method to do that? – Busti Nov 27 '13 at 23:39
  • OpenGL will draw the geometry. You need to set it up with the proper depth buffers, fragment shaders, etc. You will have to do work to make this happen. It won't be as simple as just setting some flags and rendering. – user1118321 Nov 28 '13 at 00:06