Skip to content

c2d7fa/opengl-cube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rotating Cube in OpenGL 4

This is a simple OpenGL 4.5 demo using GLEW and GLFW. It is written in pure C, and does not depend on any libraries for matrix manipulation.

I made this to learn about OpenGL. I used the following resources, all of which I recommend:

Building

This demo depends on GLEW and GLFW. You also need OpenGL 4.5 or later. (It would probably work in any version of OpenGL 4 if you edit the version directive in the shaders, but I haven't checked.)

Linux

Install GLEW and GLFW packages using your package manager, so that you have the liraries glfw, GLEW and GL available. Then execute the script run.sh, which will compile and run the application.

Windows

These instructions are for Visual Studio 2019. Start by importing the project into Visual Studio.

Start by downloading the prebuilt packages for GLEW and GLFW (or build them yoursef).

Each of these packages should contain an include directory which contains subdirectories with some header files. Add each of the include directories under VC++ Directories in the project properties.

Each package should also contain some .lib files. Add the directories with these library files in the same place.