<div dir="ltr"><div>Yes, thank you! Interesting stuff. Here&#39;s my first round of notes:</div><div><br></div>+1 for immutable draw state.<div>+100 for minimizing state changes! Marry desired state to the draw call.</div><div><br></div><div>Re: Uniform Buffer Objects -- Compatibility with GL 2.1 is a temporary concern, so anything we do there should be minimal and marked for future removal.</div><div><br></div><div>For passing in the current transformation, I don&#39;t think the lowest-level API should treat this or any other inputs special. Do like the convenience of not having to specify CTM every time though... maybe I&#39;m on the fence about this one! Since a lot of this has to do with UI drawing, how about a dedicated 2D transformation system, stack or otherwise? See bottom part of:</div><div><a href="http://wiki.blender.org/index.php/Dev:2.8/Source/OpenGL/Transformations">http://wiki.blender.org/index.php/Dev:2.8/Source/OpenGL/Transformations</a></div><div>3D shaders would automatically get a 3x4 ModelView and 4x4 Projection matrix, maybe a 4x4 MVP for efficiency. 2D shaders would automatically get a 2x3 ModelView matrix and that&#39;s it.</div><div><br></div><div><br></div><div>Some basic assumptions, definitions, questions... please let me know if any of these are way off:</div><div><br></div><div>GPUShader is a compiled &amp; linked set of Vertex shader, optional Geometry shader, and Fragment shader.<br><div class="gmail_extra"><br></div><div class="gmail_extra">Inputs for the GPUShader are the active uniforms (which could be from any of the above shader stages) and vertex attributes from the first stage.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Uniform values are set once per draw. Attribute values are typically set per vertex from data in VBOs. Attributes can also be set once per draw using glVertexAttrib, acting more like uniforms from client program&#39;s point of view.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Uniforms can have default values in GLSL. Is there any way to query the program to see if an input *requires* us to set a value? Beyond parsing the GLSL source text.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Anyone interested in parsing GLSL source text?</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">Mike Erwin<br>musician, naturalist, pixel pusher, hacker extraordinaire</div></div></div></div></div>