startup
This commit is contained in:
parent
24cbbc56ce
commit
d753863596
1 changed files with 31 additions and 30 deletions
61
main.cpp
61
main.cpp
|
|
@ -1,39 +1,40 @@
|
|||
#include "vulkan/vulkan.h"
|
||||
|
||||
#define GLFW_INCLUDE_VULKAN
|
||||
#include "GLFW/glfw3.h"
|
||||
#include "iostream"
|
||||
#include "stdexcept"
|
||||
#include "cstdlib"
|
||||
|
||||
#define GLM_FORCE_RADIANS
|
||||
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
|
||||
#include "glm/vec4.hpp"
|
||||
#include "glm/mat4x4.hpp"
|
||||
class Application {
|
||||
public:
|
||||
void run() {
|
||||
initVulkan();
|
||||
mainLoop();
|
||||
cleanup();
|
||||
}
|
||||
|
||||
const int window_size_x = 800;
|
||||
const int window_size_y = 600;
|
||||
const char* window_title = "App";
|
||||
private:
|
||||
void initVulkan() {
|
||||
|
||||
}
|
||||
|
||||
void mainLoop() {
|
||||
|
||||
}
|
||||
|
||||
void cleanup() {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
int main() {
|
||||
Application app;
|
||||
|
||||
if (glfwInit() != GLFW_TRUE) {
|
||||
return 1;
|
||||
try {
|
||||
app.run();
|
||||
} catch (const std::exception& e) {
|
||||
std::cerr << e.what() << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
|
||||
GLFWwindow* window = glfwCreateWindow(window_size_x, window_size_y, window_title, nullptr, nullptr);
|
||||
|
||||
uint32_t extensionCount = 0;
|
||||
vkEnumerateInstanceExtensionProperties(nullptr, &extensionCount, nullptr);
|
||||
|
||||
glm::mat4 matrix;
|
||||
glm::vec4 vec;
|
||||
auto test = matrix * vec;
|
||||
|
||||
while(!glfwWindowShouldClose(window)) {
|
||||
glfwPollEvents();
|
||||
}
|
||||
|
||||
glfwDestroyWindow(window);
|
||||
|
||||
glfwTerminate();
|
||||
|
||||
return 0;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue