API update
parent
1d4cf2e23a
commit
2981db7144
|
@ -1 +1 @@
|
|||
Subproject commit d10f018f141d9246f2c438e889c2ab3ec0d2716c
|
||||
Subproject commit c65485a31ca526a4a3dc24b3eadbc9a1dc61daa9
|
Binary file not shown.
|
@ -57,7 +57,7 @@ namespace MoonWorksTest
|
|||
woodTexture = Texture.LoadPNG(GraphicsDevice, new System.IO.FileInfo("Content/woodgrain.png"));
|
||||
noiseTexture = Texture.LoadPNG(GraphicsDevice, new System.IO.FileInfo("Content/noise.png"));
|
||||
|
||||
sampler = new Sampler(GraphicsDevice, SamplerState.LinearWrap);
|
||||
sampler = new Sampler(GraphicsDevice, SamplerCreateInfo.LinearWrap);
|
||||
|
||||
/* Load Vertex Data */
|
||||
|
||||
|
@ -85,15 +85,15 @@ namespace MoonWorksTest
|
|||
|
||||
/* Render Pass */
|
||||
|
||||
renderArea.x = 0;
|
||||
renderArea.y = 0;
|
||||
renderArea.w = (int) windowWidth;
|
||||
renderArea.h = (int) windowHeight;
|
||||
renderArea.X = 0;
|
||||
renderArea.Y = 0;
|
||||
renderArea.W = (int) windowWidth;
|
||||
renderArea.H = (int) windowHeight;
|
||||
|
||||
flip.x = 0;
|
||||
flip.y = (int) windowHeight;
|
||||
flip.w = (int) windowWidth;
|
||||
flip.h = -(int) windowHeight;
|
||||
flip.X = 0;
|
||||
flip.Y = (int) windowHeight;
|
||||
flip.W = (int) windowWidth;
|
||||
flip.H = -(int) windowHeight;
|
||||
|
||||
clearColor.R = 237;
|
||||
clearColor.G = 41;
|
||||
|
@ -102,10 +102,10 @@ namespace MoonWorksTest
|
|||
|
||||
ColorTargetDescription colorTargetDescription = new ColorTargetDescription
|
||||
{
|
||||
format = TextureFormat.R8G8B8A8,
|
||||
multisampleCount = SampleCount.One,
|
||||
loadOp = LoadOp.Clear,
|
||||
storeOp = StoreOp.Store
|
||||
Format = TextureFormat.R8G8B8A8,
|
||||
MultisampleCount = SampleCount.One,
|
||||
LoadOp = LoadOp.Clear,
|
||||
StoreOp = StoreOp.Store
|
||||
};
|
||||
|
||||
mainRenderPass = new RenderPass(GraphicsDevice, colorTargetDescription);
|
||||
|
@ -163,7 +163,7 @@ namespace MoonWorksTest
|
|||
|
||||
MultisampleState multisampleState = MultisampleState.None;
|
||||
|
||||
GraphicsPipelineLayoutCreateInfo pipelineLayoutCreateInfo = new GraphicsPipelineLayoutCreateInfo
|
||||
GraphicsPipelineLayoutInfo pipelineLayoutInfo = new GraphicsPipelineLayoutInfo
|
||||
{
|
||||
VertexSamplerBindingCount = 0,
|
||||
FragmentSamplerBindingCount = 2
|
||||
|
@ -175,9 +175,9 @@ namespace MoonWorksTest
|
|||
{
|
||||
new VertexBinding
|
||||
{
|
||||
binding = 0,
|
||||
inputRate = VertexInputRate.Vertex,
|
||||
stride = 4 * 5
|
||||
Binding = 0,
|
||||
InputRate = VertexInputRate.Vertex,
|
||||
Stride = 4 * 5
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -185,17 +185,17 @@ namespace MoonWorksTest
|
|||
{
|
||||
new VertexAttribute
|
||||
{
|
||||
binding = 0,
|
||||
location = 0,
|
||||
format = VertexElementFormat.Vector3,
|
||||
offset = 0
|
||||
Binding = 0,
|
||||
Location = 0,
|
||||
Format = VertexElementFormat.Vector3,
|
||||
Offset = 0
|
||||
},
|
||||
new VertexAttribute
|
||||
{
|
||||
binding = 0,
|
||||
location = 1,
|
||||
format = VertexElementFormat.Vector2,
|
||||
offset = 4 * 3
|
||||
Binding = 0,
|
||||
Location = 1,
|
||||
Format = VertexElementFormat.Vector2,
|
||||
Offset = 4 * 3
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -209,12 +209,12 @@ namespace MoonWorksTest
|
|||
{
|
||||
new Viewport
|
||||
{
|
||||
x = 0,
|
||||
y = 0,
|
||||
w = windowWidth,
|
||||
h = windowHeight,
|
||||
minDepth = 0,
|
||||
maxDepth = 1
|
||||
X = 0,
|
||||
Y = 0,
|
||||
W = windowWidth,
|
||||
H = windowHeight,
|
||||
MinDepth = 0,
|
||||
MaxDepth = 1
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -222,10 +222,10 @@ namespace MoonWorksTest
|
|||
{
|
||||
new Rect
|
||||
{
|
||||
x = 0,
|
||||
y = 0,
|
||||
w = (int) windowWidth,
|
||||
h = (int) windowHeight
|
||||
X = 0,
|
||||
Y = 0,
|
||||
W = (int) windowWidth,
|
||||
H = (int) windowHeight
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -235,19 +235,24 @@ namespace MoonWorksTest
|
|||
Scissors = scissors
|
||||
};
|
||||
|
||||
var graphicsPipelineCreateInfo = new GraphicsPipelineCreateInfo
|
||||
{
|
||||
ColorBlendState = colorBlendState,
|
||||
DepthStencilState = depthStencilState,
|
||||
VertexShaderState = vertexShaderState,
|
||||
FragmentShaderState = fragmentShaderState,
|
||||
MultisampleState = multisampleState,
|
||||
PipelineLayoutInfo = pipelineLayoutInfo,
|
||||
RasterizerState = rasterizerState,
|
||||
PrimitiveType = PrimitiveType.TriangleList,
|
||||
VertexInputState = vertexInputState,
|
||||
ViewportState = viewportState,
|
||||
RenderPass = mainRenderPass
|
||||
};
|
||||
|
||||
mainGraphicsPipeline = new GraphicsPipeline(
|
||||
GraphicsDevice,
|
||||
colorBlendState,
|
||||
depthStencilState,
|
||||
vertexShaderState,
|
||||
fragmentShaderState,
|
||||
multisampleState,
|
||||
pipelineLayoutCreateInfo,
|
||||
rasterizerState,
|
||||
PrimitiveType.TriangleList,
|
||||
vertexInputState,
|
||||
viewportState,
|
||||
mainRenderPass
|
||||
graphicsPipelineCreateInfo
|
||||
);
|
||||
|
||||
screenShotBufferSize = windowWidth * windowHeight * 4;
|
||||
|
|
Loading…
Reference in New Issue