MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / loadShader

Function loadShader

test/OpenGLTrueTypeFont/main.cpp:192–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190 "}\n";
191
192void loadShader()
193{
194 sData.m_shaderProg = gltLoadShaderPair(vertexShader, fragmentShader);
195
196 sData.m_positionUniform = glGetUniformLocation(sData.m_shaderProg, "p");
197 if (sData.m_positionUniform < 0)
198 {
199 b3Assert(0);
200 }
201 sData.m_colourAttribute = glGetAttribLocation(sData.m_shaderProg, "colour");
202 if (sData.m_colourAttribute < 0)
203 {
204 b3Assert(0);
205 }
206 sData.m_positionAttribute = glGetAttribLocation(sData.m_shaderProg, "position");
207 if (sData.m_positionAttribute < 0)
208 {
209 b3Assert(0);
210 }
211 sData.m_textureAttribute = glGetAttribLocation(sData.m_shaderProg, "texuv");
212 if (sData.m_textureAttribute < 0)
213 {
214 b3Assert(0);
215 }
216}
217
218void display()
219{

Callers 1

mainFunction · 0.85

Calls 1

gltLoadShaderPairFunction · 0.85

Tested by

no test coverage detected