Occlusion Query

Can OpenGL do occlusion queries? Just like in Direct3d?

How? Or do I need to do a Octree or something else? I read somewhere that Direct3D has a native support for this. Is it true?

Thank you
Sarah22

I really do not know how it is realized in D3D, but OpenGL has support for occlusion queries:

GL_ARB_occlusion_query (since GL 1.5 - 2003.)
http://www.opengl.org/registry/specs/ARB/occlusion_query.txt

GL_ARB_occlusion_query2 (since GL 3.3 - 2010.)
http://www.opengl.org/registry/specs/ARB/occlusion_query2.txt

The functionality in D3D and OpenGL is identical.