You need one of the following products to complete this exercise: Simdify® Free Edition
During shader development, it can be very useful to print out a list of all shader objects associated with a particular <Program> node. For example, you can learn whether or not a constant has been declared or not, and therefore should be visible through reflection, and you can also learn things like whether or not a particular uniform has been optimized out.
The application displays a splash screen and then the application desktop appears. The main menu is composed of three items that contain commands relevant to the current context (which is an empty document). The interface changes when you create a new file or load a file from disk.
The software presents a dialog that allows you to choose the GLSL version, pixel format, and topology of the GLSL reference shader you wish to locate. The third option allows you to open the reference document in the application or to open an Explorer® window to the location of the GLSL reference shader.
The software presents an Explorer® in the directory containing the desired GLSL reference shader.
The software opens the GLSL reference document.
The application dumps OpenGL reflection information for the associated shader program.
--- <Executing Command 'ProgramNodeDumpVariables'> ---
//////////////////////////////////////////////////
Program Object Name: 83
//////////////////////////////////////////////////
a_oInfo.Name............................83
a_oInfo.TypeCode........................GL_INT32
a_oInfo.TypeName........................int
a_oInfo.Index...........................0
a_oInfo.BufferIndex.....................-1
a_oInfo.BufferBinding...................-1
a_oInfo.BufferType......................3
a_oInfo.BufferSize......................-1
a_oInfo.Location........................0
a_oInfo.Offset..........................-1
a_oInfo.Count...........................1
a_oInfo.Type............................0x1404
a_oInfo.TypeSize........................4
a_oInfo.ArrayStride.....................-1
a_oInfo.MatrixStride....................-1
a_oInfo.Rows............................0
a_oInfo.Cols............................0
a_oInfo.RowMajor........................0
a_oInfo.TopLevelArrayCount..............-1
a_oInfo.TopLevelArrayStride.............-1
a_oInfo.IsMemberOfTopLevelArray.........0
a_oInfo.IsMemberOfTopLevelUnsizedArray..0
a_oInfo.GetTotalSize....................4
//////////////////////////////////////////////////
Program Object Name: 83
//////////////////////////////////////////////////
a_oInfo.Name............................83
a_oInfo.TypeCode........................GL_FLOAT_VEC4
a_oInfo.TypeName........................vec4
a_oInfo.Index...........................1
a_oInfo.BufferIndex.....................-1
a_oInfo.BufferBinding...................-1
a_oInfo.BufferType......................3
a_oInfo.BufferSize......................-1
a_oInfo.Location........................1
a_oInfo.Offset..........................-1
a_oInfo.Count...........................1
a_oInfo.Type............................0x8b52
a_oInfo.TypeSize........................16
a_oInfo.ArrayStride.....................-1
a_oInfo.MatrixStride....................-1
a_oInfo.Rows............................0
a_oInfo.Cols............................0
a_oInfo.RowMajor........................0
a_oInfo.TopLevelArrayCount..............-1
a_oInfo.TopLevelArrayStride.............-1
a_oInfo.IsMemberOfTopLevelArray.........0
a_oInfo.IsMemberOfTopLevelUnsizedArray..0
a_oInfo.GetTotalSize....................16
//////////////////////////////////////////////////
Program Object Name: SPA_UsePerObjectID
//////////////////////////////////////////////////
a_oInfo.Name............................SPA_UsePerObjectID
a_oInfo.TypeCode........................GL_BOOL
a_oInfo.TypeName........................bool
a_oInfo.Index...........................2
a_oInfo.BufferIndex.....................-1
a_oInfo.BufferBinding...................-1
a_oInfo.BufferType......................3
a_oInfo.BufferSize......................-1
a_oInfo.Location........................2
a_oInfo.Offset..........................-1
a_oInfo.Count...........................1
a_oInfo.Type............................0x8b56
a_oInfo.TypeSize........................4
a_oInfo.ArrayStride.....................-1
a_oInfo.MatrixStride....................-1
a_oInfo.Rows............................0
a_oInfo.Cols............................0
a_oInfo.RowMajor........................0
a_oInfo.TopLevelArrayCount..............-1
a_oInfo.TopLevelArrayStride.............-1
a_oInfo.IsMemberOfTopLevelArray.........0
a_oInfo.IsMemberOfTopLevelUnsizedArray..0
a_oInfo.GetTotalSize....................4
//////////////////////////////////////////////////
Program Object Name: modelViewProjectionMatrix
//////////////////////////////////////////////////
a_oInfo.Name............................modelViewProjectionMatrix
a_oInfo.TypeCode........................GL_FLOAT_MAT4
a_oInfo.TypeName........................mat4
a_oInfo.Index...........................3
a_oInfo.BufferIndex.....................-1
a_oInfo.BufferBinding...................-1
a_oInfo.BufferType......................3
a_oInfo.BufferSize......................-1
a_oInfo.Location........................3
a_oInfo.Offset..........................-1
a_oInfo.Count...........................1
a_oInfo.Type............................0x8b5c
a_oInfo.TypeSize........................64
a_oInfo.ArrayStride.....................-1
a_oInfo.MatrixStride....................-1
a_oInfo.Rows............................4
a_oInfo.Cols............................4
a_oInfo.RowMajor........................0
a_oInfo.TopLevelArrayCount..............-1
a_oInfo.TopLevelArrayStride.............-1
a_oInfo.IsMemberOfTopLevelArray.........0
a_oInfo.IsMemberOfTopLevelUnsizedArray..0
a_oInfo.GetTotalSize....................64
//////////////////////////////////////////////////
Program Object Name: pixel_data
//////////////////////////////////////////////////
a_oInfo.Name............................pixel_data
a_oInfo.TypeCode........................GL_SAMPLER_2D
a_oInfo.TypeName........................sampler2D
a_oInfo.Index...........................4
a_oInfo.BufferIndex.....................-1
a_oInfo.BufferBinding...................-1
a_oInfo.BufferType......................3
a_oInfo.BufferSize......................-1
a_oInfo.Location........................4
a_oInfo.Offset..........................-1
a_oInfo.Count...........................1
a_oInfo.Type............................0x8b5e
a_oInfo.TypeSize........................4
a_oInfo.ArrayStride.....................-1
a_oInfo.MatrixStride....................-1
a_oInfo.Rows............................0
a_oInfo.Cols............................0
a_oInfo.RowMajor........................0
a_oInfo.TopLevelArrayCount..............-1
a_oInfo.TopLevelArrayStride.............-1
a_oInfo.IsMemberOfTopLevelArray.........0
a_oInfo.IsMemberOfTopLevelUnsizedArray..0
a_oInfo.GetTotalSize....................4
Printed information for (5) variables.
This shows all the objects OpenGL finds that are associated with this shader program. You can even see the buffer object named gaussian_blur.