InlineFileBasedTexture.kl

Types

InlineFileBasedTexture (object)

バージョン 1.12.0 で追加.

The InlineFileBasedTexture uses the OpenImageInput to load a texture from a file. The texture can then be used inside an InlineUniform to drive an InlineShader or InlineMaterial.

/*
** Example: InlineFileBasedTexture
*/

require InlineDrawing;
  
operator entry() {

      InlineDrawing draw = OGLInlineDrawing();
      
      // load the texture and register it
      InlineFileBasedTexture texture = draw.registerTexture(InlineFileBasedTexture('diffuse_frame0.png'));
      
      // reload the texture later from a different frame
      texture.open('diffuse_frame1.png');
  
}

/*
** Output:


*/