Difference between revisions of "Nomenclature/Direct State Access"

From OpenGL Wiki
Jump to navigation Jump to search
(Old naming with DSA.)
(Formatting and clarifying TF operations.)
Line 1: Line 1:
 
The {{pagelink|Nomenclature}} for {{pagelink|Direct State Access}} is a bit more consistent than the non-DSA naming. As with non-DSA functions, they follow the standard Verb-Object-Command syntax. However, there were several non-DSA functions that affected some object's state without naming the Object type in its function. In the case of DSA, ''all'' DSA functions consistently use this nomenclature (even if it makes the function name unwieldy).
 
The {{pagelink|Nomenclature}} for {{pagelink|Direct State Access}} is a bit more consistent than the non-DSA naming. As with non-DSA functions, they follow the standard Verb-Object-Command syntax. However, there were several non-DSA functions that affected some object's state without naming the Object type in its function. In the case of DSA, ''all'' DSA functions consistently use this nomenclature (even if it makes the function name unwieldy).
  
The difference is that DSA functions use a different Object name from the non-DSA functions. What is inconsistent is that some DSA functions will prefix the Object name with {{code|Named}}, while others do not. Fortunately, all functions within a particular object group will consistently use the same convention.
+
The difference is that DSA functions use a different {{param|Object}} name from the non-DSA functions. What is inconsistent is that some DSA functions will prefix the {{param|Object}} name with {{code|Named}}, while others do not. Fortunately, all functions that act on an object will consistently use the same {{param|Object}} name:
  
 
{|class="wikitable"
 
{|class="wikitable"
Line 37: Line 37:
 
|}
 
|}
  
:<sup>1</sup>: Transform feedback objects have a lot of functions that use TF objects in rendering operations. But the actual state in them consists only of the buffers bound to {{enum|GL_TRANSFORM_FEEDBACK_BUFFER}} with {{apifunc|glBindBufferRange}}, as well as a captured primitive count. As such, while they had a formal {{code|Object}} name, it was only used for functions taht used the object, rather than state accessing ones. So the existing name could be appropriated to use DSA functions.</br>
+
:<sup>1</sup>: Transform feedback objects have a lot of functions that use TF objects in rendering operations. But the actual state in them consists only of the buffers attached to {{enum|GL_TRANSFORM_FEEDBACK_BUFFER}} via {{apifunc|glBindBufferRange}}, as well as a captured primitive count. As such, while they had a formal {{param|Object}} name, it was only used for functions that used the object for feedback operations rather than state-accessing functions. So the existing name could be appropriated for DSA functions (to attach buffers to the feedback object).</br>
 
:<sup>2</sup>: The functions that manipulate this object were so inconsistently named that there was never really a consistent object name for them.
 
:<sup>2</sup>: The functions that manipulate this object were so inconsistently named that there was never really a consistent object name for them.
 
:<sup>3</sup>: These object types already used DSA-style functions.
 
:<sup>3</sup>: These object types already used DSA-style functions.
  
 
There are some functions which were introduced before full DSA that work in a DSA style, but use the old {{param|Object}} name. For example, {{apifunc|glClearTexImage}} takes the texture object to be cleared as a parameter, rather than acting on context state.
 
There are some functions which were introduced before full DSA that work in a DSA style, but use the old {{param|Object}} name. For example, {{apifunc|glClearTexImage}} takes the texture object to be cleared as a parameter, rather than acting on context state.

Revision as of 06:47, 19 May 2015

The Nomenclature for Direct State Access is a bit more consistent than the non-DSA naming. As with non-DSA functions, they follow the standard Verb-Object-Command syntax. However, there were several non-DSA functions that affected some object's state without naming the Object type in its function. In the case of DSA, all DSA functions consistently use this nomenclature (even if it makes the function name unwieldy).

The difference is that DSA functions use a different Object​ name from the non-DSA functions. What is inconsistent is that some DSA functions will prefix the Object​ name with Named, while others do not. Fortunately, all functions that act on an object will consistently use the same Object​ name:

OpenGL Object Type Context Object Name DSA Object Name
Texture Object "Tex" "Texture"
Framebuffer Object "Framebuffer" "NamedFramebuffer"
Buffer Object "Buffer" "NamedBuffer"
Transform Feedback Object "TransformFeedback"1 "TransformFeedback"
Vertex Array Object N/A2 "VertexArray"
Sampler Object N/A3 "Sampler"
Query Object N/A3 "Query"
1: Transform feedback objects have a lot of functions that use TF objects in rendering operations. But the actual state in them consists only of the buffers attached to GL_TRANSFORM_FEEDBACK_BUFFER via glBindBufferRange, as well as a captured primitive count. As such, while they had a formal Object​ name, it was only used for functions that used the object for feedback operations rather than state-accessing functions. So the existing name could be appropriated for DSA functions (to attach buffers to the feedback object).
2: The functions that manipulate this object were so inconsistently named that there was never really a consistent object name for them.
3: These object types already used DSA-style functions.

There are some functions which were introduced before full DSA that work in a DSA style, but use the old Object​ name. For example, glClearTexImage takes the texture object to be cleared as a parameter, rather than acting on context state.