mirror of https://github.com/axmolengine/axmol.git
235f09f635
* PixelFormat use table * Correct PixelFormat name to match 'GL_LUMINANCE' * Up * fix cube update texture enum * linux build * Refine ci * fix linux build * Remove unused function, match mtl framebuffer pixel format * readPixels always RGBA format * fix ci for linux * fix linux build * Remove unused functions * fix travis * fix android ci * Update config.json * linux glad * Update CCGLViewImpl-desktop.cpp * fix linux build * Fix linux build * Link issue [skip appveyor][skip travis] * Update CMakeLists.txt * Refine GL enums use * Update test case name [skip appveyor][skip travis] * fix linux link issue * for mtl * fix ci * Tidy pixelformat enums * fix ci * fix rgba8 to abgr4 error * fix ci * fix ci for GLES * Fix linux build, require glibc-2.27+ * Use properly dist for travis [skip appveyor] * fix linux build [skip appveyor] * Update install-deps-linux.sh * Remove unused members for pixel block info, update external to v73 * Sync from compile linux warnings * Remove unused check, and PixelFormat::A8 is ordinary format, not compressed format * metal doesn't support rgb8 (#3) * Update CCTexture2D.cpp * Refine code * Pixel Format Descriptor Table * fix ci * BGR5A1 * Simplfy texture format convert function name * Update * rgba4 match mtl render format * Add note about RGBA4 * Remove unused function * fix osx * Already converted at texture2d * Clearly comment * fixup |
||
---|---|---|
.. | ||
imgui | ||
CCImGuiEXT.cpp | ||
CCImGuiEXT.h | ||
CMakeLists.txt | ||
LICENSE | ||
README.md | ||
imgui_impl_cocos2dx.cpp | ||
imgui_impl_cocos2dx.h |
README.md
ImGuiEXT of EGNX
Sync from https://github.com/Xrysnow/cocos2d-x-imgui and do a little changes
Improvements
- Simplify API, use add/remove renderLoop present ImGui GUI widgets
- Optimize call pipeline flow, support add/remove Node to Scene at ImGui render loop without container iterator damage
- Calculate deltaTime at
ImGui_ImplCocos2dx_NewFrame
to avoid error whencc.Director
paused - Refine
Init/Shutdown
, Restore all callbacks for glfw to solve recreateImGuiEXT
instance support - Use
FOURCC
for key of ImGui render loop - Add dpi scale support, use
ImGuiEXT::getInstance()->scaleAllByDPI(1.0);
- Easy font manager, stable API
addFont,removeFont,clearFonts
to manage ImGui fonts, with ImGui API, very hard to do correctly.
How to use
#include "ImGuiEXT/CCImGuiEXT.h"
USING_NS_CC;
USING_NS_CC_EXT;
class GameScene : public Scene {
public:
void onEnter() override
{
Scene::onEnter();
ImGuiEXT::getInstance()->addRenderLoop("#im01", CC_CALLBACK_0(GameScene::onImGuiDraw, this), this);
}
void onExit() override
{
Scene::onExit();
ImGuiEXT::getInstance()->removeRenderLoop("#im01");
}
void onImGuiDraw()
{
ImGui::Begin("window");
ImGui::Text("FPS=%.1f", 1.f / ImGui::GetIO().DeltaTime);
ImGui::End();
}
}
More about use imgui widgets, please see: https://github.com/ocornut/imgui
Tested devices
- win32
- macOS
Known issues
- Can't enable muti-viewports on macOS, so we disable it for macOS