gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] libvob/include/vob/vobs Pixel.hxx


From: Janne V. Kujala
Subject: [Gzz-commits] libvob/include/vob/vobs Pixel.hxx
Date: Mon, 30 Jun 2003 03:22:52 -0400

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Branch:         
Changes by:     Janne V. Kujala <address@hidden>        03/06/30 03:22:52

Modified files:
        include/vob/vobs: Pixel.hxx 

Log message:
        copypixels

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/include/vob/vobs/Pixel.hxx.diff?tr1=1.3&tr2=1.4&r1=text&r2=text

Patches:
Index: libvob/include/vob/vobs/Pixel.hxx
diff -u libvob/include/vob/vobs/Pixel.hxx:1.3 
libvob/include/vob/vobs/Pixel.hxx:1.4
--- libvob/include/vob/vobs/Pixel.hxx:1.3       Sun Jun 29 04:13:15 2003
+++ libvob/include/vob/vobs/Pixel.hxx   Mon Jun 30 03:22:52 2003
@@ -100,6 +100,31 @@
 };
 VOB_DEFINED(ReadPixels);
 
+struct CopyPixels {
+    enum { NTrans = 2 };
+
+    int w, h;
+    Token type;
+
+    template<class F> void params(F &f) {
+       f(w, h, type);
+    }
+
+    template<class T> void render(const T &t1, const T &t2) const {
+       ZPt p = t1.transform(ZPt(0,0,0));
+       glRasterPos3f(p.x, p.y, p.z);
+       float ras[4];
+       glGetFloatv(GL_CURRENT_RASTER_POSITION, ras);
+
+       p = t2.transform(ZPt(0,0,0));
+       glRasterPos3f(p.x, p.y, p.z);
+
+       glCopyPixels((int)ras[0], (int)ras[1]-h, w, h, type);
+       GLERR
+    }
+};
+VOB_DEFINED(CopyPixels);
+
 
 }
 }




reply via email to

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