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
_______________________________________________
gtkglext-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkglext-list