MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / getAttribute

Method getAttribute

source/application/StarRenderer_opengl.cpp:1181–1189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1179}
1180
1181GLuint OpenGlRenderer::Effect::getAttribute(String const& name) {
1182 auto find = attributes.find(name);
1183 if (find == attributes.end()) {
1184 GLuint attrib = glGetAttribLocation(program, name.utf8Ptr());
1185 attributes[name] = attrib;
1186 return attrib;
1187 }
1188 return find->second;
1189}
1190
1191GLuint OpenGlRenderer::Effect::getUniform(String const& name) {
1192 auto find = uniforms.find(name);

Callers 1

setupGlUniformsMethod · 0.80

Calls 3

findMethod · 0.45
endMethod · 0.45
utf8PtrMethod · 0.45

Tested by

no test coverage detected