Jason McKesson avatar Jason McKesson committed 685edf6

Clarification of things.

Comments (0)

Files changed (1)

Documents/Positioning/Tutorial 07.xml

                 block is more complicated. And this is a good thing if you think about it.</para>
             <para>It works like this. The OpenGL context (effectively a giant struct containing each
                 piece of data used to render) has an array of <glossterm>uniform buffer binding
-                    points</glossterm>. A buffer object can be bound to each of these binding
-                points. For each uniform block in a program, there is a reference, not to a buffer
-                object, but to one of these uniform buffer binding points. This reference is just a
+                    points</glossterm>. Buffer objects can be bound to each of these binding points.
+                For each uniform block in a program, there is a reference, not to a buffer object,
+                but to one of these uniform buffer binding points. This reference is just a
                 numerical index: 0, 1, 2, etc.</para>
             <para>A diagram should make it clearer:</para>
             <figure>
                 called as part of initialization code. <function>glUniformBlockBinding</function> is
                 called right after creating the program, and similarly
                     <function>glBindBufferRange</function> is called immediately after creating the
-                buffer object.</para>
+                buffer object. Neither one needs to ever be changed. Yes, we change the contents of
+                the buffer object. But where it is bound never changes.</para>
             <para>The global constant <varname>g_iGlobalMatricesBindingIndex</varname> is, as the
                 name suggests, global. By convention, all programs get their buffer data from this
-                index. If you want to bind a different buffer to the global matrix binding, you only
-                need to bind that buffer object to that binding index. You do not need to change any
-                state in any program object.</para>
-            <para>This means that you can establish conventions about where certain kinds of uniform
-                blocks are stored among the list of context binding points. You do not need to
-                change each program to affect them all.</para>
+                index. Because of this convention, if we wanted to use a different buffer, we would
+                not have to update every program that needs to use that buffer. Sure, for one or two
+                programs, that would be a simple operation. But real applications can have hundreds
+                of programs. Being able to establish this kind of convention makes using uniform
+                buffer objects much easier than if they were directly associated with
+                programs.</para>
         </section>
         <section>
             <title>The Viewpoint</title>
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.