https://github.com/demfier/opengl-scripts
https://github.com/demfier/opengl-scripts
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/demfier/opengl-scripts
- Owner: Demfier
- Created: 2016-05-09T09:56:59.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-06-11T05:31:33.000Z (about 10 years ago)
- Last Synced: 2023-02-28T09:06:59.423Z (over 3 years ago)
- Language: C
- Size: 27.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.