Fwd: TextRenderer and QGLWidget::renderText()

02.03.10, 08:22, “Shlomo Katz” :

Hi Konstantin,

After looking at Benoit’s reply: are you going to tackle this? It’s way beyond me … (OpenGL etc.)

I’d like to try it (at least simplest variant without caching). However, if you want to take it, I have nothing against :slight_smile:

On Mon, Mar 1, 2010 at 1:53 PM, Konstantin Tokarev wrote:

Hello, Benoit!
Since you’ve written TextRenderer, I hope you can help.
There’s a hidden bug in your code which causes missing letters in labels in some cases. I think it isn’t worth to debug, because of discussed limitations of TextRenderer (impossibility to change font, outline color, etc)
I’ve found QGLWidget::renderText working fine in Qt 4.5, however it lacks support for outline rendering. I’ve asked on qt-interest, and was given an answer: “The best approach is to render the text into texture and use the multitexture.”
So, we still need TextRender class, but it can be much simplier and powerful. Everything it needs to do is 1) render string into texture; 2) draw outline into another texture; 3) combine them and draw in given point
But (as far as I understood) work with textures in Qt requires some knowledge of OpenGL internals, which I haven’t. Could you make a draft for this rendering, i.e. approximate sequence of function calls?

Regards,
Konstantin


Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev


Avogadro-devel mailing list
Avogadro-devel@lists.sourceforge.net
avogadro-devel List Signup and Options


Regards,
Konstantin