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

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.)

GL_ARB_occlusion_query2 (since GL 3.3 - 2010.)

The functionality in D3D and OpenGL is identical.