https://github.com/colleagueriley/rgl
Simple ultra-lightweight OpenGL version abstraction layer HEAVILY based on RLGL that uses the opengl pipeline style.
https://github.com/colleagueriley/rgl
Last synced: about 1 year ago
JSON representation
Simple ultra-lightweight OpenGL version abstraction layer HEAVILY based on RLGL that uses the opengl pipeline style.
- Host: GitHub
- URL: https://github.com/colleagueriley/rgl
- Owner: ColleagueRiley
- License: other
- Created: 2023-09-09T23:55:41.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-28T17:13:49.000Z (about 2 years ago)
- Last Synced: 2024-05-29T08:21:57.874Z (about 2 years ago)
- Language: C++
- Homepage:
- Size: 659 KB
- Stars: 21
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RGL (Riley's OpenGL abstraction Layer)

As of 5/28/2024, RGL is no longer going to be actively updated
I will probably still respond to issues and pull requests, if any come up.
Simple OpenGL version abstraction layer based on [RLGL](https://github.com/raysan5/raylib/blob/master/src/rlgl.h).
- Allows you to use Modern OpenGL using the simple pipeline format.
- Allows you to switch between Modern OpenGL and Legacy OpenGL without changing the code.
- Allows you to load OpenGL 2.1, OpenGL 3.3, OpenGL ES, OpenGL ES2 or OpenGL 4.3
- Designed to be more lightweight and better performance than RLGL
- Modular can easily be changed to support non-OpenGL backends
## Build statuses



# Contacts
- email : ColleagueRiley@gmail.com
- discord : ColleagueRiley
- discord server : https://discord.gg/pXVNgVVbvh
# Documentation
For documentation read the `RGL.h` file and check out the example in `./example`
Most OpenGL legacy documentation and examples should also apply to RGLx
# Implementing a new backend
To implement a new backend you'll have to.
* Init the backend in `rglInit` (loading shaders, other data)
* Implement a load/free texture system inside of `rglCreateTexture`, `rglUpdateTexture` and `rglDeleteTextures`
* Implement the backend's version of these functions,
* rglViewport
* rglClearColor
* rglClear
* rglViewport
* rglClearColor
* rglDepthFunc
* rglCullFace
* rglFrontFace
* rglHint
* rglEnable
* rglPushPixelValues
* rglTextureSwizzleMask
* rglAtlasAddBitmap
* Render the data supplied to `rglRenderBatchWithShader` via the backend
* Ensure all of the backend's allocated data is freed in `rglClose`
# known issues
- No EBO
- 3D rendering doesn't seem to work
- shader options need to be added/check
# Credits
# RLGL
This project was based on [RLGL](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) and RLGL was used as a reference for some of the code in this project.