0
\$\begingroup\$

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?

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