Exemplo n.º 1
0
 public void setFixedFuncBinding(FixedFuncBinding ffBinding, Object val) {
   switch (ffBinding) {
     case Color:
       context.color = (ColorRGBA) val;
       break;
     case MaterialAmbient:
       context.ambient = (ColorRGBA) val;
       break;
     case MaterialDiffuse:
       context.diffuse = (ColorRGBA) val;
       break;
     case MaterialSpecular:
       context.specular = (ColorRGBA) val;
       break;
     case MaterialShininess:
       context.shininess = (Float) val;
       break;
     case UseVertexColor:
       context.useVertexColor = (Boolean) val;
       break;
     case AlphaTestFallOff:
       context.alphaTestFallOff = (Float) val;
       break;
   }
 }
Exemplo n.º 2
0
 /** Reset fixed function bindings to default values. */
 private void resetFixedFuncBindings() {
   context.alphaTestFallOff = 0f; // zero means disable alpha test!
   context.color = null;
   context.ambient = null;
   context.diffuse = null;
   context.specular = null;
   context.shininess = 0;
   context.useVertexColor = false;
 }