public int bindShader ( GVRContext context , IRenderable rdata , GVRScene scene , boolean isMultiview ) { String signature = getClass ( ) . getSimpleName ( ) ; GVRShaderManager shaderManager = context . getShaderManager ( ) ; GVRMaterial mtl = rdata . getMaterial ( ) ; synchronized ( shaderManager ) { int nativeShader = shaderManager . getShader ( signature ) ; if ( nativeShader == 0 ) { nativeShader = addShader ( shaderManager , signature , mtl ) ; } if ( nativeShader > 0 ) { rdata . setShader ( nativeShader , isMultiview ) ; } return nativeShader ; } }
Select the specific vertex and fragment shader to use .