Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Ticket #98 (closed defect: fixed)

Opened 16 years ago

Last modified 15 years ago

Font Render Bug

Reported by: clayasaurus Assigned to: clayasaurus
Priority: major Milestone: 0.3 GUI - Physics - Refactor Release
Component: graphics Version: svn
Keywords: Cc:

Description

http://www.dsource.org/forums/viewtopic.php?t=3356

" When you use Font.draw to draw a string, if it draws a glyph for the first time (never been drawn with that font before), it shows that glyph as a white block for one frame, and then after that it draws correctly. I'm guessing this is just a caching issue? " - Jarret

I'll check this out later when I get the time for it.

Attachments

font.d.patch98 (1.1 kB) - added by cyhawk on 02/27/09 10:31:19.
texture.d.patch98 (0.6 kB) - added by cyhawk on 02/27/09 10:31:33.

Change History

11/19/07 06:14:31 changed by ChristianK

  • owner changed from ChristianK to clayasaurus.
  • component changed from unspecified to graphics.

This probably also affects the 0.2 stable branches.

05/13/08 17:46:26 changed by clayasaurus

  • milestone changed from 0.3 to 2008-2009 Maintainance.

02/27/09 10:31:05 changed by cyhawk

This is caused by the glDisable(GL_TEXTURE_2D) line at the end of updateTexture() in texture.d. This disables texturing when the new glyph is cached.

I don't know on which side to fix this. We can either set glEnable(GL_TEXTURE_2D) before drawing each glyph on screen (this is the font.d.patch98 patch) or we can remove this side-effect of updateTexture() by using glPushAttrib(GL_TEXTURE_2D) (this is the texture.d.patch98 patch). I slightly prefer the latter, because it may prevent similar bugs cropping up elsewhere.

02/27/09 10:31:19 changed by cyhawk

  • attachment font.d.patch98 added.

02/27/09 10:31:33 changed by cyhawk

  • attachment texture.d.patch98 added.

02/28/09 02:54:39 changed by clayasaurus

  • status changed from new to closed.
  • resolution set to fixed.

I put in the texture.d.patch98 patch, while changing the "glPopAttrib(GL_TEXTURE_2D)" to simply "glPopAttrib()"

03/18/09 18:22:42 changed by clayasaurus

  • milestone changed from 2008-2009 Maintainance to 0.3 GUI Release.