MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / Print

Method Print

GTE/Graphics/GL46/GLSLReflection.cpp:66–351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66void GLSLReflection::Print(std::ofstream& ostr) const
67{
68 ostr << "Description:" << std::endl;
69 ostr << "OpenGL version = " << glGetString(GL_VERSION) << std::endl;
70 ostr << "GLSL version = " << glGetString(GL_SHADING_LANGUAGE_VERSION) << std::endl;
71 ostr << "Vendor = " << glGetString(GL_VENDOR) << std::endl;
72 ostr << "Renderer = " << glGetString(GL_RENDERER) << std::endl;
73 ostr << std::endl;
74
75 ostr << "General:" << std::endl;
76 ostr << "num inputs = " << mInputs.size() << std::endl;
77 ostr << "num outputs = " << mOutputs.size() << std::endl;
78 ostr << "num uniform blocks = " << mUniformBlocks.size() << std::endl;
79 ostr << "num atomic counter buffers = " << mAtomicCounterBuffers.size() << std::endl;
80 ostr << "num uniforms = " << mUniforms.size() << std::endl;
81 ostr << "num shader storage blocks = " << mShaderStorageBlocks.size() << std::endl;
82 ostr << "num buffer variables = " << mBufferVariables.size() << std::endl;
83 ostr << std::endl;
84
85 for (uint32_t i = 0; i < mInputs.size(); ++i)
86 {
87 auto const& input = mInputs[i];
88
89 ostr << "Input[" << i << "]:" << std::endl;
90 ostr << "name = " << input.name << std::endl;
91 ostr << "type = " << GetEnumName(input.type) << std::endl;
92 ostr << "shader type = " << GetEnumShaderName(input.type) << std::endl;
93 ostr << "location = " << input.location << std::endl;
94 ostr << "array Size = " << input.arraySize << std::endl;
95 ostr << "referenced by shaders = " << GetReferencedByShaderList(input.referencedBy) << std::endl;
96 ostr << "is per patch = " << input.isPerPatch << std::endl;
97 ostr << "location component = " << input.locationComponent << std::endl;
98 ostr << std::endl;
99 }
100
101 for (uint32_t i = 0; i < mOutputs.size(); ++i)
102 {
103 auto const& output = mOutputs[i];
104
105 ostr << "Output[" << i << "]:" << std::endl;
106 ostr << "name = " << output.name << std::endl;
107 ostr << "type = " << GetEnumName(output.type) << std::endl;
108 ostr << "shader type = " << GetEnumShaderName(output.type) << std::endl;
109 ostr << "location = " << output.location << std::endl;
110 ostr << "array Size = " << output.arraySize << std::endl;
111 ostr << "referenced by shaders = " << GetReferencedByShaderList(output.referencedBy) << std::endl;
112 ostr << "is per patch = " << output.isPerPatch << std::endl;
113 ostr << "location component = " << output.locationIndex << std::endl;
114 ostr << "location index = " << output.locationIndex << std::endl;
115 ostr << std::endl;
116 }
117
118 for (uint32_t i = 0; i < mUniformBlocks.size(); ++i)
119 {
120 auto const& block = mUniformBlocks[i];
121
122 ostr << "UniformBlock[" << i << "]:" << std::endl;
123 ostr << "name = " << block.name << std::endl;

Callers

nothing calls this directly

Calls 1

glGetStringFunction · 0.85

Tested by

no test coverage detected