23.4 OpenGLWlib Interface

ORIGIN '~beta/guienv/guienv';

--windowitemlib:attributes--

(*------ GLW ---------- *)
(* note this is not complete,
 * only intendet for internal use,
 * as programs is not platform independent.
 *
 *)

(* Different constants *)

(* pixel types *)
PFD_TYPE_RGBA:(# exit 0 #);
PFD_TYPE_COLORINDEX:(# exit 1 #);

(* layer types *)
PFD_MAIN_PLANE:(# exit 0 #);
PFD_OVERLAY_PLANE:(# exit 1 #);
PFD_UNDERLAY_PLANE:(# exit (-1) #);

(* PIXELFORMATDESCRIPTOR flags *)
PFD_DOUBLEBUFFER:(# exit 0x00000001 #);
PFD_STEREO:(# exit 0x00000002 #);
PFD_DRAW_TO_WINDOW:(# exit 0x00000004 #);
PFD_DRAW_TO_BITMAP:(# exit 0x00000008 #);
PFD_SUPPORT_GDI:(# exit 0x00000010 #);
PFD_SUPPORT_OPENGL:(# exit 0x00000020 #);
PFD_GENERIC_FORMAT:(# exit 0x00000040 #);
PFD_NEED_PALETTE:(# exit 0x00000080 #);
PFD_NEED_SYSTEM_PALETTE:(# exit 0x00000100 #);
PFD_SWAP_EXCHANGE:(# exit 0x00000200 #);
PFD_SWAP_COPY:(# exit 0x00000400 #);
PFD_SWAP_LAYER_BUFFERS:(# exit 0x00000800 #);
PFD_GENERIC_ACCELERATED:(# exit 0x00001000 #);

(* PIXELFORMATDESCRIPTOR flags for use in ChoosePixelFormat only *)
PFD_DEPTH_DONTCARE:(# exit 0x20000000 #);
PFD_DOUBLEBUFFER_DONTCARE:(# exit 0x40000000 #);
PFD_STEREO_DONTCARE:(# exit 0x80000000 #);

SwapBuffers:external
  (#
     hdc:@integer; (* HDC* *)
     result:@integer;
  enter hdc
  do CallStd
  exit result
  #);

  setPixelFormat:external
  (#
         hdc:@integer; (* HDC* *)
         result:@integer;
  enter hdc
  exit result
  #);

wglCopyContext:external
  (# 
     source,dest,mask:@integer; (* HGLRC, HGLRC, UINT *)
  enter (source,dest,mask)
  #);
     

wglCreateContext:external
  (# 
     hdc:@integer; (* HDC *)
     glrc:@integer; (* HGLRC *)
  enter hdc
  do CallStd
  exit glrc
  #);

wglCreateLayerContext:external
  (# 
     hdc,iLayerPlane:@integer; (* HDC, int *)
     glrc:@integer; (* HGLRC *)
  enter (hdc,iLayerPlane)
  exit glrc
  #);

wglDeleteContext:external
  (# 
     hglrc:@integer; (*HGLRC *)
     result:@integer;
  enter hglrc
  do CallStd;
  exit result
  #);

wglGetCurrentContext:external
  (# 
     hglrc:@integer;
  do CallStd;
  exit hglrc
  #);

wglGetCurrentDC:external
  (#
     hdc:@integer;
  do CallStd;
  exit hdc
  #);

(*
 * Do we need this ?
 *
 * wglGetProcAddress:external
  (# (LPCSTR);#);
 *)


wglMakeCurrent:external
  (# 
     hdc,hglrc:@integer;(*HDC, HGLRC*)
     result:@integer;
  enter (hdc,hglrc)
  do CallStd;
  exit result
  #);

wglShareLists:external
  (# 
     hglrc1,hglrc2:@integer; (*HGLRC, HGLRC*)
     result:@integer;
  enter (hglrc1,hglrc2)
  do CallStd;
  exit result
  #)


23.4 OpenGLWlib Interface
© 1994-2002 Mjølner Informatics
[Modified: Friday May 15th 1998 at 13:11]