-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtutorial1.cpp
More file actions
44 lines (35 loc) · 802 Bytes
/
tutorial1.cpp
File metadata and controls
44 lines (35 loc) · 802 Bytes
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
//
// main.cpp
// sample
// 空の黒い画面を表示する
//
// Created by 伊藤皓程 on 2015/07/20.
// Copyright (c) 2015年 伊藤皓程. All rights reserved.
//
//#define GLFW_DLL
#include <GL/glfw.h>
#include <cstdlib>
#if defined (_MSC_VER)
#pragma comment(lib, "GLFWDLL.lib")
#pragma comment(lib, "opengl32.lib")
#endif
int main(){
if(!glfwInit()){
return EXIT_FAILURE;
}
if(!glfwOpenWindow(0, 0,
0, 0, 0,
0,
0, 0,
GLFW_WINDOW)
){
glfwTerminate();
return EXIT_FAILURE;
}
glfwSwapInterval(1);
while(glfwGetWindowParam(GLFW_OPENED)){
glfwSwapBuffers();
}
glfwTerminate();
return EXIT_SUCCESS;
}