bool HookGui::HGWidgetShader::Initialize(VulkanWrapper::Context* _graphicContext) { // Get the model manager VulkanWrapper::ModelManager* modelManager = _graphicContext->GetModelManager(); // Request our widget model object modelManager->RequestObject(&m_WidgetModel, "square"); // Create the instance buffer CreateInstanceBuffer(_graphicContext); // Create the uniform buffer CreateUniformBuffer(_graphicContext); // Create the descriptor set CreateDescriptorSet(_graphicContext); // Create our render pass CreateRenderPass(_graphicContext); // Create the graphic pipeline CreateGraphicsPipeline(_graphicContext); // Create the frame buffers CreateFramebuffers(_graphicContext->GetGraphicInstance(), _graphicContext->GetSwapChain(), m_Framebuffers, m_RenderPass); // Create the command buffer m_CommandBuffer = VWShaderBase::CreateCommandBuffer(_graphicContext, VK_COMMAND_BUFFER_LEVEL_PRIMARY, VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT); return true; }
bool Tutorial03::ChildOnWindowSizeChanged() { if( !CreateRenderPass() ) { return false; } if( !CreateFramebuffers() ) { return false; } if( !CreatePipeline() ) { return false; } if( !CreateCommandBuffers() ) { return false; } if( !RecordCommandBuffers() ) { return false; } return true; }