Re: [GtkGLExt] (no subject)
- From: Mukund Sivaraman <muks banu com>
- To: Matt Kern <matt kern cyantechnology com>
- Cc: gtkglext-list gnome org
- Subject: Re: [GtkGLExt] (no subject)
- Date: Tue, 6 Apr 2010 17:28:03 +0530
Hi Matt
On Tue, Apr 06, 2010 at 12:48:59PM +0100, Matt Kern wrote:
> Is it possible to rander antialiased text inside a glarea? If so, how?
>
> I have a PyGtk + GtkGLext program which currently uses pango fonts:
>
>
> glEnable(GL_POINT_SMOOTH)
> glEnable(GL_LINE_SMOOTH)
> glEnable(GL_POLYGON_SMOOTH)
> glEnable(GL_BLEND)
> glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
> glHint(GL_LINE_SMOOTH_HINT, GL_DONT_CARE)
> ...
> self.__font_string = 'courier bold 14'
> self.__font_list_base = glGenLists(128)
> self.__font_desc = pango.FontDescription(self.__font_string)
> self.__font = gtk.gdkgl.font_use_pango_font(self.__font_desc, 0, 128, self.__font_list_base)
> ...
> glRasterPos2f(-10.0, 6.0)
> glListBase(self.__font_list_base)
> glCallLists(node.label)
>
Look at the font-pangoft2* examples in the examples directory of the
gtkglext source code distribution. You should be adapt it to your
Python code. This approach obviously doesn't use the bitmap display
lists as in your code above.
Mukund
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]