Пример #1
0
 /// <summary>
 /// Set the textuer for the specific geode
 /// </summary>
 /// <param name="textureImage">The texture</param>
 /// <param name="geode">The geode</param>
 private static void SetTexture(Image <Bgr, Byte> textureImage, Osg.Geode geode)
 {
     //Create a new StateSet with default settings
     Osg.StateSet  state   = new Osg.StateSet();
     Osg.Texture2D texture = new Osg.Texture2D(ConvertImage(textureImage));
     state.setTextureAttributeAndModes(0, texture, 1);
     geode.setStateSet(state);
 }
Пример #2
0
 /// <summary>
 /// Set the textuer for the specific geode
 /// </summary>
 /// <param name="textureImage">The texture</param>
 /// <param name="geode">The geode</param>
 private static void SetTexture(Image<Bgr, Byte> textureImage, Osg.Geode geode)
 {
    //Create a new StateSet with default settings
    Osg.StateSet state = new Osg.StateSet();
    Osg.Texture2D texture = new Osg.Texture2D(ConvertImage(textureImage));
    state.setTextureAttributeAndModes(0, texture, 1);
    geode.setStateSet(state);
 }