diff options
| author | Andre Weissflog <floooh@gmail.com> | 2019-03-24 22:30:23 +0100 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2019-03-24 22:30:23 +0100 |
| commit | 39d4bca89a16ca9873707fc01a9b8d501653359d (patch) | |
| tree | e952ead5bf38610325012ec4e684878d8dcaf80f /util | |
| parent | 4dc9265ba8f4e36c05b45e5a3ad3246b72b651d6 (diff) | |
sokol_gl.h: bug fixes
Diffstat (limited to 'util')
| -rw-r--r-- | util/sokol_gl.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/util/sokol_gl.h b/util/sokol_gl.h index df9d24fb..a0ed8868 100644 --- a/util/sokol_gl.h +++ b/util/sokol_gl.h @@ -200,6 +200,10 @@ extern "C" { #include <string.h> /* memset */ #include <math.h> /* M_PI, sqrtf, sinf, cosf */ +#ifndef M_PI +#define M_PI 3.14159265358979323846264338327 +#endif + #ifndef SOKOL_API_IMPL #define SOKOL_API_IMPL #endif @@ -845,7 +849,7 @@ SOKOL_API_IMPL void sgl_shutdown(void) { SOKOL_ASSERT(_sgl.init_cookie == 0xABCDABCD); SOKOL_FREE(_sgl.vertices); _sgl.vertices = 0; SOKOL_FREE(_sgl.uniforms); _sgl.uniforms = 0; - SOKOL_FREE(_sgl.commands = _sgl.commands = 0); + SOKOL_FREE(_sgl.commands); _sgl.commands = 0; sg_destroy_buffer(_sgl.vbuf); sg_destroy_image(_sgl.def_img); sg_destroy_shader(_sgl.shd); |