Esempio n. 1
0
 /// <summary>
 /// Creates a new graphics pipeline
 /// </summary>
 /// <param name="device">Glob device</param>
 /// <param name="vertex">Vertex shader</param>
 /// <param name="tesselationControl">Tesselation control shader - can be null</param>
 /// <param name="tesselationEvaluation">Tesselation evaluation shader - can be null</param>
 /// <param name="geometry">Geometry shader - can be null</param>
 /// <param name="fragment">Fragment shader</param>
 /// <param name="vertexFormat">Vertex buffer format - can be null</param>
 /// <param name="rasterizerState">Rasterization state - cull face and polygon mode</param>
 /// <param name="depthState">Depth state - depth test func and depth mask</param>
 /// <param name="blendState">Blend state - color/alpha blending mode - can be null</param>
 public GraphicsPipeline(Device device, Shader vertex, Shader fragment, Shader tesselationControl, Shader tesselationEvaluation, Shader geometry, VertexBufferFormat vertexFormat, RasterizerState rasterizerState, DepthState depthState, BlendState blendState = null)
 {
     _device          = device;
     _shaderPipeline  = _device.ShaderRepository.GetShaderPipeline(vertex, tesselationControl, tesselationEvaluation, geometry, fragment, null);
     _vertexFormat    = vertexFormat;
     _rasterizerState = rasterizerState;
     _depthState      = depthState;
     _blendState      = blendState;
     if (_blendState == null)
     {
         _blendState = new BlendState();
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Creates a new graphics pipeline
 /// </summary>
 /// <param name="device">Glob device</param>
 /// <param name="vertex">Vertex shader</param>
 /// <param name="fragment">Fragment shader</param>
 /// <param name="vertexFormat">Vertex buffer format - can be null</param>
 /// <param name="rasterizerState">Rasterization state - cull face and polygon mode</param>
 /// <param name="depthState">Depth state - depth test func and depth mask</param>
 /// <param name="blendState">Blend state - color/alpha blending mode - can be null</param>
 public GraphicsPipeline(Device device, Shader vertex, Shader fragment, VertexBufferFormat vertexFormat, RasterizerState rasterizerState, DepthState depthState, BlendState blendState = null)
     : this(device, vertex, fragment, null, null, null, vertexFormat, rasterizerState, depthState, blendState)
 {
 }