chderigo

Member
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

100 Neutral

About chderigo

  • Rank
    Newbie
  1. Bug in the freetype openGL tutorial

    First of all: Thanks for this great tutorial, it really kicks ass...[img]http://public.gamedev.net//public/style_emoticons/default/wub.png[/img] love it.. ([url="http://nehe.gamedev.net/tutorial/freetype_fonts_in_opengl/24001/"]http://nehe.gamedev.net/tutorial/freetype_fonts_in_opengl/24001/[/url]) There's another bug within this code. a memory leak is caused by the glyph not getting freed! bugfix: add the line [CODE] FT_Done_Glyph(glyph); [/CODE] to the bottom of the "make_dlist" function. [color=#D1EDFF][font=monospace][size=3][background=rgb(15, 25, 42)]documentation for FT_Get_Glyph says:[/background][/size][/font][/color] [color=#000000][font=Verdana, Geneva, Arial, Helvetica, serif][size=1]Note that the created [/size][/font][/color][url="http://www.freetype.org/freetype2/docs/reference/ft2-glyph_management.html#FT_Glyph"]FT_Glyph[/url][color=#000000][font=Verdana, Geneva, Arial, Helvetica, serif][size=1] object must be released with [/size][/font][/color][url="http://www.freetype.org/freetype2/docs/reference/ft2-glyph_management.html#FT_Done_Glyph"]FT_Done_Glyph[/url][color=#000000][font=Verdana, Geneva, Arial, Helvetica, serif][size=1].[/size][/font][/color]