feature/imgui-sdl
points-test
Last change
on this file since 71876b9 was 03f4c64, checked in by Dmitry Portnoy <dmp1488@…>, 6 years ago |
Create an initial program and makefile config that uses Vulkan
|
-
Property mode
set to
100644
|
File size:
951 bytes
|
Line | |
---|
1 | #define GLFW_INCLUDE_VULKAN
|
---|
2 | #include <GLFW/glfw3.h>
|
---|
3 |
|
---|
4 | #define _USE_MATH_DEFINES // Will be needed when/if I need to # include <cmath>
|
---|
5 |
|
---|
6 | #define GLM_FORCE_RADIANS
|
---|
7 | #define GLM_FORCE_DEPTH_ZERO_TO_ONE
|
---|
8 | #include <glm/vec4.hpp>
|
---|
9 | #include <glm/mat4x4.hpp>
|
---|
10 |
|
---|
11 | #include <iostream>
|
---|
12 |
|
---|
13 | using namespace std;
|
---|
14 | using namespace glm;
|
---|
15 |
|
---|
16 | int main(int argc, char* argv[]) {
|
---|
17 | cout << "Starting Vulkan game..." << endl;
|
---|
18 |
|
---|
19 | glfwInit();
|
---|
20 |
|
---|
21 | glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
|
---|
22 | GLFWwindow* window = glfwCreateWindow(800, 600, "Vulkan window", nullptr, nullptr);
|
---|
23 |
|
---|
24 | uint32_t extensionCount = 0;
|
---|
25 | vkEnumerateInstanceExtensionProperties(nullptr, &extensionCount, nullptr);
|
---|
26 |
|
---|
27 | cout << extensionCount << " extensions supported" << endl;
|
---|
28 |
|
---|
29 | mat4 matrix;
|
---|
30 | vec4 vec;
|
---|
31 | vec4 test = matrix * vec;
|
---|
32 |
|
---|
33 | while (!glfwWindowShouldClose(window)) {
|
---|
34 | glfwPollEvents();
|
---|
35 | }
|
---|
36 |
|
---|
37 | glfwDestroyWindow(window);
|
---|
38 |
|
---|
39 | glfwTerminate();
|
---|
40 |
|
---|
41 | cout << "Finished" << endl;
|
---|
42 |
|
---|
43 | exit(0);
|
---|
44 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.