bool VulkanCommon::PrepareVulkan( OS::WindowParameters parameters ) {
    Window = parameters;

    if( !LoadVulkanLibrary() ) {
      return false;
    }
    if( !LoadExportedEntryPoints() ) {
      return false;
    }
    if( !LoadGlobalLevelEntryPoints() ) {
      return false;
    }
    if( !CreateInstance() ) {
      return false;
    }
    if( !LoadInstanceLevelEntryPoints() ) {
      return false;
    }
    if( !CreatePresentationSurface() ) {
      return false;
    }
    if( !CreateDevice() ) {
      return false;
    }
    if( !LoadDeviceLevelEntryPoints() ) {
      return false;
    }
    if( !GetDeviceQueue() ) {
      return false;
    }
    if( !CreateSwapChain() ) {
      return false;
    }
    return true;
  }
Ejemplo n.º 2
0
void GraphicsVk::Init(PresentationSurfaceCreateData &surfaceData)
{
  InitInstance();
  _presentationSurface = std::unique_ptr<PresentationSurfaceVk>(static_cast<PresentationSurfaceVk*>(CreatePresentationSurface(surfaceData)));
  InitPhysicalDevice(&*_presentationSurface);
  _device = std::make_unique<DeviceVk>(&*_physicalDevice);
  _presentationSurface->InitForDevice(&*_device);
}