Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 3 months 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 (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-01-14T21:50:42.000Z (about 1 year ago)
- Last Synced: 2024-10-12T17:21:06.618Z (3 months ago)
- Topics: c, c99, debugging-tool, gl, opengl, public-domain, utility
- Language: C
- Size: 175 KB
- Stars: 23
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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
--------------![ExamplePicture1](MentalGL_Example_1.png)