private static TextureCube LoadOriginalCubemap(FearGraphicsDevice device) { TextureLoader loader = new TextureLoader(device); ResourceInformation cubeInfo = new TextureResourceInformation(); cubeInfo.UpdateInformation("Filepath", "C:\\Users\\Andy\\Documents\\Coding\\Visual Studio 2012\\Projects\\FearEngine\\Resources\\Textures\\Cubemaps\\LancellottiChapel\\LancellottiChapelCube.dds"); cubeInfo.UpdateInformation("IsCubemap", "true"); return((TextureCube)loader.Load(cubeInfo)); }
public void LoadCubemap() { //Given SharpDX.Toolkit.Graphics.GraphicsDevice device = SharpDX.Toolkit.Graphics.GraphicsDevice.New(DeviceCreationFlags.Debug); TextureLoader loader = new TextureLoader(new SharpDXGraphicsDevice(device)); ResourceInformation cubeInfo = new TextureResourceInformation(); cubeInfo.UpdateInformation("Filepath", "C:\\Users\\Andy\\Documents\\Coding\\Visual Studio 2012\\Projects\\FearEngine\\Resources\\Textures\\Cubemaps\\LancellottiChapel\\LancellottiChapelCube.dds"); cubeInfo.UpdateInformation("IsCubemap", "true"); //When TextureCube texture = (TextureCube)loader.Load(cubeInfo); device.Dispose(); }
public void LoadTexture() { //Given SharpDX.Toolkit.Graphics.GraphicsDevice device = SharpDX.Toolkit.Graphics.GraphicsDevice.New(DeviceCreationFlags.Debug); TextureLoader loader = new TextureLoader(new SharpDXGraphicsDevice(device)); ResourceInformation info = new TextureResourceInformation(); info.UpdateInformation("Filepath", "C:\\Users\\Andy\\Documents\\Coding\\Visual Studio 2012\\Projects\\FearEngine\\Resources\\Textures\\DefaultTexture.png"); //When Texture texture = (Texture)loader.Load(info); //Then Assert.IsTrue(texture.Width == 1024); Assert.IsTrue(texture.Height == 1024); device.Dispose(); }