Mercurial > projects > mde
comparison mde/font/FontTexture.d @ 96:dbf332403c6e
Improvements to FloatingAreaWidget: positioning, passing click events and draw order.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Thu, 06 Nov 2008 13:16:39 +0000 |
parents | 9520cc0448e5 |
children | 30470bc19ca4 |
comparison
equal
deleted
inserted
replaced
95:2a364c7d82c9 | 96:dbf332403c6e |
---|---|
251 if (t.addGlyph (ga)) | 251 if (t.addGlyph (ga)) |
252 goto gotTexSpace; | 252 goto gotTexSpace; |
253 } | 253 } |
254 // if here, no existing texture had the room for the glyph so create a new texture | 254 // if here, no existing texture had the room for the glyph so create a new texture |
255 // NOTE: check if using more than one texture impacts performance due to texture switching | 255 // NOTE: check if using more than one texture impacts performance due to texture switching |
256 logger.info ("Creating a new font texture."); | 256 debug logger.trace ("Creating a new font texture."); |
257 tex ~= TexPacker.create(); | 257 tex ~= TexPacker.create(); |
258 assert (tex[$-1].addGlyph (ga), "Failed to fit glyph in a new texture but addGlyph didn't throw"); | 258 assert (tex[$-1].addGlyph (ga), "Failed to fit glyph in a new texture but addGlyph didn't throw"); |
259 | 259 |
260 gotTexSpace: | 260 gotTexSpace: |
261 glBindTexture(GL_TEXTURE_2D, ga.texID); | 261 glBindTexture(GL_TEXTURE_2D, ga.texID); |