code: public void setCastShadow(boolean enableFlag)
      {
          GVRSceneObject owner = getOwnerObject();
  
          if (owner != null)
          {
              GVRShadowMap shadowMap = (GVRShadowMap) getComponent(GVRRenderTarget.getComponentType());
              if (enableFlag)
              {
                  if (shadowMap != null)
                  {
                      shadowMap.setEnable(true);
                  }
                  else
                  {
                      GVRCamera shadowCam = GVRShadowMap.makeOrthoShadowCamera(
                              getGVRContext().getMainScene().getMainCameraRig().getCenterCamera());
                      shadowMap = new GVRShadowMap(getGVRContext(), shadowCam);
                      owner.attachComponent(shadowMap);
                  }
              }
              else if (shadowMap != null)
              {
                  shadowMap.setEnable(false);
              }
          }
          mCastShadow = enableFlag;
      }
docs: Enables or disabled shadow casting for a direct light.
  Enabling shadows attaches a GVRShadowMap component to the
  GVRSceneObject which owns the light and provides the
  component with an orthographic camera for shadow casting.
  @param enableFlag true to enable shadow casting, false to disable