Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/turriform/opengl_cube
https://github.com/turriform/opengl_cube
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/turriform/opengl_cube
- Owner: turriform
- Created: 2024-09-11T23:25:29.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-12T04:05:22.000Z (4 months ago)
- Last Synced: 2024-09-12T13:27:05.894Z (4 months ago)
- Language: C
- Size: 1.09 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
### opengl rotating cube
uses:
cglm for math,
glad for opengl 4.5
sdl2 for window
```bash
./bin/prog
ESC
```looks like this:
![opengl cube](https://github.com/turriform/opengl_cube/blob/main/cube.png)
outputs this:
```
SDL init ok
Window Set up ok
Context createdOpenGL info context information
Vendor Mesa/X.org
Version 4.5 (Core Profile) Mesa 22.3.6
Renderer llvmpipe (LLVM 15.0.6, 128 bits)
Shading language v 4.50fullpath ./shaders/vertex.glsl
Shader size 331
Shader compiled
fullpath ./shaders/fragment.glsl
Shader size 114
Shader compiledShader linked
World
Matrix (float4x4):
| 0.69206 0.12318 0.71125 0.00000 |
| 0.12318 0.95073 -0.28450 0.00000 |
| -0.71125 0.28450 0.64279 0.00000 |
| 0.00000 0.00000 0.00000 1.00000 |View
Matrix (float4x4):
| 1.00000 0.00000 0.00000 0.00000 |
| 0.00000 1.00000 0.00000 0.00000 |
| 0.00000 0.00000 1.00000 -7.00000 |
| 0.00000 0.00000 0.00000 1.00000 |Perspective
Matrix (float4x4):
| 1.73205 0.00000 0.00000 0.00000 |
| 0.00000 1.73205 0.00000 0.00000 |
| 0.00000 0.00000 -1.02020 -0.20202 |
| 0.00000 0.00000 -1.00000 0.00000 |End of loop
SDL quit
```