Engine
Frameworkcreatedbymeusableforthecreationofsimplegames.CurrentlysupportsOpenGL(Verysimple)andVulkan.
VulkanWindow.cpp
Go to the documentation of this file.
2 #ifdef USING_VULKAN
4 #include "Engine/engine.hpp"
6 
7 VkSurfaceKHR Engine::VulkanWindow::CreateSurface(VkInstance instance)
8 {
9  glfwCreateWindowSurface(instance, window.get(), nullptr, &surface);
10  return surface;
11 }
12 
13 Engine::VulkanWindow::VulkanWindow(int width, int height, const char* title) noexcept : surface(0)
14 {
15  glfwInit();
16  glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
17  windowReference = eastl::shared_ptr<Window>(new Window(width, height, title));
18 
19  window = windowReference->GetGLFWWindow().lock();
20  this->width = windowReference->GetWidth();
21  this->height = windowReference->GetHeight();
22  this->title = windowReference->GetTitle();
23 }
24 #endif