diff mde/resource/FontTexture.d @ 61:7cab2af4ba21

A little bit of progress on the content handling system (relevent code is likely to be revised). Also some changes to debug statements, in particular a new drawGlyphCache debug version.
author Diggory Hardy <diggory.hardy@gmail.com>
date Wed, 25 Jun 2008 17:25:48 +0100
parents 9e1f05fbbcef
children
line wrap: on
line diff
--- a/mde/resource/FontTexture.d	Tue Jun 24 20:40:52 2008 +0100
+++ b/mde/resource/FontTexture.d	Wed Jun 25 17:25:48 2008 +0100
@@ -324,7 +324,8 @@
         cachedGlyphs[chr] = ga;
     }
     
-    void drawTexture () {	// temp func
+    // Draw the first glyph cache texture in the upper-left corner of the screen.
+    debug (drawGlyphCache) void drawTexture () {
         if (tex.length == 0) return;
         glEnable (GL_TEXTURE_2D);
         glBindTexture(GL_TEXTURE_2D, tex[0].texID);
@@ -365,7 +366,7 @@
         p.texID = 0;
         
         // add a pretty background to the texture
-        static if (true) {
+        debug (drawGlyphCache) {
             glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
             glPixelStorei (GL_UNPACK_ROW_LENGTH, 0);
             ubyte[3][dimH][dimW] testTex;