share/gui: don't use less of widget width for truncation than available
[neverball] / share / geom.c
index 0931509..ac1ca8b 100644 (file)
@@ -24,6 +24,7 @@
 #include "solid.h"
 #include "image.h"
 #include "config.h"
+#include "video.h"
 
 #define PI 3.1415926535897932
 
@@ -336,6 +337,8 @@ void shad_draw_set(const float *p, float r)
         glScalef(k, k, 1.0f);
     }
     glMatrixMode(GL_MODELVIEW);
+
+    glEnable(GL_CLIP_PLANE3);
 }
 
 void shad_draw_clr(void)
@@ -345,6 +348,8 @@ void shad_draw_clr(void)
         glLoadIdentity();
     }
     glMatrixMode(GL_MODELVIEW);
+
+    glDisable(GL_CLIP_PLANE3);
 }
 
 /*---------------------------------------------------------------------------*/
@@ -356,7 +361,7 @@ void fade_draw(float k)
         int w = config_get_d(CONFIG_WIDTH);
         int h = config_get_d(CONFIG_HEIGHT);
 
-        config_push_ortho();
+        video_push_ortho();
         {
             glEnable(GL_COLOR_MATERIAL);
             glDisable(GL_LIGHTING);
@@ -381,7 +386,7 @@ void fade_draw(float k)
             glEnable(GL_LIGHTING);
             glDisable(GL_COLOR_MATERIAL);
         }
-        config_pop_matrix();
+        video_pop_matrix();
     }
 }