Texture2D LoadCubeMap(System.IO.FileInfo _fileName) { if (!_fileName.Exists) { throw new Exception("File not found!"); } string Ext = _fileName.Extension.ToLower(); switch (Ext) { case ".dds": using (ImageUtility.ImagesMatrix I = new ImageUtility.ImagesMatrix()) { I.DDSLoadFile(_fileName); return(new Texture2D(m_Device, I, ImageUtility.COMPONENT_FORMAT.AUTO)); } case ".bimage": { BImage I = new BImage(_fileName); return(I.CreateTextureCube(m_Device)); } default: throw new Exception("Unsupported image extension!"); } }
Texture2D LoadCubeMap(System.IO.FileInfo _FileName) { if (!_FileName.Exists) { throw new Exception("File not found!"); } string Ext = _FileName.Extension.ToLower(); switch (Ext) { case ".dds": return(DirectXTexManaged.TextureCreator.CreateTexture2DFromDDSFile(m_Device, _FileName.FullName)); case ".bimage": { BImage I = new BImage(_FileName); return(I.CreateTextureCube(m_Device)); } default: throw new Exception("Unsupported image extension!"); } }
Texture2D LoadCubeMap( System.IO.FileInfo _FileName ) { if ( !_FileName.Exists ) throw new Exception( "File not found!" ); string Ext = _FileName.Extension.ToLower(); switch ( Ext ) { case ".dds": return DirectXTexManaged.TextureCreator.CreateTexture2DFromDDSFile( m_Device, _FileName.FullName ); case ".bimage": { BImage I = new BImage( _FileName ); return I.CreateTextureCube( m_Device ); } default: throw new Exception( "Unsupported image extension!" ); } }
public ImageSlice(BImage _Owner, BinaryReader _R, uint _MipOffset) { m_Owner = _Owner; Read(_R, _MipOffset); }
public ImageSlice( BImage _Owner, BinaryReader _R, uint _MipOffset ) { m_Owner = _Owner; Read( _R, _MipOffset ); }