https://github.com/ichlubna/openglinjector
This header-only hpp library can be used to adjust the rendered result of an existing OpenGL code without the need to inspect the code too much.
https://github.com/ichlubna/openglinjector
3d framebuffer gl glsl injection ogl opengl
Last synced: about 2 months ago
JSON representation
This header-only hpp library can be used to adjust the rendered result of an existing OpenGL code without the need to inspect the code too much.
- Host: GitHub
- URL: https://github.com/ichlubna/openglinjector
- Owner: ichlubna
- License: mit
- Created: 2025-03-12T14:53:20.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-04-23T08:17:09.000Z (6 months ago)
- Last Synced: 2025-04-23T09:26:58.132Z (6 months ago)
- Topics: 3d, framebuffer, gl, glsl, injection, ogl, opengl
- Language: C++
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This class can be simply injected into an existing OpenGL code to apply some post processing effects on the rendered result. Simply include the hehpp file and create an instance of `GLInjection` class. Then init the object somewhere where the scene is initialized so that the `init` function is called only once. Add the call to `render` function right before the swapping of the buffers or other kind of frame buffer presentation mechanism. For example, right before the call of `glfwSwapBuffers` or `SDL_GL_SwapWindow`. Edit the fragment shader to adjust the effects. An example with LearnOpenGL tutorial is placing the `init` [here](https://github.com/JoeyDeVries/LearnOpenGL/blob/a545a703f95893258d16dbe32f5ccbb6400fd213/src/3.model_loading/1.model_loading/model_loading.cpp#L90) and `render` [here](https://github.com/JoeyDeVries/LearnOpenGL/blob/a545a703f95893258d16dbe32f5ccbb6400fd213/src/3.model_loading/1.model_loading/model_loading.cpp#L128).