Program() { //UpdateFrequency = 20; camera.SetPosition(0, 0, 5); vkvgDev = new vkvg.Device(instance.Handle, phy.Handle, dev.VkDev.Handle, presentQueue.qFamIndex, vkvg.SampleCount.Sample_4, presentQueue.index); initUISurface(); pbrPipeline = new PBRPipeline(presentQueue, new RenderPass(dev, swapChain.ColorFormat, dev.GetSuitableDepthFormat(), samples), uiImage); initUIPipeline(); modelAABB = pbrPipeline.model.DefaultScene.AABB; //camera.Model = Matrix4x4.CreateScale (1f/ Math.Max (Math.Max (modelAABB.max.X, modelAABB.max.Y), modelAABB.max.Z)); #if PIPELINE_STATS statPool = new PipelineStatisticsQueryPool(dev, VkQueryPipelineStatisticFlags.InputAssemblyVertices | VkQueryPipelineStatisticFlags.InputAssemblyPrimitives | VkQueryPipelineStatisticFlags.ClippingInvocations | VkQueryPipelineStatisticFlags.ClippingPrimitives | VkQueryPipelineStatisticFlags.FragmentShaderInvocations); timestampQPool = new TimestampQueryPool(dev); #endif }
protected override void initVulkan() { base.initVulkan(); //UpdateFrequency = 20; camera = new Camera(Utils.DegreesToRadians(45f), 1f, 0.1f, 64f); camera.SetPosition(0, 0, -2); pbrPipeline = new PBRPipeline(presentQueue, new RenderPass(dev, swapChain.ColorFormat, dev.GetSuitableDepthFormat(), samples), vke.samples.Utils.CubeMaps[0]); loadCurrentModel(); }