mesa: fix all(bvec2) function typo, add missing bvec2/3/4() constuctors
[mesa.git] / progs / tests / mipmap_view.c
index d821f432f0b6a926ca20690b191574b303ff69de..117e201718479595f804ab72654f0778946f77ac 100644 (file)
@@ -55,17 +55,10 @@ Display(void)
 
    for (bias = -1; bias < 11; bias++) {
 
-      glRasterPos2f(x, y + TexHeight + 5);
-      sprintf(str, "Texture LOD Bias = %d", bias);
-      PrintString(str);
-
-      glPushMatrix();
-      glTranslatef(x, y, 0);
-
-      glEnable(GL_TEXTURE_2D);
-
       if (ScaleQuads) {
          if (bias > 0) {
+            if (texWidth == 1 && texHeight == 1)
+               break;
             texWidth = TexWidth >> bias;
             texHeight = TexHeight >> bias;
             if (texWidth < 1)
@@ -79,6 +72,20 @@ Display(void)
          glTexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT, bias);
       }
 
+      glRasterPos2f(x, y + TexHeight + 5);
+      if (ScaleQuads)
+         sprintf(str, "Texture Level %d: %d x %d",
+                 (bias < 0 ? 0 : bias),
+                 texWidth, texHeight);
+      else
+         sprintf(str, "Texture LOD Bias = %d", bias);
+      PrintString(str);
+
+      glPushMatrix();
+      glTranslatef(x, y, 0);
+
+      glEnable(GL_TEXTURE_2D);
+
       glBegin(GL_POLYGON);
       glTexCoord2f(0, 0);  glVertex2f(0, 0);
       glTexCoord2f(1, 0);  glVertex2f(texWidth, 0);