[Mesa-dev] [Bug 61412] glCallLists/glBitmap calls slow on Intel implementation of Mesa drivers

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Feb 25 19:25:16 PST 2013


https://bugs.freedesktop.org/show_bug.cgi?id=61412

James Ogden <rexhunter99 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WONTFIX                     |---

--- Comment #16 from James Ogden <rexhunter99 at gmail.com> ---
(In reply to comment #13)
> (In reply to comment #11)
> > We've tried really hard to help you, and all of your responses have been
> > filled with rudeness and belligerence.
> 
> Ian, I don't think James is being unreasonable.  He's simply trying to use a
> legacy OpenGL feature (that works fine with other drivers) and is frustrated
> that nobody seems interested in helping him.  And simply saying "just forget
> about glXUseXFonts and use textures" doesn't really help either, given the
> other constraints that he described (and were probably glossed over by
> others).
No I didn't think I was being unreasonable either, being a complete a**hole
maybe, but not unreasonable.

> James, I think I have a possible path to a solution for you.  The texture
> map approach really is the best way to go, but you're probably wondering
> about how to get your font glyphs without pulling in some new font
> utility/library, font files, etc.
I know it's the best way to go, I'd prefer it since the game has a TTF
dedicated to it that wasn't used originally back in the 90s due to the
developers being too lazy to install it with the game.  But as we all know from
my previous comments that I'd rather rely on the system :)

> If you look at Mesa's src/mesa/drivers/x11/xfonts.c file you'll find an
> implementation of glXUseXFont().  It uses some Xlib code to convert X font
> glyphs into bitmap images.  I think you could adapt that code so that you'd
> save the bitmap images in some data structure, then implement a simple
> bitmap character renderer to render strings into a texture image (see also
> src/mesa/state_trackers/st_cb_bitmap.c and the _mesa_expand_bitmap()
> function).  Then render the texture/string with GL_ALPHA_TEST or blending. 
> I think you could do all this in a few hundred lines of code (most of it
> from xfonts.c).  Maybe there's even some code on the net that does this
> already.  Anyway, you could build new code this with your other app sources
> and avoid any new external dependencies.
I've already begun the process of writing a setup like this and manually
creating a texture at load-time with the font glyph data stored in an
appropriate structure.  Thanks for suggesting the source, I would have just
wrote the whole thing myself from scratch but now I may take a look at how it's
done in Mesa's source.

> Hope that helps.
Kind of, definitely a much better response than I initially received, thank you
Brian.

(In Reply to Comment #12)
> Let's start over.
> 
> In comment #2, Ken asked for an apitrace of your application.  Can you provide that?
Building the utility and will return with the dump as soon as I'm done.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130226/5328d7de/attachment.html>


More information about the mesa-dev mailing list