https://github.com/tsoding/opengl-template
Just a simple OpenGL template that I use on my streams.
https://github.com/tsoding/opengl-template
Last synced: 8 months ago
JSON representation
Just a simple OpenGL template that I use on my streams.
- Host: GitHub
- URL: https://github.com/tsoding/opengl-template
- Owner: tsoding
- License: mit
- Created: 2021-02-12T12:50:48.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-28T22:37:18.000Z (almost 3 years ago)
- Last Synced: 2023-05-31T04:12:34.349Z (over 2 years ago)
- Language: C
- Size: 523 KB
- Stars: 64
- Watchers: 7
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenGL Template
Just a simple OpenGL template that I use on my streams.
## Controls
| Shortcut | Description |
|--------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|
| q | Quit |
| F5 | Reload [render.conf](./render.conf) and all the resources refered by it. Red screen indicates an error, check the output of the program if you see it. |
| F6 | Make a screenshot. |
| SPACE | Pause/unpause the time uniform variable in shaders |
| ←→ | In pause mode step back/forth in time. |
## Shader Uniforms
| Name | Type | Description |
|--------------|-------------|--------------------------------------------------------------------------------------|
| `resolution` | `vec2` | Current resolution of the screen in pixels |
| `time` | `float` | Amount of time passed since the beginning of the application when it was not paused. |
| `mouse` | `vec2` | Position of the mouse on the screen in pixels |
| `tex` | `sampler2D` | Current texture |