Zhang Yufeng
Zhang Yufeng
关于release版本,也可以提供开关来进行二进制文件加载
https://github.com/rocketman123456/RocketEngine/blob/re_article_23/Rocket/Graphics/Vulkan/VulkanShaderUtils.h https://github.com/rocketman123456/RocketEngine/blob/re_article_23/Rocket/Graphics/Vulkan/VulkanShaderUtils.cpp 这个是我以前写的工具类,使用的是shaderc作为底层的编译库,也许可以集成进去
> 这个问题解决了没?我用的是Virtual Box也无法运行。 > > 报错内容: leo@leo-VirtualBox:~/games104/Piccolo/bin$ ./PiccoloEditor terminate called after throwing an instance of 'std::runtime_error' what(): failed to find suitable physical device 已放弃 (核心已转储) > > 我翻了一下,代码在这个文件535行,可惜不懂逻辑,不会改。。。 engine/source/runtime/function/render/rhi/vulkan/vulkan_rhi.cpp >...
> > > 感谢反馈,你的思路是可行的。 通过将游戏窗口的画面渲染到独立的VkImage中,再调用ImGui的ImGui_ImplVulkan_AddTexture、ImGui::Image等接口构造一个ImGui控件,结合上面的flag开关可以拖拽控件到主窗口之外。 除了坐标计算以及选取物体方面的考虑,还需要注意swapchain,因为拖出来的每个窗口都至少需要一张swapchain image。 目前ImGui中多视口功能的支持还被标记为beta,未合并到主分支。小引擎主要还是原理教学示意,暂不会更新该功能。 我自己尝试的结果传到的我fork的仓库上,改动影响较大,还有一些瑕疵,且需要更新imgui库,如有需要可参考(https://github.com/kwbm/Pilot/tree/imgui-multi-viewport)。 感谢🙏。我初步测试了一下,渲染部分没有问题,但是鼠标滚轮缩放是有问题的,可能是没有在鼠标移开游戏内容界面的时候,取消所有对的输入控制。不过这个我暂时不知道怎么修改。感觉这个部分的内容,如果是我的话,会对输入控制进行重构,采用事件系统的方式,更好的分离各个部分的逻辑。在编辑器模式下,使用当前focus的界面这个数据,来转发键盘和鼠标输入,到期望的UI界面控件部分。
``` bool GObject::hasComponent(const std::string& compenent_type_name) const { // FIXME : cannot create two component of same type for (const auto& component : m_components) { if (component.getTypeName() == compenent_type_name) return true;...
Thanks a lot! I will update if I make any progress