ogre-next
ogre-next copied to clipboard
There is a bug, that RenderSystem:endRenderPassDescriptor() was called fromed other place, after begin.
System Information
- Ogre Version: :grey_question: Latest version of ogrenext
- Operating System / Platform: :grey_question: Win10
- RenderSystem: :grey_question: DX11
- GPU: :grey_question: GTX960M
Detailled description
After RenderSystem::beginRenderPassDescriptor() function has been called. The RenderSystem:endRenderPassDescriptor()
was called by Texture loading from TextureGupManager::checkStagingTextureLimits() -> _clearStateAndFlushCommandBuffer()->RenderSystem:endRenderPassDescriptor() 。 And then RenderSystem::getCurrentPassDescriptor()return a nullptr at Hlms::preparePassHash().
Ogre.log
Callstack
This is a single threaded program. All stack calls start from the same renderOneFrame
I don't know how to fix this, Need help!
Hi! Sorry for taking so long to answer.
This is indeed an Ogre bug.
Unfortunately Overlays are tricky due to them having a very old design.
The best workaround I can offer is that you manually load the font before rendering happens:
Ogre::String fontName = myTextAreaOverlayElement->getFontName()
FontPtr font = Ogre::v1::FontManager::getSingleton().getByName( font );
if( !mFont->isLoaded() )
mFont->load();
Do that for each font name that you have; and the problem should be solved.
Btw if you need something more advanced for your UI needs you may be interested in Colibri
Thank you for your answer. I will use this solution to solve my problems. However, I don't know whether this may also happen when creating an item to load a texture. Whether repair is required
Very nice. I'm looking for a GUI system suitable for ogrenext. The current solution is imgui, but I prefer the object-oriented programming style. Let me study whether this represents our needs
Items loading texture should be happening outside begin/end RenderPassDescriptor unless the item or material was created in a listener very close to rendering.
That sounds like a different bug (because the font one is quite specific as Overlays were designed to load textures while rendering)
Thanks, that is OK,
The current solution is imgui, but I prefer the object-oriented programming style. Let me study whether this represents our needs
Great. IMHO imgui is the best for developer UI (i.e. debug menus, editor mode, trying stuff out) thanks to its simplicity and immediate mode nature.
While Colibri is better for UIs that you need to present to the user.
OK, I will have a try