[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 17:24:38 PST 2013
https://bugs.freedesktop.org/show_bug.cgi?id=61412
Ian Romanick <idr at freedesktop.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |NOTOURBUG
--- Comment #9 from Ian Romanick <idr at freedesktop.org> ---
(In reply to comment #8)
> (In reply to comment #7)
> > Can you elaborate on what you mean by this? I believe that Eric's proposal
> > was for you to change the way the application is rendering. I'm not sure
> > how this has any affect on end-users troubleshooting things.
> Seriously I feel like I'm a canary, repeating the same tune over and over.
> I can't rely on a texture based font stored in the game directory, or even
> the truetype/freetype fonts (except maybe Ubuntu/fixed on Linux and Arial on
> Windows) because I am catering for people who do weird stuff to their
> computers and files go missing mysteriously. So instead I rely on something
> I know is there and if its not, then their system is completely buggered.
>
> > I'm assuming that you have fonts stored on disk as bitmap (1-bit per pixel)
> > images, and that's why you're mentioning filesystems. You can use this data
> > as a texture by using the GL_PIXEL_MAP_I_TO_A table. The data is sent to
> > glTexImage2D like:
> >
> > glTexImage2D(GL_TEXTURE_2D, 0, width, height, 0,
> > GL_ALPHA4, GL_COLOR_INDEX, GL_BITMAP, pixels);
> >
> > Configure the GL 1.2 texture combiners and blend mode to blend the font the
> > way you want:
> >
> > glTexEnvi(GL_TEXTURE_2D, GL_TEXTURE_ENV_MODE, GL_REPLACE);
> > glBlendFunc(GL_SRC_ALPHA, GL_ZERO);
> > glBlendEquation(GL_FUNC_ADD);
> >
> > Then draw a single quad in the color you want the font to be:
> >
> > glColor3f(1.0f, 0.0f, 0.0f);
> > glBegin(GL_QUADS); // or your favorite way to draw
> > glTexCoord2f(...); // location of the character in the atlas
> > glVertex2f(...);
> > ...
> > glEnd();
> >
> > You could even build those calls into display lists (as you currently do
> > with the glBitmap calls) to keep the changes isolated from the reset of your
> > code.
> >
> > Excluding the call to glBlendEquation, that will work on every OpenGL
> > implementation since GL 1.1, and it will probably be faster than glBitmap on
> > every GL implementation since the data doesn't need to be re-uploaded for
> > each drawing operation.
> I know how to do all of this, again I do NOT have a font texture file, I
> rely on system installed fonts because if they aren't there, then the system
> is buggered to hell.
You're repeating my point, and that's confusing. It doesn't matter how your
fonts are stored. You can send *exactly the same bits* into OpenGL as a
texture or a bitmap.
--
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/8bc931c5/attachment-0001.html>
More information about the mesa-dev
mailing list