MCPcopy Create free account
hub / github.com/android/ndk-samples / SetTintColor

Method SetTintColor

endless-tunnel/app/src/main/cpp/shader.cpp:247–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245void TrivialShader::ResetTintColor() { SetTintColor(1.0f, 1.0f, 1.0f); }
246
247void TrivialShader::SetTintColor(float r, float g, float b) {
248 mTint[0] = r;
249 mTint[1] = g;
250 mTint[2] = b;
251
252 if (mPreparedVertexBuf) {
253 // we are in the middle of rendering, so push the new tint color to
254 // the shader right away.
255 glUniform4f(mTintLoc, mTint[0], mTint[1], mTint[2], 1.0f);
256 }
257}
258
259void TrivialShader::BeginRender(VertexBuf* geom) {
260 // let superclass do the basic work

Callers 3

RenderRectMethod · 0.45
RenderTextMethod · 0.45
RenderObstaclesMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected