bino-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bino-list] SubTitles?


From: Joe
Subject: Re: [Bino-list] SubTitles?
Date: Thu, 17 Mar 2011 01:16:20 +0100
User-agent: KMail/4.6 beta4 (Linux/2.6.37-gentoo; KDE/4.6.1; x86_64; ; )

Hi!

On Tuesday 15 March 2011 21:15:23 Martin Lambers wrote:
> On 15/03/11 20:54, Martin Lambers wrote:
> > Yes, we need a high level library that hides all those messy system
> > dependent details, and ideally also takes care of any character encoding
> > issues for us.
> > 
> > I agree that we should avoid adding too many dependencies. Pango
> > actually does not seem to be too much of a problem in this regard: it
> > does depend on glib, but not on GTK, and on my system (Ubuntu 10.10)
> > libqt4gui also depends on glib (to allow using the glib mainloop), so
> > the number of additional dependencies would be limited to pango+cairo.
> > Still, there might be better choices than pango.
> > 
> > Maybe we should just use Qt, but I really would like to have subtitles
> > working with Equalizer, too. From a quick look at the code, Equalizer
> > itself seems to only support crappy old-style X11 fonts on Linux, and
> > only in US-ASCII encoding.
> 
> On second thought, there is probably no real advantage in using Pango
> over Qt. It looks like one would need to use QPainter on a QImage to
> draw the text, and then upload the QImage as a texture to the GPU. No
> additional libraries would be required.
> 
> If we keep the subtitle rendering code a little bit separated from the
> rest, we can probably figure out a way to use this from within Equalizer
> later.
> 
> Martin

I got rid of FTGL and reimplemented font rendering in QT. Everything looks 
much cleaner now - system font selection dialog, all the fancy options and now 
there is subtitles text encoding selection.

I'm drawing subtitles into argb buffer and I managed to print it directly into 
left/right textures, so finally I can implement depth of subtitles (paralax is 
correct name?). However I need help with alpha blending of two textures. I'm 
using  glTexSubImage right now to copy the subtitle image directly into 
left/right texture, but that does not do alpha blending. I hope you will find 
the time to implement proper blending/overlaying of those textures.

https://github.com/cuchac/bino has fresh sources and the code should be ready 
for testing.

Joe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]