示例#1
0
 public OpenGLPipeline(OpenGLGraphicsDevice gd, ref ComputePipelineDescription description)
 {
     _gd = gd;
     IsComputePipeline  = true;
     ComputeDescription = description;
     VertexStrides      = Array.Empty <int>();
 }
示例#2
0
 public OpenGLPipeline(OpenGLGraphicsDevice gd, ref ComputePipelineDescription description)
     : base(ref description)
 {
     _gd = gd;
     IsComputePipeline = true;
     ComputeShader     = description.ComputeShader;
     VertexStrides     = Array.Empty <int>();
     ResourceLayouts   = Util.ShallowClone(description.ResourceLayouts);
 }
示例#3
0
        public OpenGLPipeline(OpenGLGraphicsDevice gd, ref GraphicsPipelineDescription description)
        {
            _gd = gd;
            GraphicsDescription = description;

            int numVertexBuffers = description.ShaderSet.VertexLayouts.Length;

            VertexStrides = new int[numVertexBuffers];
            for (int i = 0; i < numVertexBuffers; i++)
            {
                VertexStrides[i] = (int)description.ShaderSet.VertexLayouts[i].Stride;
            }
        }
示例#4
0
        public OpenGLPipeline(OpenGLGraphicsDevice gd, ref GraphicsPipelineDescription description)
            : base(ref description)
        {
            _gd               = gd;
            GraphicsShaders   = Util.ShallowClone(description.ShaderSet.Shaders);
            VertexLayouts     = Util.ShallowClone(description.ShaderSet.VertexLayouts);
            BlendState        = description.BlendState.ShallowClone();
            DepthStencilState = description.DepthStencilState;
            RasterizerState   = description.RasterizerState;
            PrimitiveTopology = description.PrimitiveTopology;

            int numVertexBuffers = description.ShaderSet.VertexLayouts.Length;

            VertexStrides = new int[numVertexBuffers];
            for (int i = 0; i < numVertexBuffers; i++)
            {
                VertexStrides[i] = (int)description.ShaderSet.VertexLayouts[i].Stride;
            }

            ResourceLayouts = Util.ShallowClone(description.ResourceLayouts);
        }
示例#5
0
 public OpenGLCommandList(OpenGLGraphicsDevice gd, ref CommandListDescription description)
     : base(ref description, gd.Features, gd.UniformBufferMinOffsetAlignment, gd.StructuredBufferMinOffsetAlignment)
 {
     _gd = gd;
 }
示例#6
0
 public unsafe OpenGLResourceFactory(OpenGLGraphicsDevice gd)
 {
     _gd = gd;
 }
示例#7
0
 public OpenGLCommandList(OpenGLGraphicsDevice gd, ref CommandListDescription description)
     : base(ref description, gd.Features)
 {
     _gd = gd;
 }
示例#8
0
 public unsafe OpenGLResourceFactory(OpenGLGraphicsDevice gd)
     : base(gd.Features)
 {
     _gd   = gd;
     _pool = gd.StagingMemoryPool;
 }
 public unsafe OpenGLResourceFactory(OpenGLGraphicsDevice gd)
     : base(gd.Features)
 {
     _gd = gd;
 }