-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
45 lines (37 loc) · 1.01 KB
/
main.cpp
File metadata and controls
45 lines (37 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <iostream>
// #include "Adder/adder.h" // add_subdirectory()
#include <adder.h> // include_directories()
// #include "adder.h" // This will never work.
#include <GLFW/glfw3.h>
int main() {
std::cout << "Hello World!" << std::endl;
std::cout << adder(1.1, 2.2) << std::endl;
GLFWwindow* window;
int width, height;
if( !glfwInit() )
{
fprintf( stderr, "Failed to initialize GLFW\n" );
exit( EXIT_FAILURE );
}
glfwWindowHint(GLFW_DEPTH_BITS, 16);
glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_TRUE);
window = glfwCreateWindow( 300, 300, "Gears", NULL, NULL );
if (!window)
{
fprintf( stderr, "Failed to open GLFW window\n" );
glfwTerminate();
exit( EXIT_FAILURE );
}
// Main loop
while( !glfwWindowShouldClose(window) )
{
// Swap buffers
glfwSwapBuffers(window);
glfwPollEvents();
}
// Terminate GLFW
glfwTerminate();
// Exit program
exit( EXIT_SUCCESS );
return 0;
}