vulkan instance 까지 생성 완료
This commit is contained in:
12
include/glfw/glfw_initialization.h
Normal file
12
include/glfw/glfw_initialization.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
namespace veng {
|
||||
struct GlfwInitialization {
|
||||
public:
|
||||
GlfwInitialization();
|
||||
~GlfwInitialization();
|
||||
|
||||
GlfwInitialization(const GlfwInitialization&) = delete;
|
||||
GlfwInitialization& operator=(const GlfwInitialization&) = delete;
|
||||
};
|
||||
} // namespace veng
|
||||
12
include/glfw/glfw_monitor.h
Normal file
12
include/glfw/glfw_monitor.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
struct GLFWmonitor;
|
||||
struct GLFWwindow;
|
||||
|
||||
namespace veng {
|
||||
gsl::span<GLFWmonitor *> GetMonitors();
|
||||
glm::ivec2 GetMonitorPosition(gsl::not_null<GLFWmonitor *> monitor);
|
||||
glm::ivec2 GetMonitorWorkAreaSize(gsl::not_null<GLFWmonitor *> monitor);
|
||||
void MoveWindowToMonitor(gsl::not_null<GLFWwindow *> window,
|
||||
gsl::not_null<GLFWmonitor *> monitor);
|
||||
} // namespace veng
|
||||
21
include/glfw/glfw_window.h
Normal file
21
include/glfw/glfw_window.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
struct GLFWmonitor;
|
||||
struct GLFWwindow;
|
||||
|
||||
namespace veng {
|
||||
class Window {
|
||||
public:
|
||||
Window(gsl::czstring name, glm::ivec2 size);
|
||||
~Window();
|
||||
|
||||
glm::ivec2 GetWindowSize() const;
|
||||
bool ShouldClose() const;
|
||||
GLFWwindow* GetHandle() const;
|
||||
|
||||
bool TryMoveToMonitor(std::uint16_t monitor_number);
|
||||
|
||||
private:
|
||||
GLFWwindow* window_;
|
||||
};
|
||||
} // namespace veng
|
||||
8
include/precomp.h
Normal file
8
include/precomp.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <glm/glm.hpp>
|
||||
#include <gsl/gsl>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
20
include/vulkan/graphics.h
Normal file
20
include/vulkan/graphics.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
#include <vulkan/vulkan.h>
|
||||
#include "glfw/glfw_window.h"
|
||||
|
||||
namespace veng {
|
||||
class Graphics final {
|
||||
public:
|
||||
Graphics(gsl::not_null<Window *> window);
|
||||
~Graphics();
|
||||
|
||||
private:
|
||||
void InitializeVulkan();
|
||||
void CreateInstance();
|
||||
|
||||
gsl::span<gsl::czstring> GetSuggestedExtentions();
|
||||
|
||||
VkInstance instance_ = nullptr;
|
||||
gsl::not_null<Window *> window_;
|
||||
};
|
||||
} // namespace veng
|
||||
Reference in New Issue
Block a user