Game Development Reference
In-Depth Information
PresentParameters presentParams = new PresentParameters();
presentParams.Windowed = true;
presentParams.SwapEffect = SwapEffect.Discard;
_device = new Device(0,
DeviceType.Reference,
ContextHandle,
CreateFlags.SoftwareVertexProcessing,
presentParams);
}
stream.Position = 0;
using (Texture texture = TextureLoader.FromStream(_device, stream))
{
using (GraphicsStream processedStream
= TextureLoader.SaveToStream(ImageFileFormat.Bmp, texture))
{
result = new Bitmap(processedStream);
}
}
return result;
}
catch
{
return null;
}
}
public Direct3DLoader(System.IntPtr contextHandle) : base(contextHandle) {}
public void Dispose()
{
if (_device != null)
{
_device.Dispose();
_device = null;
}
}
}
Search Nedrilad ::




Custom Search