An open API service indexing awesome lists of open source software.

https://github.com/demfier/opengl-scripts


https://github.com/demfier/opengl-scripts

Last synced: 8 months ago
JSON representation

Awesome Lists containing this project

README

          

# OpenGl-scripts

Hello guys,

This repo contains my OpenGl work that I've been learning for sometime now.

1.)Bounce3D : This script generates 3D balls bouncing on a platform.It has key controlled camera.Use the arrow keys to see the project at different angles.

2.)Light torus : Generates a controllable mesh.What I mean by that is you can control the quality of the mesh of a torus in real-time on the command of just a few key strokes.

3.)Moon: Generates a rotating sphere of the appearance of moon, showing the different phases of Moon.

4.)Teapot : Generates a teapot with a light source revolving around it,showing the different views of it accordingly.

5.)Torus : Generates a constantly rotating torus

## How to compile and run these files?

Compiling these files is really easy and done via a simple command in the terminal:

```c
gcc -o 'yourOutputFileName' 'theCFileName' -lGL -lGLU -lglut -lpthread -lm
```
for example if you wanted to check the **controlMesh.c**, the command would be:
```c
gcc -o controlTheMesh controlMesh.c -lGL -lGLU -lglut -lpthread -lm
```
this will create an executable file named *controlTheMesh* on your system. Just open and see the magic going.