OpenGL: Difference between revisions
m (→OpenGL in Oni: linking to our documentation of Oni's erstwhile lightmapping, and wiki-linking a definition for Gouraud) |
m (replacing 404 link with archive link) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
OpenGL is what Oni uses for rendering in-game components as well as the menu system and splashscreens – basically everything you see, except for those dialogs and window elements that are handled directly by the operating system (e.g., "[[Troubleshooting/Blam|Blam]]"). | OpenGL is what Oni uses for rendering in-game components as well as the menu system and splashscreens – basically everything you see, except for those dialogs and window elements that are handled directly by the operating system (e.g., "[[Troubleshooting/Blam|Blam]]"). | ||
Oni's development in the late '90s corresponds to an era when GFX hardware was booming<ref>Quake (1996) is | Oni's development in the late '90s corresponds to an era when GFX hardware was booming<ref>Quake (1996) is [http://web.archive.org/web/20220515195126/https://popculthq.com/2018/02/26/evolution-polygons-3d-video-game-graphics/ widely regarded] as having played a key part in the breakthrough of real-time 3D technology in the late '90s. See [[wp:First-person_shooter|First-person shooter]] (Wikipedia) for a more detailed account citing other noteworthy games such as Half-Life (1998).</ref>, but the compatibility standards of such frameworks as OpenGL were still emergent. Starting with OpenGL 1.2.1 (October 1998), new OpenGL features were subject to approval by the Architecture Review Board (the "ARB extensions" concept), based on wide enough availability and reliability on the hardware side. Multitexturing ("GL_ARB_multitexture") was the only extension officially introduced by the OpenGL 1.2.1 spec (section F.2), but other extensions were gradually added on the way to OpenGL 1.3 (August 2001). | ||
==OpenGL in Oni== | ==OpenGL in Oni== | ||
Line 13: | Line 13: | ||
==Learning OpenGL== | ==Learning OpenGL== | ||
If you are looking for an introduction to modern OpenGL, with shaders and such, then [http://www.opengl-tutorial.org/ opengl-tutorial.org] is a good place to look. [https://www.3dgep.com/introduction-to-opengl-and-glsl/#OpenGL_1x_Fixed-Function_Pipeline THIS] mini-tutorial is also a good place to start, as it fully details the creation of an interactive OpenGL/freeglut app (however, | If you are looking for an introduction to modern OpenGL, with shaders and such, then [http://www.opengl-tutorial.org/ opengl-tutorial.org] is a good place to look. [http://web.archive.org/web/20221114170719/https://www.3dgep.com/introduction-to-opengl-and-glsl/#OpenGL_1x_Fixed-Function_Pipeline THIS] mini-tutorial is also a good place to start, as it fully details the creation of an interactive OpenGL/freeglut app (however, the camera class used by the author is no longer available for download). | ||
If you are more specifically interested in normal mapping, then a really neat GLSL snippet can be found [http://www.geeks3d.com/20130122/normal-mapping-without-precomputed-tangent-space-vectors/ HERE] (an implementation of normal mapping that uses no precomputed TBN matrices and does all the tangent space math at shader level). | If you are more specifically interested in normal mapping, then a really neat GLSL snippet can be found [http://www.geeks3d.com/20130122/normal-mapping-without-precomputed-tangent-space-vectors/ HERE] (an implementation of normal mapping that uses no precomputed TBN matrices and does all the tangent space math at shader level). |
Latest revision as of 14:39, 5 March 2023
OpenGL is what Oni uses for rendering in-game components as well as the menu system and splashscreens – basically everything you see, except for those dialogs and window elements that are handled directly by the operating system (e.g., "Blam").
Oni's development in the late '90s corresponds to an era when GFX hardware was booming[1], but the compatibility standards of such frameworks as OpenGL were still emergent. Starting with OpenGL 1.2.1 (October 1998), new OpenGL features were subject to approval by the Architecture Review Board (the "ARB extensions" concept), based on wide enough availability and reliability on the hardware side. Multitexturing ("GL_ARB_multitexture") was the only extension officially introduced by the OpenGL 1.2.1 spec (section F.2), but other extensions were gradually added on the way to OpenGL 1.3 (August 2001).
OpenGL in Oni
Oni's release predates OpenGL 1.3 only slightly, so most if not all of the new ARB extensions from the OpenGL 1.3 spec were already approved and available at the time of Oni's development: most notably, compressed textures ("GL_ARB_texture_compression", March 2000) and multisampling a.k.a. antialiasing ("GL_ARB_multisample", December 1999), as well as some environment mapping techniques.
Vertex Buffer Objects (i.e., optimized storage of 3D data at GPU level) were not implemented until OpenGL 1.5 (July 2003), and advanced pixel shaders (GLSL scripts) were only added in OpenGL 2.0 (September 2004). Therefore Oni has practically no hardware acceleration and is limited to Gouraud shading.
Lightmapping was technically possible since OpenGL 1.2.1 (through multitexturing)[2] and was initially present in pre-beta versions of Oni, although it was removed from the final game due to either performance reasons or last-minute remodeling of the game's levels.
A basic implementation of environment mapping was used for hair and metal parts, although the reflection math seems incorrect and some NVIDIA cards completely fail to render Oni's reflectivity.
Learning OpenGL
If you are looking for an introduction to modern OpenGL, with shaders and such, then opengl-tutorial.org is a good place to look. THIS mini-tutorial is also a good place to start, as it fully details the creation of an interactive OpenGL/freeglut app (however, the camera class used by the author is no longer available for download).
If you are more specifically interested in normal mapping, then a really neat GLSL snippet can be found HERE (an implementation of normal mapping that uses no precomputed TBN matrices and does all the tangent space math at shader level).
Notes
- ↑ Quake (1996) is widely regarded as having played a key part in the breakthrough of real-time 3D technology in the late '90s. See First-person shooter (Wikipedia) for a more detailed account citing other noteworthy games such as Half-Life (1998).
- ↑ Proper multitextured lightmaps should not be confused with THIS hackish emulation of lightmaps, which uses an extra layer of transparent polygons.