You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Examples; imgui_impl_opengl3.cpp to work with Emscripten (#1941)
* Add some ifdefs to add emscripten specific params and includes
* Update imgui_impl_opengl3.cpp
* Update imgui_impl_opengl3.cpp
* Update imgui_impl_opengl3.cpp
* replace __EMSCRIPTEN_BUILD__ with __EMSCRIPTEN__
* replace GLFW_INCLUDE_ES3 with direct header
* removing useless glfw include
* Making call to glPolygonMode() optional
Copy file name to clipboardexpand all lines: examples/imgui_impl_opengl3.cpp
+76-6
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@
37
37
// 3.2 150 "#version 150"
38
38
// 3.3 330
39
39
// 4.0 400
40
-
// 4.1 410
40
+
// 4.1 410 "#version 410 core"
41
41
// 4.2 420
42
42
// 4.3 430
43
43
// ES 2.0 100 "#version 100"
@@ -57,7 +57,11 @@
57
57
#include<stdint.h>// intptr_t
58
58
#endif
59
59
60
-
#include<GL/gl3w.h>// This example is using gl3w to access OpenGL functions. You may use another OpenGL loader/header such as: glew, glext, glad, glLoadGen, etc.
60
+
#ifdef __EMSCRIPTEN__
61
+
#include<GLES3/gl3.h>
62
+
#else
63
+
#include<GL/gl3w.h>// This example is using gl3w to access OpenGL functions. You may use another OpenGL loader/header such as: glew, glext, glad, glLoadGen, etc.
// Our visible imgui space lies from draw_data->DisplayPps (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right). DisplayMin is typically (0,0) for single viewport apps.
0 commit comments