# Manual occlusion culling with glDrawElements [duplicate]

How should I go about doing occlusion culling with glDrawElements? I am dealing with voxel-like terrain. I want to avoid drawing the faces that are facing another block. I just don't know how to incorporate this with glDrawElements. Should I even use glDrawElements?

• glEnable(GL_CULL_FACE); glCullFace(GL_BACK); – MickLH Jun 20 '14 at 0:31
• Will it work without having to add implementation with my camera? – badcc Jun 20 '14 at 0:35
• You aren't talking about back-face culling, per your edit. You are talking about occlusion culling. – user1430 Jun 20 '14 at 0:52
• Ah, that is a helpful term. Thank you very mush, Josh! – badcc Jun 20 '14 at 1:51