https://github.com/LukasBanana/MentalGL
Single header OpenGL utility library in the public domain
https://github.com/LukasBanana/MentalGL
c c99 debugging-tool gl opengl public-domain utility
Last synced: about 1 month ago
JSON representation
Single header OpenGL utility library in the public domain
- Host: GitHub
- URL: https://github.com/LukasBanana/MentalGL
- Owner: LukasBanana
- Created: 2018-03-28T15:46:32.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-01-14T21:50:42.000Z (over 1 year ago)
- Last Synced: 2025-04-10T02:08:53.926Z (2 months ago)
- Topics: c, c99, debugging-tool, gl, opengl, public-domain, utility
- Language: C
- Size: 175 KB
- Stars: 24
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- AwesomeCppGameDev - MentalGL
README
MentalGL - OpenGL debugging utility to review entire render state
=================================================================**Public domain** (CC0) header-only library written in C99.
Code Example
------------Here is a brief example how to use this utility library:
```c
// Include and implement MentalGL in a single source file
#define MENTAL_GL_IMPLEMENTATION
#include "mental_gl.h"// Do OpenGL stuff ...
// Query current OpenGL state
MGLRenderState rs;
mglQueryRenderState(&rs);// Print queries OpenGL state (ignore optional formatting descriptor, otherwise see 'MGLQueryFormatting' structure)
MGLString s = mglPrintRenderState(&rs, NULL);// Print result
puts(mglGetUTF8String(s));// Free opaque string object
mglFreeString(s);
```Output Example
--------------