gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz/gfx/libcallgl callgl.cxx


From: Janne V. Kujala
Subject: [Gzz-commits] gzz/gfx/libcallgl callgl.cxx
Date: Thu, 31 Oct 2002 04:10:07 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Janne V. Kujala <address@hidden>        02/10/31 04:10:07

Modified files:
        gfx/libcallgl  : callgl.cxx 

Log message:
        cleanup

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libcallgl/callgl.cxx.diff?tr1=1.27&tr2=1.28&r1=text&r2=text

Patches:
Index: gzz/gfx/libcallgl/callgl.cxx
diff -u gzz/gfx/libcallgl/callgl.cxx:1.27 gzz/gfx/libcallgl/callgl.cxx:1.28
--- gzz/gfx/libcallgl/callgl.cxx:1.27   Sat Oct 26 10:09:53 2002
+++ gzz/gfx/libcallgl/callgl.cxx        Thu Oct 31 04:10:07 2002
@@ -22,7 +22,6 @@
     using std::vector;
 
     using std::cerr;
-    using std::cout;
 
     ExtCalls ext_calls;
 
@@ -215,12 +214,10 @@
          int w = atoi(v[4].c_str());
          int h = atoi(v[5].c_str());
          vector<GLfloat> pixels = getfv(v, 8, w * h);
-         /* XXX: need to multiply with the number of components, too
-         if (pixels.size() != (unsigned)(w * h)) {
+         if (pixels.size() % (unsigned)(w * h)) {
            cerr << "TexImage2D dimensions " << w << "x" << h << " do not match 
the size " << pixels.size() << " of data\n";
            return false; 
          }
-         */
          glTexImage2D(getToken(v[1]), atoi(v[2].c_str()), getToken(v[3]),
                       w, h, atoi(v[6].c_str()), getToken(v[7]),
                       GL_FLOAT, &pixels[0]);
@@ -228,7 +225,7 @@
          int w = atoi(v[4].c_str());
          int h = atoi(v[5].c_str());
          vector<GLushort> pixels = getiv<GLushort>(v, 8, w * h);
-         if (pixels.size() != (unsigned)(w * h)) {
+         if (pixels.size() % (unsigned)(w * h)) {
            cerr << "TexImage2D dimensions " << w << "x" << h << " do not match 
the size " << pixels.size() << " of data\n";
            return false; 
          }
@@ -245,8 +242,6 @@
        } else if (checkfunc(v, "TexEnv", 3, true)) {
          if (v.size() > 4) {
            vector<GLfloat> params = getfv(v, 3, 4);
-           // XXX: Note: according to c++/98, the type of params.begin() 
-           // is implementation defined and may be other than GLfloat* 
            glTexEnvfv(getToken(v[1]), getToken(v[2]), &params[0]);
          } else {
            glTexEnvf(getToken(v[1]), getToken(v[2]), getTokenf(v[3]));
@@ -347,12 +342,12 @@
          case 4: glColor3d(atof(v[1].c_str()), 
                            atof(v[2].c_str()), 
                            atof(v[3].c_str())); break;
+         default:
+           cerr << "Ignoring extra arguments to Color\n";
          case 5: glColor4d(atof(v[1].c_str()), 
                            atof(v[2].c_str()), 
                            atof(v[3].c_str()), 
                            atof(v[4].c_str())); break;
-         default:
-           cerr << "Ignoring extra arguments to Color\n";
          }
        } else if (checkfunc(v, "Normal", 3)) {
          glNormal3d(atof(v[1].c_str()), 
@@ -362,15 +357,6 @@
          glLineWidth(atof(v[1].c_str()));
        } else if (checkfunc(v, "PointSize", 1)) {
          glPointSize(atof(v[1].c_str()));
-       } else if (checkfunc(v, "Scale", 3)) {
-         glScaled(atof(v[1].c_str()),
-                      atof(v[2].c_str()),
-                      atof(v[3].c_str()));
-       } else if (checkfunc(v, "Rotate", 4)) {
-         glRotated(atof(v[1].c_str()),
-                      atof(v[2].c_str()),
-                      atof(v[3].c_str()),
-                      atof(v[4].c_str()));
 
 #ifdef GL_REGISTER_COMBINERS_NV
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]