Closed GoogleCodeExporter closed 9 years ago
It also happens a lot that you (or maybe just me) are passing a memorystream
containing a single resource.
ID3D10Resource* Texture::ConstructFromStream( SlimDX::Direct3D10::Device^
device,
Stream^ stream, int sizeInBytes, D3DX10_IMAGE_LOAD_INFO* info )
{
system::Type^ t = stream->GetType();
if( t == DataStream::typeid ){
return ConstructFromDataStream(device, safe_cast<DataStream^>(
stream ), sizeInBytes, info);
} else if ((t == System::IO::MemoryStream::typeid) && (stream->Position ==
0)) {
return ConstructFromMemory(device,
safe_cast<System::IO::MemoryStream^>(stream)->GetBuffer(), info);
}
array<Byte>^ memory = SlimDX::Utilities::ReadStream( stream, sizeInBytes );
return ConstructFromMemory( device, memory, info );
}
Kind regards
Alexander
Original comment by amuylaer...@gmail.com
on 11 Jan 2009 at 2:54
Similar optimizations have been done in places, but it's not something that has
been
properly added across SlimDX. I'd like to make it a priority to do so. Accepted
and
priority boosted.
Original comment by promit....@gmail.com
on 11 Jan 2009 at 10:30
Fixed as of r867.
Original comment by promit....@gmail.com
on 18 Jan 2009 at 2:48
Original issue reported on code.google.com by
amuylaer...@gmail.com
on 11 Jan 2009 at 2:06