]> git.sesse.net Git - movit/blobdiff - widgets.cpp
Slight cleanup in texture upload format selection.
[movit] / widgets.cpp
index 529212fe10dbb5d0787c95f381596b36cd83b45a..a17039118174d7d1f3d138009e54878abcad4f03 100644 (file)
@@ -12,7 +12,7 @@
 
 void draw_hsv_wheel(float y, float rad, float theta, float value)
 {
-       glUseProgramObjectARB(0);
+       glUseProgram(0);
        check_error();
        glActiveTexture(GL_TEXTURE0);
        check_error();
@@ -81,7 +81,7 @@ void draw_hsv_wheel(float y, float rad, float theta, float value)
 
 void draw_saturation_bar(float y, float saturation)
 {
-       glUseProgramObjectARB(0);
+       glUseProgram(0);
        check_error();
 
        // value slider
@@ -102,7 +102,7 @@ void draw_saturation_bar(float y, float saturation)
        glColor3f(0.0f, 0.0f, 0.0f);
        glPointSize(5.0f);
        glBegin(GL_POINTS);
-       glVertex2f(0.2f * (saturation / 4.0f) * 9.0f / 16.0f, y + 0.01f);
+       glVertex2f(0.2f * saturation * 9.0f / 16.0f, y + 0.01f);
        glEnd();
 
        glColor3f(1.0f, 1.0f, 1.0f);