Example #1
0
        public VulkanExample
        (
            IMgGraphicsConfiguration configuration,
            IMgSwapchainCollection swapchains,
            IMgGraphicsDevice graphicsDevice,
            IMgPresentationLayer presentationLayer,
            ITriangleDemoShaderPath shaderPath
        )
        {
            mConfiguration     = configuration;
            mSwapchains        = swapchains;
            mGraphicsDevice    = graphicsDevice;
            mPresentationLayer = presentationLayer;
            mTrianglePath      = shaderPath;

            mWidth  = 1280U;
            mHeight = 720U;

            try
            {
                mConfiguration.Initialize(mWidth, mHeight);
                InitSwapchain(mWidth, mHeight);
                Prepare();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #2
0
 public MgGraphicsConfigurationManager(
     IMgGraphicsConfiguration configuration,
     IMgSwapchainCollection swapchains,
     IMgGraphicsDevice graphicsDevice,
     IMgPresentationLayer presentationLayer
     )
 {
     mConfiguration     = configuration;
     mSwapchains        = swapchains;
     mGraphicsDevice    = graphicsDevice;
     mPresentationLayer = presentationLayer;
 }
Example #3
0
        public SpinningCube(
            IMgGraphicsConfiguration configuration,
            IMgSwapchainCollection swapchains,
            IMgGraphicsDevice graphicsDevice,
            IMgPresentationLayer presentationLayer
            )
        {
            mConfiguration     = configuration;
            mSwapchains        = swapchains;
            mGraphicsDevice    = graphicsDevice;
            mPresentationLayer = presentationLayer;

            mWidth  = 640;
            mHeight = 480;

            mConfiguration.Initialize(mWidth, mHeight);
            SetupGraphicsDevice();

            InitializeMesh();
            InitializeUniforms();
            InitializeRenderCommandBuffers();
            InitializeGraphicsPipeline();
        }