06-11-2011, 04:26 AM
It's really piss-simple in OpenGL. Just enable GL_DEPTH_TEST, draw the entity, disable GL_DEPTH_TEST, make sure that everything that IS supposed to go in front of anything is drawn after the rest, and you're set. It's all about drawing priorities.