示例#1
0
        public void SetProgramID(MgPipelineBindPoint bindpoint, int programId, GLInternalCache layoutCache, IGLPipelineLayout pipelineLayout)
        {
            if (mProgramID != programId)
            {
                mProgramID = programId;
                mEntrypoint.BindProgram(mProgramID);
                BoundInternalCache  = layoutCache;
                BoundPipelineLayout = pipelineLayout;

                SetupPipelineUniformBlocks();
                SetupUniformBufferSlots();

                var index = GetDescriptorSetIndex(bindpoint);
                BindDescriptorSets(mBoundDescriptorSets[index]);
            }
        }
示例#2
0
        public Result CreateGraphicsPipelines(IMgPipelineCache pipelineCache, MgGraphicsPipelineCreateInfo[] pCreateInfos, IMgAllocationCallbacks allocator, out IMgPipeline[] pPipelines)
        {
            var noOfPipelines = pCreateInfos.Length;

            pPipelines = new IMgPipeline[noOfPipelines];
            for (var i = 0; i < noOfPipelines; i += 1)
            {
                var createInfo = pCreateInfos[i];

                var bLayout = (IGLPipelineLayout)createInfo.Layout;

                var programId = 0;
                IGLShaderModuleInspector inspector = null;

                var blocks      = inspector.Inspect(programId);
                var arrayMapper = new GLInternalCacheArrayMapper(bLayout, blocks);
                var cache       = new GLInternalCache(bLayout, blocks, arrayMapper);
            }

            return(Result.SUCCESS);
        }