23.3 Glu Interface

ORIGIN 'opengl';

-- lib: attributes --

(* GLU constants *)

(* GLU Normal vectors *)
GLU_SMOOTH: (# exit 100000 #);
GLU_FLAT: (# exit 100001 #);
GLU_NONE: (# exit 100002 #);

(* GLU Quadric draw styles *)
GLU_POINT: (# exit 100010 #);
GLU_LINE: (# exit 100011 #);
GLU_FILL: (# exit 100012 #);
GLU_SILHOUETTE: (# exit 100013 #);

(* GLU Quadric orientation *)
GLU_OUTSIDE: (# exit 100020 #);
GLU_INSIDE: (# exit 100021 #);

(* GLU Tesselator *)
GLU_BEGIN: (# exit 100100 #);
GLU_VERTEX: (# exit 100101 #);
GLU_END: (# exit 100102 #);
GLU_ERROR: (# exit 100103 #);
GLU_EDGE_FLAG: (# exit 100104 #);

(* GLU Contour types *)
GLU_CW: (# exit 100120 #);
GLU_CCW: (# exit 100121 #);
GLU_INTERIOR: (# exit 100122 #);
GLU_EXTERIOR: (# exit 100123 #);
GLU_UNKNOWN: (# exit 100124 #);

(* GLU Tesselation errors *)
GLU_TESS_ERROR1: (# exit 100151 #);
GLU_TESS_ERROR2: (# exit 100152 #);
GLU_TESS_ERROR3: (# exit 100153 #);
GLU_TESS_ERROR4: (# exit 100154 #);
GLU_TESS_ERROR5: (# exit 100155 #);
GLU_TESS_ERROR6: (# exit 100156 #);
GLU_TESS_ERROR7: (# exit 100157 #);
GLU_TESS_ERROR8: (# exit 100158 #);
GLU_TESS_ERROR9: (# exit 100159 #);

(* NURBS *)
GLU_AUTO_LOAD_MATRIX: (# exit 100200 #);
GLU_CULLING: (# exit 100201 #);
GLU_PARAMETRIC_TOLERANC: (# exit 100202 #);
GLU_SAMPLING_TOLERANCE: (# exit 100203 #);
GLU_DISPLAY_MODE: (# exit 100204 #);
GLU_SAMPLING_METHOD: (# exit 100205 #);
GLU_U_STEP: (# exit 100206 #);
GLU_V_STEP: (# exit 100207 #);
GLU_PATH_LENGTH: (# exit 100215 #);
GLU_PARAMETRIC_ERROR: (# exit 100216 #);
GLU_DOMAIN_DISTANCE: (# exit 100217 #);

GLU_MAP1_TRIM_2: (# exit 100210 #);
GLU_MAP1_TRIM_3: (# exit 100211 #);

GLU_OUTLINE_POLYGON: (# exit 100240 #);
GLU_OUTLINE_PATCH: (# exit 100241 #);

GLU_NURBS_ERROR1: (# exit  100251 #);
GLU_NURBS_ERROR2: (# exit  100252 #);
GLU_NURBS_ERROR3: (# exit  100253 #);
GLU_NURBS_ERROR4: (# exit  100254 #);
GLU_NURBS_ERROR5: (# exit  100255 #);
GLU_NURBS_ERROR6: (# exit  100256 #);
GLU_NURBS_ERROR7: (# exit  100257 #);
GLU_NURBS_ERROR8: (# exit  100258 #);
GLU_NURBS_ERROR9: (# exit  100259 #);
GLU_NURBS_ERROR10: (# exit 100260 #);
GLU_NURBS_ERROR11: (# exit 100261 #);
GLU_NURBS_ERROR12: (# exit 100262 #);
GLU_NURBS_ERROR13: (# exit 100263 #);
GLU_NURBS_ERROR14: (# exit 100264 #);
GLU_NURBS_ERROR15: (# exit 100265 #);
GLU_NURBS_ERROR16: (# exit 100266 #);
GLU_NURBS_ERROR17: (# exit 100267 #);
GLU_NURBS_ERROR18: (# exit 100268 #);
GLU_NURBS_ERROR19: (# exit 100269 #);
GLU_NURBS_ERROR20: (# exit 100270 #);
GLU_NURBS_ERROR21: (# exit 100271 #);
GLU_NURBS_ERROR22: (# exit 100272 #);
GLU_NURBS_ERROR23: (# exit 100273 #);
GLU_NURBS_ERROR24: (# exit 100274 #);
GLU_NURBS_ERROR25: (# exit 100275 #);
GLU_NURBS_ERROR26: (# exit 100276 #);
GLU_NURBS_ERROR27: (# exit 100277 #);
GLU_NURBS_ERROR28: (# exit 100278 #);
GLU_NURBS_ERROR29: (# exit 100279 #);
GLU_NURBS_ERROR30: (# exit 100280 #);
GLU_NURBS_ERROR31: (# exit 100281 #);
GLU_NURBS_ERROR32: (# exit 100282 #);
GLU_NURBS_ERROR33: (# exit 100283 #);
GLU_NURBS_ERROR34: (# exit 100284 #);
GLU_NURBS_ERROR35: (# exit 100285 #);
GLU_NURBS_ERROR36: (# exit 100286 #);
GLU_NURBS_ERROR37: (# exit 100287 #);

(* GLU Errors *)
GLU_INVALID_ENUM: (# exit 100900 #);
GLU_INVALID_VALUE: (# exit 10090 #);
GLU_OUT_OF_MEMORY: (# exit 10090 #);
GLU_INCOMPATIBLE_GL_VERSION: (# exit 100903 #);

(* GLU 1.1 *)
GLU_VERSION: (# exit 100800 #);
GLU_EXTENSIONS: (# exit 100801 #);

(* Miscellaneous GLU functions *)

gluLookAt: External
  (# eyex, eyey, eyez: @real;
     centerx, centery, centerz: @real;
     upx, upy, upz: @real;
  enter (eyex,eyey,eyez,centerx,centery,centerz,upx,upy,upz)
  do callStd;
  #);

gluOrtho2D: External
  (# left,right,bottom,top: @real;
  enter (left,right,bottom,top)
  do callStd;
  #);

gluPerspective: External
  (# fovy,aspect,zNear,zFar: @real;
  enter(fovy,aspect,zNear,zFar)
  do callStd;
  #);

gluPickMatrix: External
  (# x,y,width,height: @real;
     viewport: @integer;
  enter (x,y,width,height,viewport)
  do callStd;
  #);

gluProject: (* Wrapped ,not done*)
  (# objx,objy,objz: @real;
     modelMatrix,projMatrix,viewport: @integer;
     winx,winy,winz: @integer;
     result: @integer;
  enter (objx,objy,objz,modelMatrix,projMatrix,viewport,winx,winy,winz)
  exit result
  #);

gluUnProject: (* Wrapped ,not done*)
  (# winx,winy,winz: @real;
     modelMatrix,projMatrix,viewport: @integer;
     objx,objy,objz: @integer;
     result: @integer;
  enter (winx,winy,winz,modelMatrix,projMatrix,viewport,objx,objy,objz)
  exit result
  #);

gluErrorString: External
  (# errorCode: @integer;
     result: [0]@char;
  enter errorCode
  do CallStd;
  exit result
  #);
     

(* GLU Mipmapping and image scaling *)

gluScaleImage: External
  (# format: @integer;
     widthin,heightin: @integer;
     typein,datain: @integer;
     widthout,heightout: @integer;
     typeout,dataout: @integer;
     result: @integer;
  enter (format,widthin,heightin,typein,datain,widthout,heightout,typeout,dataout)
  do CallStd;
  exit result
  #);

gluBuild1DMipmaps: External
  (# target,components,width,format: @integer;
     type,data: @integer;
     result: @integer;
  enter (target,components,width,format,type,data)
  do CallStd;
  exit result
  #);

gluBuild2DMipmaps: External
  (# target,components,width,format: @integer;
     type,data: @integer;
     result: @integer;
  enter (target,components,width,format,type,data)
  do CallStd;
  exit result
  #);


(* GLU Quadrics *)

gluNewQuadric: External
  (# quadobj: @integer;
  do CallStd;
  exit quadobj
  #);

gluDeleteQuadric: External 
  (# obj: @integer
  enter obj
  do CallStd;
  #);

gluQuadricDrawStyle: External
  (# quadObject: @integer;
     drawStyle: @integer;
  enter (quadObject,drawStyle)
  do CallStd;
  #);

gluQuadricOrientation: External
  (# quadObject: @integer;
     orientation: @integer;
  enter (quadObject,orientation)
  do CallStd;
  #);

gluQuadricNormals: External
  (# quadObject: @integer;
     normals: @integer;
  enter (quadObject,normals)
  do CallStd;
  #);

gluQuadricTexture: External
  (# quadObject: @integer;
     textureCoords: @char; (* GLboolean *)
  enter (quadObject,textureCoords)
  do CallStd;
  #);

(* 
gluQuadricCallback: External
  (# qobj: @integer;
     which: @integer;
     void ( *fn)() 
  #);
 *)

gluCylinder: External
  (# qobj: @integer;
     baseRadius, topRadius, height: @real;
     slices, stacks: @integer;
  enter (qobj,baseRadius,topRadius,height,slices,stacks)
  do callStd;
  #);

gluSphere: External
  (# qobj: @integer;
     radius: @real;
     slices,stacks: @integer;
  enter (qobj,radius,slices,stacks)
  do CallStd;
  #);

gluDisk: External
  (# qobj: @integer;
     innerRadius,outerRadius: @real;
     slices, loops: @integer;
  enter (qobj,innerRadius,outerRadius,slices,loops)
  do CallStd;
  #);

gluPartialDisk: External
  (# qobj: @integer;
     innerRadius, outerRadius: @real;
     slices, loops: @integer;
     startAngle, sweepAngle: @real;
  enter (qobj,innerRadius,outerRadius,slices,loops,startAngle,sweepAngle)
  do callStd;
  #);
     
(* GLU Nurbs *)

gluNewNurbsRenderer: External
  (# nurbsobj: @integer;
  do CallStd;
  exit nurbsobj
  #);

gluDeleteNurbsRenderer: External
  (# nurbsobj: @integer;
  enter nurbsobj
  do CallStd;
  #);

(*
gluLoadSamplingMatrices: External
  (# nobj: @integer;
     GLfloat modelMatrix[16],
     GLfloat projMatrix[16],
     GLint viewport[4]
  #);
 *)

gluNurbsProperty: External (* wrapped *)
  (# nobj: @integer;
     property: @integer;
     value: @real;
  enter (nobj,property,value)
  do 'wrapgluNurbsProperty'->CallC;
  #);

gluGetNurbsProperty: External
  (# nobj,property: @integer;
     value: @integer; (* GLfloat* *)
  enter (nobj,property,value)
  do CallStd;
  #);

gluBeginCurve: External
  (# nobj: @integer;
  enter nobj
  do CallStd;
  #);

gluEndCurve: External
  (# nobj: @integer;
  enter nobj
  do CallStd;
  #);

gluNurbsCurve: External (* wrapped, not done *)
  (# nobj, nknots: @integer;
     knot: @integer; (* GLfloat* *)
     stride: @integer;
     ctlarray: @integer; (* GLfloat* *)
     order, type: @integer;
  enter (nobj,nknots,knot,stride,ctlarray,order,type)
  #);

gluBeginSurface: External
  (# nobj: @integer;
  enter nobj
  do CallStd;
  #);

gluEndSurface: External
  (# nobj: @integer;
  enter nobj
  do CallStd;
  #);

gluNurbsSurface: External (* wrapped, not done *)
  (# nobj: @integer;
     sknot_count: @integer;
     sknot: @integer; (* GLfloat* *)
     tknot_count: @integer;
     tknot: @integer; (* GLfloat* *)
     s_stride, t_stride: @integer;
     ctlarray: @integer; (* GLfloat* *)
     sorder, torder,type: @integer;
  enter (nobj,sknot_count,sknot,tknot_count,tknot,s_stride,t_stride,ctlarray,sorder,torder,type)
  #);

gluBeginTrim: External
  (# nobj: @integer;
  enter nobj
  do CallStd;
  #);

gluEndTrim: External
  (# nobj: @integer;
  enter nobj
  do CallStd;
  #);

gluPwlCurve: External (* wrapped, not done *)
  (# nobj, count: @integer;
     array: @integer; (* GLfloat* *)
     stride, type: @integer;
  enter (nobj,count,array,stride,type)
  #);


(* GLU Polygon tesselation *)

gluNewTess: External
  (# triangulatorObj: @integer;
  do CallStd;
  exit triangulatorObj
  #);

(*
 gluTessCallback
 *)              

gluDeleteTess: External
  (# tobj: @integer;
  enter tobj
  do CallStd;
  #);

gluBeginPolygon: External
  (# 
  tobj: @integer;
  enter tobj
  do CallStd;
  #);

gluEndPolygon: External
  (# tobj: @integer;
  enter tobj
  do CallStd;
  #);

gluNextContour: External
  (# tobj,type: @integer;
  enter (tobj,type)
  do CallStd;
  #);

gluTessVertex: External
  (# tobj: @integer;
     v: @integer; (* GLdouble* *)
     data: @integer; (* void* *)
  enter (tobj,v,data)
  do CallStd;
  #);


(* GLU 1.1 *)

gluGetString: External
  (# name: @integer;
     result: [0]@char;
  enter name
  do CallStd;
  exit result
  #)


23.3 Glu Interface
© 1994-2004 Mjølner Informatics
[Modified: Wednesday September 20th 2000 at 13:07]