another change for pixelRead - needed to read from backbuffer with VGL
authorClaus Gittinger <cg@exept.de>
Sat, 23 Mar 1996 20:05:50 +0100
changeset 543 abe110532199
parent 542 5e3b0dc0b01a
child 544 5db747591945
another change for pixelRead - needed to read from backbuffer with VGL
GLXWorkstat.st
GLXWorkstation.st
--- a/GLXWorkstat.st	Sat Mar 23 19:42:29 1996 +0100
+++ b/GLXWorkstat.st	Sat Mar 23 20:05:50 1996 +0100
@@ -3301,13 +3301,7 @@
         x1 to:x2 do:[:x |
             |pix|
 
-            pix := super getPixelX:x y:y from:aGLXWindowId.
-            "/
-            "/ mhmh - this pixel is indexing X's colorMap;
-            "/ still have to find the GL mapping ...
-            "/
-            pix := self glxXColorToGLColor:pix.
-
+            pix := self vglGetPixelX:x y:y in:aGLXWindowId.
             dest at:idx put:pix
         ]
     ].
@@ -3329,6 +3323,22 @@
 #endif
 %}.
     ^ pixel
+!
+
+vglGetPixelX:x y:y in:aGLXWindowId
+    "special for VGL"
+
+%{
+#ifdef VGL
+    if (__isSmallInteger(x) && __isSmallInteger(y)) {
+        SETWIN(aGLXWindowId)
+        RETURN (__MKSMALLINT(X11_getPixel(__intVal(x), __intVal(y))));
+    }
+#endif
+%}.
+    ^ 0
+
+    "Modified: 22.3.1996 / 18:08:00 / cg"
 ! !
 
 !GLXWorkstation methodsFor:'points'!
@@ -8304,5 +8314,5 @@
 !GLXWorkstation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Attic/GLXWorkstat.st,v 1.52 1996-03-23 18:42:29 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Attic/GLXWorkstat.st,v 1.53 1996-03-23 19:05:50 cg Exp $'
 ! !
--- a/GLXWorkstation.st	Sat Mar 23 19:42:29 1996 +0100
+++ b/GLXWorkstation.st	Sat Mar 23 20:05:50 1996 +0100
@@ -3301,13 +3301,7 @@
         x1 to:x2 do:[:x |
             |pix|
 
-            pix := super getPixelX:x y:y from:aGLXWindowId.
-            "/
-            "/ mhmh - this pixel is indexing X's colorMap;
-            "/ still have to find the GL mapping ...
-            "/
-            pix := self glxXColorToGLColor:pix.
-
+            pix := self vglGetPixelX:x y:y in:aGLXWindowId.
             dest at:idx put:pix
         ]
     ].
@@ -3329,6 +3323,22 @@
 #endif
 %}.
     ^ pixel
+!
+
+vglGetPixelX:x y:y in:aGLXWindowId
+    "special for VGL"
+
+%{
+#ifdef VGL
+    if (__isSmallInteger(x) && __isSmallInteger(y)) {
+        SETWIN(aGLXWindowId)
+        RETURN (__MKSMALLINT(X11_getPixel(__intVal(x), __intVal(y))));
+    }
+#endif
+%}.
+    ^ 0
+
+    "Modified: 22.3.1996 / 18:08:00 / cg"
 ! !
 
 !GLXWorkstation methodsFor:'points'!
@@ -8304,5 +8314,5 @@
 !GLXWorkstation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.52 1996-03-23 18:42:29 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.53 1996-03-23 19:05:50 cg Exp $'
 ! !