Selaa lähdekoodia

sokol_gfx.h gles3: define GL_FRAMEBUFFER_UNDEFINED if it doesn't exist (see: https://github.com/floooh/sokol/pull/933)

Andre Weissflog 1 vuosi sitten
vanhempi
commit
5b0382ce19
1 muutettua tiedostoa jossa 9 lisäystä ja 0 poistoa
  1. 9 0
      sokol_gfx.h

+ 9 - 0
sokol_gfx.h

@@ -4716,6 +4716,15 @@ inline int sg_append_buffer(sg_buffer buf_id, const sg_range& data) { return sg_
     #endif
 #endif
 
+#if defined(SOKOL_GLES3)
+    // on WebGL2, GL_FRAMEBUFFER_UNDEFINED technically doesn't exist (it is defined
+    // in the Emscripten headers, but may not exist in other WebGL2 shims)
+    // see: https://github.com/floooh/sokol/pull/933
+    #ifndef GL_FRAMEBUFFER_UNDEFINED
+    #define GL_FRAMEBUFFER_UNDEFINED 0x8219
+    #endif
+#endif
+
 // ███████ ████████ ██████  ██    ██  ██████ ████████ ███████
 // ██         ██    ██   ██ ██    ██ ██         ██    ██
 // ███████    ██    ██████  ██    ██ ██         ██    ███████