Jason McKesson avatar Jason McKesson committed 52d99bc

Noted an unfortunate OpenGL specification choice.

Comments (0)

Files changed (1)

Documents/Positioning/Tutorial 05.xml

                 does not cause this. Because of that, it is possible to have depth testing for
                 objects where their <emphasis>own</emphasis> depth (the incoming fragment's depth)
                 is not written to the depth buffer.</para>
+            <note>
+                <para>Due to an odd quirk of OpenGL, writing to the depth buffer is always inactive
+                    if <literal>GL_DEPTH_TEST</literal> is disabled. If you just want to write to
+                    the depth buffer, without actually doing a test, you must enable
+                        <literal>GL_DEPTH_TEST</literal> and use the depth function of
+                        <literal>GL_ALWAYS.</literal></para>
+            </note>
             <para>There is one more issue. We know what the depth value is in the depth buffer after
                 a fragment is written to it. But what is its value before any rendering is done at
                 all? Depth buffers and color buffers are very similar; color buffers get their
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.