Hi all,
I’m writing a demo , imguix. It shows how ImGui works with cocos2d-x.
https://github.com/c0i/imguix/raw/master/imguix.png
One embedded “editor” in cocos2d-x:
https://cloud.githubusercontent.com/assets/5056328/11366275/2f01e254-92e7-11e5-9854-587a409e1e68.png
It’s very easy to get ImGui works with cocos2d-x on OS X, thanks to ImGui portable.
But, i got some problem on windows, here is some information:
-
ran cocos2d-x game normally, means the OpenGL driver is ok.
-
call
CHECK_GL_ERROR_DEBUG()
after ImGui::Render();#define CHECK_GL_ERROR_DEBUG() \ do { \ GLenum __error = glGetError(); \ if(__error) { \ cocos2d::log("OpenGL error 0x%04X in %s %s %d\n", __error, __FILE__, __FUNCTION__, __LINE__); \ } \ } while (false)
-
got OpenGL error 0x0501 when hide the game window:
Ready for GLSL Ready for OpenGL 2.0 OpenGL error 0x0501 in classes\helloworldscene.cpp HelloWorld::onDraw 101 OpenGL error 0x0501 in classes\helloworldscene.cpp HelloWorld::onDraw 101
https://cloud.githubusercontent.com/assets/170314/11267473/8b1f5bb6-8ee6-11e5-80f3-a48672d42c9f.png
The project is here : https://github.com/c0i/imguix.
Would anyone help me to solve this problem ?
Any pull request is welcome.
Thanks.