コード例 #1
0
ファイル: Program.cs プロジェクト: cweiss2911/VulkanBase
        private static void SetupVulkan()
        {
            mainForm = new MainForm(/**/ FormWindowState.Normal /*/FormWindowState.Maximized/**/);


            VContext.Instance = new VContext();
            Context           = VContext.Instance;
            Context.Init(mainForm.Handle);


            graphicsPipeline = new GenericGraphicsPipeline(
                new List <ShaderObject>()
            {
                new ShaderObject(@"..\..\BaseSampleShader\shader.vert"),
                new ShaderObject(@"..\..\BaseSampleShader\shader.frag"),
            }

                );

            Context.InitializeDescriptorPool(
                1,
                new Tuple <uint, DescriptorType>(1, DescriptorType.UniformBuffer)
                );

            SetupUniformMatrices();
            commandBuffer = Context.CreateCommandBuffer();
        }
コード例 #2
0
        public ShaderParsing()
        {
            mainForm = new Form()
            {
                FormBorderStyle = FormBorderStyle.None,
                /**/
                WindowState = FormWindowState.Normal,

                /*/
                 * WindowState = FormWindowState.Maximized,
                 * /**/
                Width  = 1024,
                Height = 768,
            };

            mainForm.KeyDown += (object sender, KeyEventArgs e) =>
            {
                if (e.KeyCode == Keys.Escape)
                {
                    mainForm.Close();
                }
            };



            VContext.Instance = new VContext();
            Context           = VContext.Instance;
            Context.Init(mainForm.Handle);

            Context.InitializeDescriptorPool(
                56,
                new Tuple <uint, DescriptorType>(1, DescriptorType.UniformBuffer),
                new Tuple <uint, DescriptorType>(50, DescriptorType.CombinedImageSampler),
                new Tuple <uint, DescriptorType>(1, DescriptorType.StorageImage),
                new Tuple <uint, DescriptorType>(1, DescriptorType.StorageBuffer)
                );
        }