https://github.com/rswinkle/opengl_reference
Collection of modern OpenGL programs for reference and frameworks
https://github.com/rswinkle/opengl_reference
3d-graphics c cpp examples graphics graphics-library opengl
Last synced: 9 months ago
JSON representation
Collection of modern OpenGL programs for reference and frameworks
- Host: GitHub
- URL: https://github.com/rswinkle/opengl_reference
- Owner: rswinkle
- License: mit
- Created: 2016-02-25T02:29:33.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2024-06-05T22:56:04.000Z (almost 2 years ago)
- Last Synced: 2025-04-05T10:34:23.446Z (about 1 year ago)
- Topics: 3d-graphics, c, cpp, examples, graphics, graphics-library, opengl
- Language: C++
- Homepage: http://www.robertwinkler.com/projects/opengl_reference.html
- Size: 4.21 MB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
opengl_reference
================
This is going to be a repository of mostly modern (3.3/4.x) OpenGL programs.
Most of these will be either exploring/demonstrating concepts, testing
my own OpenGL helper libraries, or be framework/template programs for
starting new projects.
Actually I've started using this repo to create small programs to test
what is supposed to happen (assuming the drivers are obeying the spec
which isn't always a safe assumption) for various situations to help
me in developing PortableGL (and creating regression tests for it).
I think I'll reorganize the src directory with subdirectories for tests
and another for testing OpenGL ES behavior as well. PortableGL, while
mostly 3.x-ish already has some 4.x features and while I have always
said it was targeting a core profile that wasn't strictly accurate.
There's no reason not to be more compatible and support OpenGL ES features
as well where they make sense.
There are better repositories of modern OpenGL programs to
use for learning because they're more complete/organized,
they go with a book etc. However, this is mostly for my own
personal use/code and will be constantly changing. Writing
a bunch of OpenGL programs will also force me to learn glm
and finish my own OpenGL math/helper code.
Download
========
Get the source from [Github](https://github.com/rswinkle/opengl_reference).
The table below lists only a handful of the programs in this repo. Maybe
I'll split them up by category (templates/frameworks, feature examples, demos, "games") later.
Those listed use my own math library, rsw_math, but there are often glm versions as well, ie glm_modelviewer.cpp.
| Program | Description | Image |
| --- | --- | --- |
| ex1.c | Hello Triangle |  |
| ex2.c | Hello Interpolation |  |
| gears.c | Classic gears demo. Switch between polygon modes with p. |  |
| modelviewer.cpp | Load a model from ./media/models. Switch between Gouraud and Phong shading with s. Switch between polygon modes with p. |  |
| texturing.cpp | Switch between textures with 1, filtering modes with f, zoom/rotate with arrow keys |  |
| grass.cpp | Based on example in superbible, uses flying controls, WIP |  |
| point_sprites.c | Point Sprite example, uses multitexturing and discard keyword in fragment shader to "disolve" textured point. |  |
| sphereworld_color.cpp | Based on SphereWorld example from SB with ADS lighting, moving/rotating objects, with flying controls. |  |
| flying.cpp | Template with 6DOF flying controls ala Descent. Mouse + WASDQE + LShift + Space |  |
| left_handed.cpp | [OpenGL *is* left handed](https://stackoverflow.com/questions/5168163/is-the-opengl-coordinate-system-right-handed-or-left-handed/22675164#22675164). |  |