Browse Source

no message

Hongtae Kim 6 years ago
parent
commit
0c99425fcd
1 changed files with 7 additions and 2 deletions
  1. 7
    2
      TestApp1/TestApp1.cpp

+ 7
- 2
TestApp1/TestApp1.cpp View File

60
 		pipelineDescriptor.fragmentFunction = fragShaderFunction;
60
 		pipelineDescriptor.fragmentFunction = fragShaderFunction;
61
 		pipelineDescriptor.colorAttachments.Resize(1);
61
 		pipelineDescriptor.colorAttachments.Resize(1);
62
 		pipelineDescriptor.colorAttachments.Value(0).pixelFormat = swapChain->ColorPixelFormat();
62
 		pipelineDescriptor.colorAttachments.Value(0).pixelFormat = swapChain->ColorPixelFormat();
63
-		pipelineDescriptor.rasterizationEnabled = true;
64
-		pipelineDescriptor.primitiveTopology = DKPrimitiveTopology::Triangles;
63
+		pipelineDescriptor.depthStencilAttachmentPixelFormat = DKPixelFormat::Invalid; // no depth buffer
65
 		pipelineDescriptor.vertexDescriptor.attributes = {
64
 		pipelineDescriptor.vertexDescriptor.attributes = {
66
 			{ DKVertexFormat::Float3, 0, 0, 0 },
65
 			{ DKVertexFormat::Float3, 0, 0, 0 },
67
 			{ DKVertexFormat::Float3, sizeof(DKVector3), 0, 1 },
66
 			{ DKVertexFormat::Float3, sizeof(DKVector3), 0, 1 },
69
 		pipelineDescriptor.vertexDescriptor.layouts = {
68
 		pipelineDescriptor.vertexDescriptor.layouts = {
70
 			{ DKVertexStepRate::Vertex, sizeof(Vertex), 0 },
69
 			{ DKVertexStepRate::Vertex, sizeof(Vertex), 0 },
71
 		};
70
 		};
71
+		pipelineDescriptor.primitiveTopology = DKPrimitiveType::Triangle;
72
+		pipelineDescriptor.frontFace = DKFrontFace::CCW;
73
+		pipelineDescriptor.triangleFillMode = DKTriangleFillMode::Fill;
74
+		pipelineDescriptor.depthClipMode = DKDepthClipMode::Clip;
75
+		pipelineDescriptor.cullMode = DKCullMode::None;
76
+		pipelineDescriptor.rasterizationEnabled = true;
72
 
77
 
73
 		DKObject<DKRenderPipelineState> pipelineState = device->CreateRenderPipeline(pipelineDescriptor, NULL);
78
 		DKObject<DKRenderPipelineState> pipelineState = device->CreateRenderPipeline(pipelineDescriptor, NULL);
74
 
79