Hello.
I'm playing with CEGUI a little bit.
I'm using OpenGL renderer, and I set rotation to some label. It works OK, but when I set different text to that label it gets drawn on top of previous text.
I tried calling invalidate(true) on that label but it does not work.
I've been looking for solution for quite long, but I could find it.
Should I report a bug or there is simple workaround?
Thanks
[SOLVED] Updateing text on rotated label does not work
Moderators: CEGUI MVP, CEGUI Team
[SOLVED] Updateing text on rotated label does not work
Last edited by komarx6 on Tue Sep 15, 2015 11:37, edited 1 time in total.
Re: Updateing text on rotated label does not work
here you go.
Lable has initial text "V", then I programmatically set anothors string, and than another. But old text is still
partially visible below new one.
Any thoughts?
Re: Updateing text on rotated label does not work
Do you ever clear your framebuffer?
CrazyEddie: "I don't like GUIs"
Re: Updateing text on rotated label does not work
No, at least I don't know about that. I'm not really CEGUI expert, and I'm not expert in graphics neither.
How do I do that?
Is is costly? Any performance issues?
Thank you for quick reply.
How do I do that?
Is is costly? Any performance issues?
Thank you for quick reply.
Re: Updateing text on rotated label does not work
OpenGL's framebuffer? Shouldn't that be done automatically? I don't know how to use OpenGL, I was hoping that I could use pure CEGUI without digging down to it's specific implementations. But you could point me to class, function or something like that, that I should call form specific class/function.
Re: Updateing text on rotated label does not work
If I wasn't clear enough, it only happens when I set rotation to label, when it starts using RenderingWindow as it's rendering surface.
Re: Updateing text on rotated label does not work
OK, I do call glClear in beginRendering function. If that is what you meant, then that is not problem.
Re: Updateing text on rotated label does not work
The only thing you need to for CEGUI to render with OpenGL, in case you do not render anything yourself, is to call glClear() each time before rendering CEGUI in your loop, and calling swapbuffer after rendering CEGUI. Look at the application templates for example linked from our homepage.
Edited.
Edited.
CrazyEddie: "I don't like GUIs"
Re: Updateing text on rotated label does not work
I already done that. I put glClear in beingRendering, and glSwapBuffers in endRendering. And as I said, not only happens with rotated label, when it uses RenderingWindow. When I set rotation it calls allocateRenderingWindow and draw to some TextureTarget. And it seams that that causes problems. Without rotation and RenderingWindow, it works fine.
I've been digging a lot into CEGUI to find where is the problem, but I don't really understand low level things like openGL calls, only basic stuff.
I've been digging a lot into CEGUI to find where is the problem, but I don't really understand low level things like openGL calls, only basic stuff.
Re: Updateing text on rotated label does not work
Can you reproduce it in the SampleBrowser? Just edit the HelloWorld example and run the SampleBrowser and tell me if you can rotate and edit texts there without issues. If you can, then we know the issue is not in CEGUI but in the way you use it and we may proceed from there with helping you find a solution.
CrazyEddie: "I don't like GUIs"
Re: Updateing text on rotated label does not work
OK, I'll try it.
Re: Updateing text on rotated label does not work
Yes, it was my mistake. Sorry for being stupid and taking your time.
Re: Updateing text on rotated label does not work
Edit the original post title to prepend [Solved] and describe what was wrong and how you solved it please.
CrazyEddie: "I don't like GUIs"
Who is online
Users browsing this forum: No registered users and 12 guests