GLXWorkstation.st
changeset 2422 6bffcb4c8360
parent 2075 7fc93b8da816
child 2449 5fdfb68d0bcc
--- a/GLXWorkstation.st	Sun Jan 10 18:03:56 1999 +0100
+++ b/GLXWorkstation.st	Fri Jan 15 22:33:42 1999 +0100
@@ -66,8 +66,16 @@
 #undef True
 #undef False
 
+#if defined(__openVMS__) || defined(LINUX)
+  /*
+   * mhmh - used in stdio ...
+   * (new linuxes)
+   */
+# undef __new
+# define __NEED_REDEF_new__
+#endif
+
 #ifdef __VMS__
-# undef __new
 # include "vms_Xnames.h"
 #endif
 
@@ -117,6 +125,10 @@
 # define NULL (char *)0         /* sigh */
 #endif
 
+#ifdef __NEED_REDEF_new__
+# define __new  __STX___new
+#endif
+
 typedef enum {
     GLXcolorIndexSingleBuffer,
     GLXcolorIndexDoubleBuffer,
@@ -6595,12 +6607,12 @@
     ^ false
 !
 
-glxLsetdepthNear: near far: far in: aGLXWindowId
-
-%{  /* NOCONTEXT */
-#ifdef GLX
-    SETWIN(aGLXWindowId)
-    lsetdepth(_longVal(near), _longVal(far));
+glxLsetdepthNear:znear far:zfar in: aGLXWindowId
+
+%{  /* NOCONTEXT */
+#ifdef GLX
+    SETWIN(aGLXWindowId)
+    lsetdepth(_longVal(znear), _longVal(zfar));
     RETURN (true);
 #endif
 %}
@@ -7400,12 +7412,12 @@
     ^ false
 !
 
-glxSetdepthNear: near far: far in: aGLXWindowId
-
-%{  /* NOCONTEXT */
-#ifdef GLX
-    SETWIN(aGLXWindowId)
-    setdepth(_screencoordVal(near), _screencoordVal(far));
+glxSetdepthNear:znear far:zfar in: aGLXWindowId
+
+%{  /* NOCONTEXT */
+#ifdef GLX
+    SETWIN(aGLXWindowId)
+    setdepth(_screencoordVal(znear), _screencoordVal(zfar));
     RETURN (true);
 #endif
 %}
@@ -8346,7 +8358,7 @@
 %}
 !
 
-glxOrthoLeft: left right: right bottom: bottom top: top near: near far: far in: aGLXWindowId
+glxOrthoLeft: left right: right bottom: bottom top: top near: znear far: zfar in: aGLXWindowId
     "define orthogonal projection"
 
 %{  /* NOCONTEXT */
@@ -8357,8 +8369,8 @@
     _FLOAT_(right, f_right)
     _FLOAT_(bottom, f_bottom)
     _FLOAT_(top, f_top)
-    _FLOAT_(near, f_near)
-    _FLOAT_(far, f_far)
+    _FLOAT_(znear, f_near)
+    _FLOAT_(zfar, f_far)
     SETWIN(aGLXWindowId)
 #ifdef OPENGL
 #else
@@ -8367,7 +8379,7 @@
 %}
 !
 
-glxPerspectiveFovy:fovy aspect:aspect near:near far:far in:aGLXWindowId
+glxPerspectiveFovy:fovy aspect:aspect near:znear far:zfar in:aGLXWindowId
     "define perspective projection"
 
 %{  /* NOCONTEXT */
@@ -8378,8 +8390,8 @@
 
     _ANGLE_ (fovy, a_fovy)
     _FLOAT_ (aspect, f_aspect)
-    _COORD_ (near, c_near)
-    _COORD_ (far, c_far)
+    _COORD_ (znear, c_near)
+    _COORD_ (zfar, c_far)
 
     SETWIN(aGLXWindowId)
 #ifdef OPENGL
@@ -8458,13 +8470,13 @@
 %}
 !
 
-glxWindowLeft: left right: right bottom: bottom top: top near: near far: far in: aGLXWindowId
+glxWindowLeft: left right: right bottom: bottom top: top near: znear far: zfar in: aGLXWindowId
     "this one was added independently by JEFF - kept for his programs ..."
 
-    self glxWindowLeft:left right:right top:top bottom:bottom near:near far:far in:aGLXWindowId
-!
-
-glxWindowLeft:left right:right top:top bottom:bottom near:near far:far in:aGLXWindowId
+    self glxWindowLeft:left right:right top:top bottom:bottom near:znear far:zfar in:aGLXWindowId
+!
+
+glxWindowLeft:left right:right top:top bottom:bottom near:znear far:zfar in:aGLXWindowId
     "define perspective viewing pyramid"
 
 %{  /* NOCONTEXT */
@@ -8474,8 +8486,8 @@
     _COORD_ (right, c_right)
     _COORD_ (top, c_top)
     _COORD_ (bottom, c_bot)
-    _COORD_ (near, c_near)
-    _COORD_ (far, c_far)
+    _COORD_ (znear, c_near)
+    _COORD_ (zfar, c_far)
     SETWIN(aGLXWindowId)
 #ifdef OPENGL
 #else
@@ -8793,5 +8805,5 @@
 !GLXWorkstation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.72 1998-03-05 19:47:27 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.73 1999-01-15 21:33:19 cg Exp $'
 ! !