-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInstallation_README
75 lines (63 loc) · 2.05 KB
/
Installation_README
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
----------------------------------------------------------------
DEPENDENCIES
----------------------------------------------------------------
Linux/Windows/ Mac OSX - Dependencies: (Recommended)
GLFW
GLAD
GLM
Linux - Dependencies: (alternative)
FreeGLUT
GLEW
GLM
----------------------------------------------------------------
INSTALLATION
----------------------------------------------------------------
GLFW:
- Install CMake
- Obtain & Extract the GLFW source code from
https://github.com/glfw/glfw/archive/master.zip
- Compile with below commands
$ cd glfw-master
$ mkdir build
$ cd build
$ cmake -DBUILD_SHARED_LIBS=ON ..
$ make && sudo make install
GLAD:
- Go to http://glad.dav1d.de
- Language: C/C++
Specification: OpenGL
gl: Version 4.5
gles1: Version 1.0
gles2: Version 3.2
Profile: Core
Select 'Add All' under extensions and click Generate.
- Download the zip file generated.
- Copy contents of include/ folder in the downloaded directory
to /usr/local/include/
- src/glad.c should be always compiled along with your OpenGL
code
GLM:
- Download the zip file from
https://github.com/g-truc/glm/releases/tag/0.9.7.2
- Unzip it and copy the folder glm/glm/ to /usr/local/include
Ubuntu users can also install these libraries using apt-get.
It is recommended to use GLFW+GLAD+GLM on all OSes.
FreeGLUT+GLEW+GLM can be used only on linux but not recommended.
Use apt-get to install FreeGLUT, libglew, glm on Linux.
---------------------------------------------------
Based on the your installation run the makefile in the GLFW or GLUT
If the system is linux then convert Makefile.linux to Makefile and run the make command
$mv Makefile.linux Makefile
$make
$./sample2D
Similarly for mac
----------------------------------------------------------------
DEMO CONTROLS
----------------------------------------------------------------
Keyboard:
c - toggle cube rotation
p - toggle pyramid rotation
q - quit
Mouse:
Left click - Change Pyramid rotation direction
Right click - Change the vector about which Cube rotates