Use Texture.CreateTexture* instead of using TextureCreateInfo
parent
eeb76ff9d5
commit
1148a00f29
|
@ -53,16 +53,14 @@ namespace MoonWorks.Test
|
|||
// Create and populate the GPU resources
|
||||
vertexBuffer = Buffer.Create<PositionTextureVertex>(GraphicsDevice, BufferUsageFlags.Vertex, 4);
|
||||
indexBuffer = Buffer.Create<ushort>(GraphicsDevice, BufferUsageFlags.Index, 6);
|
||||
rt = new Texture(GraphicsDevice, new TextureCreateInfo
|
||||
{
|
||||
Width = 16,
|
||||
Height = 16,
|
||||
Depth = (uint) colors.Length,
|
||||
Format = TextureFormat.R8G8B8A8,
|
||||
IsCube = false,
|
||||
LevelCount = 1,
|
||||
UsageFlags = TextureUsageFlags.ColorTarget | TextureUsageFlags.Sampler
|
||||
});
|
||||
rt = Texture.CreateTexture3D(
|
||||
GraphicsDevice,
|
||||
16,
|
||||
16,
|
||||
(uint) colors.Length,
|
||||
TextureFormat.R8G8B8A8,
|
||||
TextureUsageFlags.ColorTarget | TextureUsageFlags.Sampler
|
||||
);
|
||||
|
||||
CommandBuffer cmdbuf = GraphicsDevice.AcquireCommandBuffer();
|
||||
cmdbuf.SetBufferData(
|
||||
|
|
|
@ -49,16 +49,7 @@ namespace MoonWorks.Test
|
|||
// Create and populate the GPU resources
|
||||
vertexBuffer = Buffer.Create<PositionTextureVertex>(GraphicsDevice, BufferUsageFlags.Vertex, 4);
|
||||
indexBuffer = Buffer.Create<ushort>(GraphicsDevice, BufferUsageFlags.Index, 6);
|
||||
texture = new Texture(GraphicsDevice, new TextureCreateInfo
|
||||
{
|
||||
Width = 16,
|
||||
Height = 16,
|
||||
Depth = 7,
|
||||
Format = TextureFormat.R8G8B8A8,
|
||||
IsCube = false,
|
||||
LevelCount = 1,
|
||||
UsageFlags = TextureUsageFlags.Sampler
|
||||
});
|
||||
texture = Texture.CreateTexture3D(GraphicsDevice, 16, 16, 7, TextureFormat.R8G8B8A8, TextureUsageFlags.Sampler);
|
||||
|
||||
CommandBuffer cmdbuf = GraphicsDevice.AcquireCommandBuffer();
|
||||
cmdbuf.SetBufferData(
|
||||
|
|
|
@ -29,16 +29,7 @@ namespace MoonWorks.Test
|
|||
|
||||
// Create and populate the GPU resources
|
||||
vertexBuffer = Buffer.Create<PositionTextureVertex>(GraphicsDevice, BufferUsageFlags.Vertex, 3);
|
||||
texture = new Texture(GraphicsDevice, new TextureCreateInfo
|
||||
{
|
||||
Width = 3,
|
||||
Height = 1,
|
||||
Depth = 1,
|
||||
Format = TextureFormat.R8G8B8A8,
|
||||
IsCube = false,
|
||||
LevelCount = 1,
|
||||
UsageFlags = TextureUsageFlags.Sampler
|
||||
});
|
||||
texture = Texture.CreateTexture2D(GraphicsDevice, 3, 1, TextureFormat.R8G8B8A8, TextureUsageFlags.Sampler);
|
||||
sampler = new Sampler(GraphicsDevice, SamplerCreateInfo.PointClamp);
|
||||
|
||||
CommandBuffer cmdbuf = GraphicsDevice.AcquireCommandBuffer();
|
||||
|
|
Loading…
Reference in New Issue