bool OSLRenderServices::get_texture_info(ustring filename, int subimage,
        ustring dataname,
        TypeDesc datatype, void *data)
{
    OSL::TextureSystem *ts = kernel_globals->osl->ts;
    return ts->get_texture_info(filename, subimage, dataname, datatype, data);
}
Exemple #2
0
bool OSLRenderServices::get_texture_info(OSL::ShaderGlobals *sg,
                                         ustring filename,
                                         TextureHandle *texture_handle,
                                         int subimage,
                                         ustring dataname,
                                         TypeDesc datatype,
                                         void *data)
{
  OSLTextureHandle *handle = (OSLTextureHandle *)texture_handle;

  /* No texture info for other texture types. */
  if (handle && handle->type != OSLTextureHandle::OIIO) {
    return false;
  }

  /* Get texture info from OpenImageIO. */
  OSL::TextureSystem *ts = texture_system;
  return ts->get_texture_info(filename, subimage, dataname, datatype, data);
}