home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / book / oglbase.inf (.txt) < prev    next >
OS/2 Help File  |  1999-05-12  |  69KB  |  2,432 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Introduction to OpenGL on OS/2 ΓòÉΓòÉΓòÉ
  3.  
  4. OpenGL is a highly precise, 3D rendering interface that is used in a wide 
  5. variety of applications, including CAD, entertainment, industrial design and 
  6. modeling, biochemistry, and scientific visualization. Functions of this 
  7. powerful interface include real-time 3D rendering of points, lines, and 
  8. polygons, support for lighting, texture mapping, anti-aliasing, fogging, motion 
  9. blur, hidden surface removal, transparency, and double-buffering of images. 
  10.  
  11. The OpenGL Architectural Review Board (ARB), of which IBM is a founding member, 
  12. defines the rendering functions for the OpenGL specification. To implement 
  13. support for OpenGL, a platform must provide a windowing and input interface for 
  14. the rendering functions. The implementation must pass conformance tests defined 
  15. by the ARB before the platform can legally use the OpenGL trademark. This 
  16. requirement ensures the portability of OpenGL from one platform to another. The 
  17. current OS/2 implementation of OpenGL conforms to the OpenGL 1.0 specification, 
  18. and passes OpenGL 1.0 conformance tests. 
  19.  
  20. OpenGL is intended to be an interface to graphics hardware. This means that 
  21. application writers do not have to code for a particular piece of graphics 
  22. hardware because they are ensured of consistent behavior across all graphics 
  23. hardware that passes the OpenGL conformance tests. 
  24.  
  25. OpenGL does not need special 3D hardware to run on OS/2. Every OS/2 platform 
  26. contains a complete OpenGL pipeline and rasterizer implemented in software. 
  27. This implementation enables developers to provide entry-level 3D graphics 
  28. functionality to a broad base of users. OpenGL performance on OS/2 scales with 
  29. processor power. Higher floating-point power yields better OpenGL performance. 
  30.  
  31. This chapter includes the following sections: 
  32.  
  33.      OpenGL Rendering Interface 
  34.      OS/2 Presentation Manager GL (PGL) Interface 
  35.      OpenGL Windowing and Input Toolkits 
  36.      Sources for OpenGL Information 
  37.      OS/2 Windowing and Input Functions 
  38.      OpenGL Data Types 
  39.  
  40.  
  41. ΓòÉΓòÉΓòÉ 1.1. OpenGL Rendering Interface ΓòÉΓòÉΓòÉ
  42.  
  43. OpenGL provides functionality for the following. 
  44.  
  45.      Drawing of a wide assortment of graphical primitives: 
  46.         -  Points, lines, segments, loops, triangles, quadrangles, triangle 
  47.            strips, and more 
  48.         -  NURBS and complex polygons, which are supported by OpenGL Utility 
  49.            (GLU) Library 
  50.      Flexible data input 
  51.         -  Object data can be specified in 2, 3, or 4 dimensions and numerous 
  52.            data formats 
  53.         -  Allows developer to use immediate or display list mode 
  54.      Complex light models 
  55.         -  Up to 8 lights 
  56.         -  Spot lights 
  57.         -  Local or infinite lights 
  58.      Complex material models 
  59.         -  One or two sided 
  60.         -  Ambient, diffuse and specular components can be set 
  61.      Advanced texture mapping support 
  62.         -  Automatic generation of texture coordinates 
  63.         -  Two magnification filters 
  64.         -  Six minification filters including mipmapping 
  65.         -  Decal, Modulation, or Blending of texture 
  66.      Line and Polygon antialiasing 
  67.      Fogging effects 
  68.      Accumulation buffer can facilitate motion blur and full scene 
  69.       antialiasing effects 
  70.      Depth buffer and comparisons available for hidden surface removal 
  71.      Alpha buffer and blending operations facilitate transparency and 
  72.       compositing effects 
  73.      Stencil buffer can be used for Constructive Solid Geometry (CSG) modeling 
  74.       and shadows 
  75.      Dithering allows true color images to be drawn with a small palette 
  76.      Double-buffering for smooth animation 
  77.  
  78.  
  79. ΓòÉΓòÉΓòÉ 1.2. OS/2 Presentation Manager GL (PGL) Interface ΓòÉΓòÉΓòÉ
  80.  
  81. A small set of functions integrates OpenGL with whatever windowing system is 
  82. currently running. Because these functions are windowing-system specific, they 
  83. cannot be the same across all platforms. In OS/2 these functions comprise the 
  84. PGL (Presentation Manager GL) specification. Application programmers use the 
  85. PGL interface to: 
  86.  
  87.      Create and prepare an OpenGL context for rendering 
  88.      Swap a window's front and back buffers (front buffer is displayed) 
  89.      Select a color palette for a color index context 
  90.      Integrate GPI and OpenGL rendering and fonts 
  91.  
  92.  PGL provides much of the same functionality as glX in X Windows systems, and 
  93.  the WGL interface in Microsoft systems. This implementation of OpenGL works on 
  94.  OS/2 Warp. 
  95.  
  96.  OpenGL contexts are created using pglCreateContext. A parameter to this 
  97.  function is a VISUALCONFIG, a pointer to a visual configuration data structure 
  98.  that describes the type of ancillary buffers required for the rendering 
  99.  context. A list of available VISUALCONFIGs can be queried with 
  100.  pglQueryConfigs. When choosing a VISUALCONFIG, select the one that contains 
  101.  only the buffers that you need. For instance, choose a VISUALCONFIG with 
  102.  accumulation buffers only if you plan to use them. Accumulation buffers are 64 
  103.  bits deep, and allocating memory for a 400 x 400 window would consume 
  104.  1,280,000 bytes. 
  105.  
  106.  When an OpenGL context is created, it can be specified as either a direct 
  107.  context or an indirect context: 
  108.  
  109.      A direct context bypasses the Presentation Manager when displaying OpenGL 
  110.       images and is generally faster than an indirect context. 
  111.  
  112.      An indirect context uses a standard Presentation Manager bitmap to 
  113.       display images and allows the integration of OpenGL and GPI rendering 
  114.       function. 
  115.  
  116.  After a context is created, it must be bound to an OS/2 window by calling 
  117.  pglMakeCurrent When a context is current, that means it can finally be used 
  118.  for rendering. 
  119.  
  120.  OpenGL runs as a set of DLLs on top of OS/2: 
  121.  
  122.      OPENGL.DLL contains all rendering entry points, glu entry points, PGL 
  123.       entry points, and the OpenGL pipeline code. The pipeline code is 
  124.       responsible for object transformation, lighting, culling and clipping. 
  125.       Applications only need to link with OPENGL.DLL to use the OpenGL API. 
  126.  
  127.      RASTER.DLL contains a rasterizer, which takes vertices and creates 
  128.       fragments. These fragments then go through a series of possible steps 
  129.       including texture mapping, fogging, depth tests (Z-buffering), blending 
  130.       and many more.  Some or all of these steps can be performed by 3D 
  131.       hardware, if available. (Using pglSwapBuffers will flush and display the 
  132.       rendered image.) 
  133.  
  134.  
  135. ΓòÉΓòÉΓòÉ 1.3. OpenGL Windowing and Input Toolkits ΓòÉΓòÉΓòÉ
  136.  
  137. OpenGL on OS/2 is supplied with two toolkits (AUX and GLUT) that provide simple 
  138. windowing and input handling. These toolkits are not intended for application 
  139. development, but rather for uninhibited experimentation with 3D functionality. 
  140. The GLUT toolkit has more features than AUX, including popup menus. 
  141.  
  142. Toolkits are provided "as-is" on most OpenGL platforms, including OS/2. They 
  143. are also used in sample code provided in the OpenGL Programming Guide published 
  144. by Addison-Wesley (see Sources for OpenGL Information). 
  145.  
  146.  
  147. ΓòÉΓòÉΓòÉ 1.3.1. Demo Makefiles ΓòÉΓòÉΓòÉ
  148.  
  149. Makefiles are included only for the IBM C Set and Visual Age compilers, not for 
  150. all the compilers supported by OS/2. Compiler and linker flags are explained in 
  151. the C Set makefile. Link statements are also provided for VACPP. If you are 
  152. using VACPP, set VACPP=1 in your OS/2 environment before you compile. 
  153.  
  154. Be sure to read the explanations in the Makefiles for the switches we use with 
  155. the IBM C Set compiler. You will want to compile and link your demos with case 
  156. exact turned on, meaning you want the compiler/linker to call glVertex3fv, not 
  157. GLVERTEX3FV. Be sure to specify a large stack-if you look at our .def files 
  158. (another C Set-ism), we are specifying a 1 MB stack for small demos. Currently 
  159. to run Viewperf, the official OpenGL benchmark, we specify a STACKSIZE of 4 MB. 
  160. You won't get a STACKSIZE this big unless you specify it. The OpenGL entry 
  161. points pass the parameters on the stack, so your calling sample should do this 
  162. (as opposed to passing in registers). Read through the C Set compiler/linker 
  163. parameters as described in the makefiles. 
  164.  
  165.  
  166. ΓòÉΓòÉΓòÉ 1.3.2. Running the Demos ΓòÉΓòÉΓòÉ
  167.  
  168. To successfully run the demos, use the following checklist: 
  169.  
  170.      If you are running OS/2 Warp on your system, make sure multimedia is 
  171.       installed, and the following device statement is in CONFIG.SYS. 
  172.  
  173.             DEVICE=c:\mmos2\ssmdd.sys
  174.  
  175.      Verify that you are running in 8-bit (256 colors), 16-bit or 24-bit mode. 
  176.  
  177.      Check the demo source code to see if it requires flags to be passed to 
  178.       the compiler. 
  179.  
  180.             wave -db -dr
  181.  
  182.             -db for double buffered
  183.  
  184.             -dr for direct rendering (-ir for slower indirect rendering)
  185.  
  186.  
  187. ΓòÉΓòÉΓòÉ 1.4. Sources for OpenGL Information ΓòÉΓòÉΓòÉ
  188.  
  189. There are many sources for OpenGL information: 
  190.  
  191.      Web sites on the Internet 
  192.  
  193.         -  OpenGL benchmarking numbers for OS/2 can be found in the GPC 
  194.            Quarterly published by the Graphics Peformance Characterization 
  195.            group. For more information, see 
  196.            http://www.specbench.org/gpc/opc.static/index.html. 
  197.         -  You can get information about an OS/2 mailing list, as well as a 
  198.            list of the FAQ for OpenGL on OS/2 from: 
  199.            http://www.utsi.com/~kgl/os2-opengl/index.html. 
  200.         -  And don't forget to visit the IBM web site for OpenGL at 
  201.            http://www.austin.ibm.com/software/OpenGL. 
  202.  
  203.      USENET newgroup 
  204.  
  205.         -  comp.graphics.api.opengl 
  206.  
  207.      OpenGL reference books 
  208.  
  209.         -  OpenGL Reference Manual, The Official Reference Document for OpenGL, 
  210.            Release 1, published by Addison Wesley, ISBN: 0-201-63276-4 
  211.  
  212.         -  OpenGL Programming Guide, published by Addison Wesley, ISBN: 
  213.            0-201-63274-8 
  214.  
  215.         -  OpenGL Specification available using anonymous ftp from sgi.com in 
  216.            /sgi/opengl/doc 
  217.  
  218.  
  219. ΓòÉΓòÉΓòÉ 2. OS/2 Windowing and Input Functions ΓòÉΓòÉΓòÉ
  220.  
  221. The following table describes the Presentation Manager GL (PGL) windowing and 
  222. input functions that support OpenGL rendering function. 
  223.  
  224. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  225. ΓöéFUNCTION             ΓöéDESCRIPTION                            Γöé
  226. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  227. ΓöépglChooseConfig      ΓöéReturns a pointer to a visual          Γöé
  228. Γöé                     Γöéconfiguration structure, based on      Γöé
  229. Γöé                     Γöéminimum requirements input             Γöé
  230. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  231. ΓöépglCopyContext       ΓöéCopies a portion of state from the     Γöé
  232. Γöé                     Γöésource OpenGL context to the           Γöé
  233. Γöé                     Γöédestination OpenGL context.            Γöé
  234. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  235. ΓöépglCreateContext     ΓöéCreates an OpenGL context using the    Γöé
  236. Γöé                     Γöévisual configuration structure, and    Γöé
  237. Γöé                     Γöéreturns a handle to the context.       Γöé
  238. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  239. ΓöépglDestroyContext    ΓöéDestroys an OpenGL context and the     Γöé
  240. Γöé                     Γöéresources it owns.                     Γöé
  241. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  242. ΓöépglGetCurrentContext ΓöéReturns the handle to the current      Γöé
  243. Γöé                     ΓöéOpenGL context.                        Γöé
  244. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  245. ΓöépglGetCurrentWindow  ΓöéReturns the current window handle that Γöé
  246. Γöé                     Γöéis bound to an OpenGL context.         Γöé
  247. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  248. ΓöépglGrabFrontBitmap   ΓöéGrabs the bitmap in the front buffer ofΓöé
  249. Γöé                     Γöéthe current OpenGL window.             Γöé
  250. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  251. ΓöépglIsIndirect        ΓöéDetermines whether the context handle  Γöé
  252. Γöé                     Γöébelongs to a direct or indirect        Γöé
  253. Γöé                     Γöécontext.                               Γöé
  254. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  255. ΓöépglMakeCurrent       ΓöéBinds an OpenGL context to an OS/2 PM  Γöé
  256. Γöé                     Γöéwindow.                                Γöé
  257. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  258. ΓöépglQueryCapability   ΓöéQueries the OpenGL capability of the   Γöé
  259. Γöé                     Γöécurrent machine.                       Γöé
  260. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  261. ΓöépglQueryConfigs      ΓöéReturns pointers to available visual   Γöé
  262. Γöé                     Γöéconfiguration structures.              Γöé
  263. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  264. ΓöépglReleaseFrontBitmapΓöéReleases the bitmap that was grabbed   Γöé
  265. Γöé                     Γöéusing pglGrabFrontBitmap.              Γöé
  266. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  267. ΓöépglSwapBuffers       ΓöéSwaps the front and back buffers of theΓöé
  268. Γöé                     Γöécurrent window handle.                 Γöé
  269. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  270. ΓöépglUseFont           ΓöéCreates the specified number of OpenGL Γöé
  271. Γöé                     Γöédisplay lists containing bitmaps of theΓöé
  272. Γöé                     Γöénamed logical character set identifier.Γöé
  273. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  274. ΓöépglWaitGL            ΓöéEnsures that all OpenGL rendering      Γöé
  275. Γöé                     Γöéfunctions are completed before any GPI Γöé
  276. Γöé                     Γöérendering functions are executed.      Γöé
  277. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  278. ΓöépglWaitPM            ΓöéEnsures that all GPI rendering         Γöé
  279. Γöé                     Γöéfunctions are completed before any     Γöé
  280. Γöé                     ΓöéOpenGL rendering functions are         Γöé
  281. Γöé                     Γöéexecuted.                              Γöé
  282. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  283.  
  284.  
  285. ΓòÉΓòÉΓòÉ 2.1. pglChooseConfig ΓòÉΓòÉΓòÉ
  286.  
  287.  
  288. ΓòÉΓòÉΓòÉ <hidden> pglChooseConfig - Syntax ΓòÉΓòÉΓòÉ
  289.  
  290. This function returns a pointer to a visual configuration structure that meets 
  291. the specified minimum requirements. A PVISUALCONFIG structure is required when 
  292. creating an OpenGL rendering context. 
  293.  
  294. #include <pgl.h>
  295.  
  296. HAB                hab;
  297. int               *attriblist;
  298. PVISUALCONFIG     *pVisualConfig;
  299.  
  300. pVisualConfig = pglChooseConfig(hab, attriblist);
  301.  
  302.  
  303. ΓòÉΓòÉΓòÉ <hidden> pglChooseConfig Parameter - hab ΓòÉΓòÉΓòÉ
  304.  
  305.  hab (HAB) - input 
  306.     Handle to anchor block. 
  307.  
  308.  
  309. ΓòÉΓòÉΓòÉ <hidden> pglChooseConfig Parameter - attriblist ΓòÉΓòÉΓòÉ
  310.  
  311.  attriblist (int *) - input 
  312.     A list of attribute/value pairs. The last attribute in the list must be 
  313.     None. 
  314.  
  315.     The following is a list of valid attributes: 
  316.  
  317.     PGL_USE_GL 
  318.                    Ignored. Only visual configurations that can be rendered 
  319.                    with OpenGL are considered. 
  320.  
  321.     PGL_BUFFER_SIZE 
  322.                    Must be followed by a nonnegative integer that indicates the 
  323.                    desired color index buffer size. The smallest index buffer 
  324.                    of at least the specified size is preferred. Ignored if 
  325.                    PGL_RGBA is asserted. 
  326.  
  327.     PGL_LEVEL 
  328.                    Must be followed by an integer buffer-level specification. 
  329.                    This specification is honored exactly. Buffer level zero 
  330.                    corresponds to the default frame buffer of the display. 
  331.                    Buffer level one is the first overlay frame buffer, level 
  332.                    two the second overlay frame buffer, and so on. Negative 
  333.                    buffer levels correspond to underlay frame buffers. 
  334.  
  335.     PGL_RGBA 
  336.                    If present, only RGBA visual configs are considered. 
  337.                    Otherwise, Color Index visual configs are considered. 
  338.  
  339.     PGL_DOUBLEBUFFER 
  340.                    If present, only double bufferered visual configs are 
  341.                    considered. Otherwise both single buffered and double 
  342.                    buffered visual configs may be considered. 
  343.  
  344.     PGL_SINGLEBUFFER 
  345.                    If present, only single buffered visual configs are 
  346.                    considered. Otherwise both single buffered and double 
  347.                    buffered visual config may be considered. 
  348.  
  349.     PGL_STEREO 
  350.                    If present, only stereo visual configs are considered. 
  351.                    Otherwise, both monoscopic and stereoscopic visual configs 
  352.                    are considered. 
  353.  
  354.     PGL_AUX_BUFFERS 
  355.                    Must be followed by a nonnegative integer that indicates the 
  356.                    desired number of auxiliary buffers. Visual configs with the 
  357.                    smallest number of auxiliary buffers that meets or exceeds 
  358.                    the specified number are preferred. 
  359.  
  360.     PGL_RED_SIZE 
  361.                    Must be followed by a nonnegative minimum size 
  362.                    specification. If this value is zero, the smallest available 
  363.                    red buffer is preferred. Otherwise, the largest available 
  364.                    red buffer of at least the minimum size is preferred. 
  365.  
  366.     PGL_GREEN_SIZE 
  367.                    Must be followed by a nonnegative minimum size 
  368.                    specification. If this value is zero, the smallest available 
  369.                    green buffer is preferred. Otherwise, the largest available 
  370.                    green buffer of at least the minimum size is preferred. 
  371.  
  372.     PGL_BLUE_SIZE 
  373.                    Must be followed by a nonnegative minimum size 
  374.                    specification. If this value is zero, the smallest available 
  375.                    blue buffer is preferred. Otherwise, the largest available 
  376.                    blue buffer of at least the minimum size is preferred. 
  377.  
  378.     PGL_ALPHA_SIZE 
  379.                    Must be followed by a nonnegative minimum size 
  380.                    specification. If this value is zero, the smallest available 
  381.                    alpha buffer is preferred. Otherwise, the largest available 
  382.                    alpha buffer of at least the minimum size is preferred. 
  383.  
  384.     PGL_DEPTH_SIZE 
  385.                    Must be followed by a nonnegative minimum size 
  386.                    specification. If this value is zero, visual configs with no 
  387.                    depth buffer are preferred. Otherwise, the largest available 
  388.                    depth buffer of at least the minimum size is preferred. 
  389.  
  390.     PGL_STENCIL_SIZE 
  391.                    Must be followed by a nonnegative integer that indicates the 
  392.                    desired number of stencil bitplanes. The smallest stencil 
  393.                    buffer of at least the specified size is preferred. If the 
  394.                    desired value is zero, visual configs with no stencil buffer 
  395.                    are preferred. 
  396.  
  397.     PGL_ACCUM_RED_SIZE 
  398.                    Must be followed by a nonnegative minimum size 
  399.                    specification. If this value is zero, visual configs with no 
  400.                    red accumulation buffer are preferred. Otherwise, the 
  401.                    largest possible red accumulation buffer of at least the 
  402.                    minimum  size is preferred. 
  403.  
  404.     PGL_ACCUM_GREEN_SIZE 
  405.                    Must be followed by a nonnegative minimum size 
  406.                    specification. If this value is zero, visual configs with no 
  407.                    green accumulation buffer are preferred. Otherwise, the 
  408.                    largest possible green accumulation buffer of at least the 
  409.                    minimum  size is preferred. 
  410.  
  411.     PGL_ACCUM_BLUE_SIZE 
  412.                    Must be followed by a nonnegative minimum size 
  413.                    specification. If this value is zero, visual configs with no 
  414.                    blue accumulation buffer are preferred. Otherwise, the 
  415.                    largest possible blue accumulation buffer of at least the 
  416.                    minimum size is preferred. 
  417.  
  418.     PGL_ACCUM_ALPHA_SIZE 
  419.                    Must be followed by a nonnegative minimum size 
  420.                    specification. If this value is zero, visual configs with no 
  421.                    alpha accumulation buffer are preferred. Otherwise, the 
  422.                    largest possible alpha accumulation buffer of at least the 
  423.                    minimum size is preferred. 
  424.  
  425.  
  426. ΓòÉΓòÉΓòÉ <hidden> pglChooseConfig Return Value - pVisualConfig ΓòÉΓòÉΓòÉ
  427.  
  428.  pVisualConfig (PVISUALCONFIG *) - returns 
  429.     Pointer to a null-terminated array of pointers to VISUALCONFIG structures 
  430.     containing buffer configs. A NULL is returned if no suitable VisualConfig 
  431.     was found. 
  432.  
  433.  
  434. ΓòÉΓòÉΓòÉ <hidden> pglChooseConfig - Parameters ΓòÉΓòÉΓòÉ
  435.  
  436.  hab (HAB) - input 
  437.     Handle to anchor block. 
  438.  
  439.  attriblist (int *) - input 
  440.     A list of attribute/value pairs. The last attribute in the list must be 
  441.     None. 
  442.  
  443.     The following is a list of valid attributes: 
  444.  
  445.     PGL_USE_GL 
  446.                    Ignored. Only visual configurations that can be rendered 
  447.                    with OpenGL are considered. 
  448.  
  449.     PGL_BUFFER_SIZE 
  450.                    Must be followed by a nonnegative integer that indicates the 
  451.                    desired color index buffer size. The smallest index buffer 
  452.                    of at least the specified size is preferred. Ignored if 
  453.                    PGL_RGBA is asserted. 
  454.  
  455.     PGL_LEVEL 
  456.                    Must be followed by an integer buffer-level specification. 
  457.                    This specification is honored exactly. Buffer level zero 
  458.                    corresponds to the default frame buffer of the display. 
  459.                    Buffer level one is the first overlay frame buffer, level 
  460.                    two the second overlay frame buffer, and so on. Negative 
  461.                    buffer levels correspond to underlay frame buffers. 
  462.  
  463.     PGL_RGBA 
  464.                    If present, only RGBA visual configs are considered. 
  465.                    Otherwise, Color Index visual configs are considered. 
  466.  
  467.     PGL_DOUBLEBUFFER 
  468.                    If present, only double bufferered visual configs are 
  469.                    considered. Otherwise both single buffered and double 
  470.                    buffered visual configs may be considered. 
  471.  
  472.     PGL_SINGLEBUFFER 
  473.                    If present, only single buffered visual configs are 
  474.                    considered. Otherwise both single buffered and double 
  475.                    buffered visual config may be considered. 
  476.  
  477.     PGL_STEREO 
  478.                    If present, only stereo visual configs are considered. 
  479.                    Otherwise, both monoscopic and stereoscopic visual configs 
  480.                    are considered. 
  481.  
  482.     PGL_AUX_BUFFERS 
  483.                    Must be followed by a nonnegative integer that indicates the 
  484.                    desired number of auxiliary buffers. Visual configs with the 
  485.                    smallest number of auxiliary buffers that meets or exceeds 
  486.                    the specified number are preferred. 
  487.  
  488.     PGL_RED_SIZE 
  489.                    Must be followed by a nonnegative minimum size 
  490.                    specification. If this value is zero, the smallest available 
  491.                    red buffer is preferred. Otherwise, the largest available 
  492.                    red buffer of at least the minimum size is preferred. 
  493.  
  494.     PGL_GREEN_SIZE 
  495.                    Must be followed by a nonnegative minimum size 
  496.                    specification. If this value is zero, the smallest available 
  497.                    green buffer is preferred. Otherwise, the largest available 
  498.                    green buffer of at least the minimum size is preferred. 
  499.  
  500.     PGL_BLUE_SIZE 
  501.                    Must be followed by a nonnegative minimum size 
  502.                    specification. If this value is zero, the smallest available 
  503.                    blue buffer is preferred. Otherwise, the largest available 
  504.                    blue buffer of at least the minimum size is preferred. 
  505.  
  506.     PGL_ALPHA_SIZE 
  507.                    Must be followed by a nonnegative minimum size 
  508.                    specification. If this value is zero, the smallest available 
  509.                    alpha buffer is preferred. Otherwise, the largest available 
  510.                    alpha buffer of at least the minimum size is preferred. 
  511.  
  512.     PGL_DEPTH_SIZE 
  513.                    Must be followed by a nonnegative minimum size 
  514.                    specification. If this value is zero, visual configs with no 
  515.                    depth buffer are preferred. Otherwise, the largest available 
  516.                    depth buffer of at least the minimum size is preferred. 
  517.  
  518.     PGL_STENCIL_SIZE 
  519.                    Must be followed by a nonnegative integer that indicates the 
  520.                    desired number of stencil bitplanes. The smallest stencil 
  521.                    buffer of at least the specified size is preferred. If the 
  522.                    desired value is zero, visual configs with no stencil buffer 
  523.                    are preferred. 
  524.  
  525.     PGL_ACCUM_RED_SIZE 
  526.                    Must be followed by a nonnegative minimum size 
  527.                    specification. If this value is zero, visual configs with no 
  528.                    red accumulation buffer are preferred. Otherwise, the 
  529.                    largest possible red accumulation buffer of at least the 
  530.                    minimum  size is preferred. 
  531.  
  532.     PGL_ACCUM_GREEN_SIZE 
  533.                    Must be followed by a nonnegative minimum size 
  534.                    specification. If this value is zero, visual configs with no 
  535.                    green accumulation buffer are preferred. Otherwise, the 
  536.                    largest possible green accumulation buffer of at least the 
  537.                    minimum  size is preferred. 
  538.  
  539.     PGL_ACCUM_BLUE_SIZE 
  540.                    Must be followed by a nonnegative minimum size 
  541.                    specification. If this value is zero, visual configs with no 
  542.                    blue accumulation buffer are preferred. Otherwise, the 
  543.                    largest possible blue accumulation buffer of at least the 
  544.                    minimum size is preferred. 
  545.  
  546.     PGL_ACCUM_ALPHA_SIZE 
  547.                    Must be followed by a nonnegative minimum size 
  548.                    specification. If this value is zero, visual configs with no 
  549.                    alpha accumulation buffer are preferred. Otherwise, the 
  550.                    largest possible alpha accumulation buffer of at least the 
  551.                    minimum size is preferred. 
  552.  
  553.  pVisualConfig (PVISUALCONFIG *) - returns 
  554.     Pointer to a null-terminated array of pointers to VISUALCONFIG structures 
  555.     containing buffer configs. A NULL is returned if no suitable VisualConfig 
  556.     was found. 
  557.  
  558.  
  559. ΓòÉΓòÉΓòÉ <hidden> pglChooseConfig - Remarks ΓòÉΓòÉΓòÉ
  560.  
  561. The pglChooseConfig function returns a suitable PVISUALCONFIG based on the 
  562. minimum requirements passed with attriblist. Each Boolean attribute is matched 
  563. exactly, and each integer attribute meets or exceeds the specified value. All 
  564. Boolean attributes default to False, except PGL_USE_GL, which defaults to True. 
  565. Default attributes are superseded by the attributes listed in attriblist. 
  566. Boolean attributes included in attriblist are understood to be true, and 
  567. integer attributes are followed immediately by the corresponding desired or 
  568. minimum value. Attributes that are not specified have default values listed 
  569. below. The attriblist is terminated by None. 
  570.  
  571. Following is an example for attriblist: 
  572.  
  573. attribList ={PGL_RGBA, PGL_RED_SIZE, 4, PGL_GREEN_SIZE, 4,PGL_BLUE_SIZE, 4,
  574.              PGL_DOUBLEBUFFER, None};
  575.  
  576. The example specifies a double-buffered RGB visual configuration in the normal 
  577. frame buffer, not an overlay or underlay buffer. The returned visual 
  578. configuration supports at least four bits each of red, green, and blue, and 
  579. possibly no bits of alpha. It does not support color index mode or stereo 
  580. display. It may or may not have one or more auxiliary color buffers, a depth 
  581. buffer, a stencil buffer, or an accumulation buffer. 
  582.  
  583. Do not modify the fields of the returned VISUALCONFIG structure. When you are 
  584. done with the PVISUALCONFIG, you can free the memory by calling the C library 
  585. routine free(). 
  586.  
  587.  
  588. ΓòÉΓòÉΓòÉ <hidden> pglChooseConfig - Related Functions ΓòÉΓòÉΓòÉ
  589.  
  590. Related Functions 
  591.  
  592.      pglQueryConfigs 
  593.      pglCreateContext 
  594.  
  595.  
  596. ΓòÉΓòÉΓòÉ <hidden> pglChooseConfig - Topics ΓòÉΓòÉΓòÉ
  597.  
  598. Select an item: 
  599.  
  600. Syntax
  601. Parameters
  602. Returns
  603. Remarks
  604. Related Functions
  605.  
  606.  
  607. ΓòÉΓòÉΓòÉ 2.2. pglCopyContext ΓòÉΓòÉΓòÉ
  608.  
  609.  
  610. ΓòÉΓòÉΓòÉ <hidden> pglCopyContext - Syntax ΓòÉΓòÉΓòÉ
  611.  
  612. This function copies a portion of state from the source OpenGL context to the 
  613. destination OpenGL context. The attrib_mask parameter determines the group of 
  614. state variables that are copied. 
  615.  
  616. #include <pgl.h>
  617.  
  618. HAB       hab;
  619. HGC       hgc_src;
  620. HGC       hgc_dst;
  621. GLuint    attrib_mask;
  622. BOOL      rc;
  623.  
  624. rc = pglCopyContext(hab, hgc_src, hgc_dst,
  625.        attrib_mask);
  626.  
  627.  
  628. ΓòÉΓòÉΓòÉ <hidden> pglCopyContext Parameter - hab ΓòÉΓòÉΓòÉ
  629.  
  630.  hab (HAB) - input 
  631.     Handle to anchor block. 
  632.  
  633.  
  634. ΓòÉΓòÉΓòÉ <hidden> pglCopyContext Parameter - hgc_src ΓòÉΓòÉΓòÉ
  635.  
  636.  hgc_src (HGC) - input 
  637.     Handle to the source OpenGL context. 
  638.  
  639.  
  640. ΓòÉΓòÉΓòÉ <hidden> pglCopyContext Parameter - hgc_dst ΓòÉΓòÉΓòÉ
  641.  
  642.  hgc_dst (HGC) - input 
  643.     Handle to the destination OpenGL context. 
  644.  
  645.  
  646. ΓòÉΓòÉΓòÉ <hidden> pglCopyContext Parameter - attrib_mask ΓòÉΓòÉΓòÉ
  647.  
  648.  attrib_mask (GLuint) - input 
  649.     Specifies the portions of the source context to be copied to the 
  650.     destination context. 
  651.  
  652.  
  653. ΓòÉΓòÉΓòÉ <hidden> pglCopyContext Return Value - rc ΓòÉΓòÉΓòÉ
  654.  
  655.  rc (BOOL) - returns 
  656.     The following values can be returned: 
  657.  
  658.     TRUE           Context was successfully copied from hgc_src to hgc_dst. 
  659.     FALSE          Error occurred. 
  660.  
  661.  
  662. ΓòÉΓòÉΓòÉ <hidden> pglCopyContext - Parameters ΓòÉΓòÉΓòÉ
  663.  
  664.  hab (HAB) - input 
  665.     Handle to anchor block. 
  666.  
  667.  hgc_src (HGC) - input 
  668.     Handle to the source OpenGL context. 
  669.  
  670.  hgc_dst (HGC) - input 
  671.     Handle to the destination OpenGL context. 
  672.  
  673.  attrib_mask (GLuint) - input 
  674.     Specifies the portions of the source context to be copied to the 
  675.     destination context. 
  676.  
  677.  rc (BOOL) - returns 
  678.     The following values can be returned: 
  679.  
  680.     TRUE           Context was successfully copied from hgc_src to hgc_dst. 
  681.     FALSE          Error occurred. 
  682.  
  683.  
  684. ΓòÉΓòÉΓòÉ <hidden> pglCopyContext - Remarks ΓòÉΓòÉΓòÉ
  685.  
  686. attrib_mask contains the bitwise OR of the same symbolic names that can be 
  687. passed to glPushAttrib. Not all values of OpenGL state can be copied. For 
  688. example, pixel pack and pixel unpack state, render mode state, select and 
  689. feedback state are not copied. 
  690.  
  691. To copy the maximum amount of state, set attrib_mask to GL_ALL_ATTRIB_BITS. 
  692. This copy can be done only if hgc_src and hgc_dst are created in the same 
  693. process. 
  694.  
  695. If the source context is not current to the thread issuing the request, the 
  696. state of the destination context is undefined. 
  697.  
  698.  
  699. ΓòÉΓòÉΓòÉ <hidden> pglCopyContext - Related Functions ΓòÉΓòÉΓòÉ
  700.  
  701. Related Functions 
  702.  
  703.      pglCreateContext 
  704.  
  705.  
  706. ΓòÉΓòÉΓòÉ <hidden> pglCopyContext - Topics ΓòÉΓòÉΓòÉ
  707.  
  708. Select an item: 
  709.  
  710. Syntax
  711. Parameters
  712. Returns
  713. Remarks
  714. Related Functions
  715.  
  716.  
  717. ΓòÉΓòÉΓòÉ 2.3. pglCreateContext ΓòÉΓòÉΓòÉ
  718.  
  719.  
  720. ΓòÉΓòÉΓòÉ <hidden> pglCreateContext - Syntax ΓòÉΓòÉΓòÉ
  721.  
  722. This function creates an OpenGL context, using the specified visual 
  723. configuration structure, and returns a handle to the context. 
  724.  
  725. #include <pgl.h>
  726.  
  727. HAB              hab;
  728. PVISUALCONFIG    pVisualConfig;
  729. HGC              ShareList;
  730. BOOL             IsDirect;
  731. HGC              hgc;
  732.  
  733. hgc = pglCreateContext(hab, pVisualConfig,
  734.         ShareList, IsDirect);
  735.  
  736.  
  737. ΓòÉΓòÉΓòÉ <hidden> pglCreateContext Parameter - hab ΓòÉΓòÉΓòÉ
  738.  
  739.  hab (HAB) - input 
  740.     Handle to anchor block. 
  741.  
  742.  
  743. ΓòÉΓòÉΓòÉ <hidden> pglCreateContext Parameter - pVisualConfig ΓòÉΓòÉΓòÉ
  744.  
  745.  pVisualConfig (PVISUALCONFIG) - input 
  746.     Pointer to VISUALCONFIG structure that contains the desired buffer 
  747.     configuration. 
  748.  
  749.  
  750. ΓòÉΓòÉΓòÉ <hidden> pglCreateContext Parameter - ShareList ΓòÉΓòÉΓòÉ
  751.  
  752.  ShareList (HGC) - input 
  753.     Handle of OpenGL context with which to share display lists within a 
  754.     process. 
  755.  
  756.  
  757. ΓòÉΓòÉΓòÉ <hidden> pglCreateContext Parameter - IsDirect ΓòÉΓòÉΓòÉ
  758.  
  759.  IsDirect (BOOL) - input 
  760.     Context to be created is direct. 
  761.  
  762.     TRUE           Bypass Graphics Programming Interface and render directly to 
  763.                    a PM window. (This method is generally faster.) 
  764.  
  765.     FALSE          Use the GpiBitBlt function to blit OpenGL rendering to a PM 
  766.                    window. 
  767.  
  768.  
  769. ΓòÉΓòÉΓòÉ <hidden> pglCreateContext Return Value - hgc ΓòÉΓòÉΓòÉ
  770.  
  771.  hgc (HGC) - returns 
  772.     Handle to successfully created context, or NULL if an error occurred. 
  773.  
  774.  
  775. ΓòÉΓòÉΓòÉ <hidden> pglCreateContext - Parameters ΓòÉΓòÉΓòÉ
  776.  
  777.  hab (HAB) - input 
  778.     Handle to anchor block. 
  779.  
  780.  pVisualConfig (PVISUALCONFIG) - input 
  781.     Pointer to VISUALCONFIG structure that contains the desired buffer 
  782.     configuration. 
  783.  
  784.  ShareList (HGC) - input 
  785.     Handle of OpenGL context with which to share display lists within a 
  786.     process. 
  787.  
  788.  IsDirect (BOOL) - input 
  789.     Context to be created is direct. 
  790.  
  791.     TRUE           Bypass Graphics Programming Interface and render directly to 
  792.                    a PM window. (This method is generally faster.) 
  793.  
  794.     FALSE          Use the GpiBitBlt function to blit OpenGL rendering to a PM 
  795.                    window. 
  796.  
  797.  hgc (HGC) - returns 
  798.     Handle to successfully created context, or NULL if an error occurred. 
  799.  
  800.  
  801. ΓòÉΓòÉΓòÉ <hidden> pglCreateContext - Remarks ΓòÉΓòÉΓòÉ
  802.  
  803. The PVISUALCONFIG structure specifies the frame buffer resources that are 
  804. available to the rendering context. If an OpenGL context is successfully 
  805. created, a handle to it is returned, else NULL is returned. The available 
  806. configurations can be listed through pglQueryConfigs, and chosen using 
  807. pglChooseConfig. 
  808.  
  809. Direct contexts are not available on all OS/2 configurations. If the IsDirect 
  810. parameter is True but a direct context is not available, an indirect context is 
  811. created. To determine the type of OpenGL context you have created, use the 
  812. pglIsIndirect function. 
  813.  
  814. The indirect context uses GpiBitBlt to blit the image to the screen and has 
  815. access to a PM bitmap containing the OpenGL rendered image. The bitmap is not 
  816. guaranteed to contain any OpenGL rendering until the OpenGL graphics pipeline 
  817. has been flushed by glFlush, pglSwapBuffers, or pglWaitGL. 
  818.  
  819. An arbitrary number of contexts can share display lists, but each context must 
  820. be owned by the same process. If ShareList contains an OpenGL context handle, 
  821. all display list definitions are shared by ShareList and the newly created 
  822. context. 
  823.  
  824.  
  825. ΓòÉΓòÉΓòÉ <hidden> pglCreateContext - Related Functions ΓòÉΓòÉΓòÉ
  826.  
  827. Related Functions 
  828.  
  829.      pglQueryConfigs 
  830.      pglChooseConfig 
  831.      pglMakeCurrent 
  832.      pglDestroyContext 
  833.  
  834.  
  835. ΓòÉΓòÉΓòÉ <hidden> pglCreateContext - Topics ΓòÉΓòÉΓòÉ
  836.  
  837. Select an item: 
  838.  
  839. Syntax
  840. Parameters
  841. Returns
  842. Remarks
  843. Related Functions
  844.  
  845.  
  846. ΓòÉΓòÉΓòÉ 2.4. pglDestroyContext ΓòÉΓòÉΓòÉ
  847.  
  848.  
  849. ΓòÉΓòÉΓòÉ <hidden> pglDestroyContext - Syntax ΓòÉΓòÉΓòÉ
  850.  
  851. This function destroys an OpenGL context and the resources it owns. If the 
  852. context is currently bound to a window handle, the call to pglDestroyContext is 
  853. ignored. 
  854.  
  855. #include <pgl.h>
  856.  
  857. HAB     hab;
  858. HGC     hgc;
  859. BOOL    rc;
  860.  
  861. rc = pglDestroyContext(hab, hgc);
  862.  
  863.  
  864. ΓòÉΓòÉΓòÉ <hidden> pglDestroyContext Parameter - hab ΓòÉΓòÉΓòÉ
  865.  
  866.  hab (HAB) - input 
  867.     Handle to anchor block. 
  868.  
  869.  
  870. ΓòÉΓòÉΓòÉ <hidden> pglDestroyContext Parameter - hgc ΓòÉΓòÉΓòÉ
  871.  
  872.  hgc (HGC) - input 
  873.     Handle to an OpenGL context. 
  874.  
  875.  
  876. ΓòÉΓòÉΓòÉ <hidden> pglDestroyContext Return Value - rc ΓòÉΓòÉΓòÉ
  877.  
  878.  rc (BOOL) - returns 
  879.     The following values can be returned: 
  880.  
  881.     TRUE           Context was successfully destroyed, or context was bound to 
  882.                    a window. 
  883.     FALSE          Error occurred. 
  884.  
  885.     If the context handle is currently bound to a window, pglDestroyContext 
  886.     returns without destroying the handle. The context can be unbound from the 
  887.     window by calling pglMakeCurrent (hab,NULL,None). 
  888.  
  889.  
  890. ΓòÉΓòÉΓòÉ <hidden> pglDestroyContext - Parameters ΓòÉΓòÉΓòÉ
  891.  
  892.  hab (HAB) - input 
  893.     Handle to anchor block. 
  894.  
  895.  hgc (HGC) - input 
  896.     Handle to an OpenGL context. 
  897.  
  898.  rc (BOOL) - returns 
  899.     The following values can be returned: 
  900.  
  901.     TRUE           Context was successfully destroyed, or context was bound to 
  902.                    a window. 
  903.     FALSE          Error occurred. 
  904.  
  905.     If the context handle is currently bound to a window, pglDestroyContext 
  906.     returns without destroying the handle. The context can be unbound from the 
  907.     window by calling pglMakeCurrent (hab,NULL,None). 
  908.  
  909.  
  910. ΓòÉΓòÉΓòÉ <hidden> pglDestroyContext - Related Functions ΓòÉΓòÉΓòÉ
  911.  
  912. Related Functions 
  913.  
  914.      pglCreateContext 
  915.      pglMakeCurrent 
  916.  
  917.  
  918. ΓòÉΓòÉΓòÉ <hidden> pglDestroyContext - Topics ΓòÉΓòÉΓòÉ
  919.  
  920. Select an item: 
  921.  
  922. Syntax
  923. Parameters
  924. Returns
  925. Related Functions
  926.  
  927.  
  928. ΓòÉΓòÉΓòÉ 2.5. pglGetCurrentContext ΓòÉΓòÉΓòÉ
  929.  
  930.  
  931. ΓòÉΓòÉΓòÉ <hidden> pglGetCurrentContext - Syntax ΓòÉΓòÉΓòÉ
  932.  
  933. This function looks up the current OpenGL context for the process. A context is 
  934. current if it is the last context to be bound to a window by calling 
  935. pglMakeCurrent. 
  936.  
  937. #include <pgl.h>
  938.  
  939. HAB    hab;
  940. HGC    hgc;
  941.  
  942. hgc = pglGetCurrentContext(hab);
  943.  
  944.  
  945. ΓòÉΓòÉΓòÉ <hidden> pglGetCurrentContext Parameter - hab ΓòÉΓòÉΓòÉ
  946.  
  947.  hab (HAB) - input 
  948.     Handle to anchor block. 
  949.  
  950.  
  951. ΓòÉΓòÉΓòÉ <hidden> pglGetCurrentContext Return Value - hgc ΓòÉΓòÉΓòÉ
  952.  
  953.  hgc (HGC) - returns 
  954.     Handle to the current context. NULL is returned if no current context 
  955.     exists for this process. 
  956.  
  957.  
  958. ΓòÉΓòÉΓòÉ <hidden> pglGetCurrentContext - Parameters ΓòÉΓòÉΓòÉ
  959.  
  960.  hab (HAB) - input 
  961.     Handle to anchor block. 
  962.  
  963.  hgc (HGC) - returns 
  964.     Handle to the current context. NULL is returned if no current context 
  965.     exists for this process. 
  966.  
  967.  
  968. ΓòÉΓòÉΓòÉ <hidden> pglGetCurrentContext - Remarks ΓòÉΓòÉΓòÉ
  969.  
  970. Only one current context is allowed per process. 
  971.  
  972.  
  973. ΓòÉΓòÉΓòÉ <hidden> pglGetCurrentContext - Related Functions ΓòÉΓòÉΓòÉ
  974.  
  975. Related Functions 
  976.  
  977.      pglMakeCurrent 
  978.      pglCreateContext 
  979.      pglGetCurrentWindow 
  980.  
  981.  
  982. ΓòÉΓòÉΓòÉ <hidden> pglGetCurrentContext - Topics ΓòÉΓòÉΓòÉ
  983.  
  984. Select an item: 
  985.  
  986. Syntax
  987. Parameters
  988. Returns
  989. Remarks
  990. Related Functions
  991.  
  992.  
  993. ΓòÉΓòÉΓòÉ 2.6. pglGetCurrentWindow ΓòÉΓòÉΓòÉ
  994.  
  995.  
  996. ΓòÉΓòÉΓòÉ <hidden> pglGetCurrentWindow - Syntax ΓòÉΓòÉΓòÉ
  997.  
  998. This function returns the current window handle that is bound to an OpenGL 
  999. context. A window is current if it was the last window to be bound to an OpenGL 
  1000. context by calling pglMakeCurrent. 
  1001.  
  1002. #include <pgl.h>
  1003.  
  1004. HAB     hab;
  1005. HWND    hwnd;
  1006.  
  1007. hwnd = pglGetCurrentWindow(hab);
  1008.  
  1009.  
  1010. ΓòÉΓòÉΓòÉ <hidden> pglGetCurrentWindow Parameter - hab ΓòÉΓòÉΓòÉ
  1011.  
  1012.  hab (HAB) - input 
  1013.     Handle to anchor block. 
  1014.  
  1015.  
  1016. ΓòÉΓòÉΓòÉ <hidden> pglGetCurrentWindow Return Value - hwnd ΓòÉΓòÉΓòÉ
  1017.  
  1018.  hwnd (HWND) - returns 
  1019.     Handle to the current window that is bound to an OpenGL context. NULL is 
  1020.     returned if no window is currently bound to any OpenGL context for the 
  1021.     calling process. 
  1022.  
  1023.  
  1024. ΓòÉΓòÉΓòÉ <hidden> pglGetCurrentWindow - Parameters ΓòÉΓòÉΓòÉ
  1025.  
  1026.  hab (HAB) - input 
  1027.     Handle to anchor block. 
  1028.  
  1029.  hwnd (HWND) - returns 
  1030.     Handle to the current window that is bound to an OpenGL context. NULL is 
  1031.     returned if no window is currently bound to any OpenGL context for the 
  1032.     calling process. 
  1033.  
  1034.  
  1035. ΓòÉΓòÉΓòÉ <hidden> pglGetCurrentWindow - Remarks ΓòÉΓòÉΓòÉ
  1036.  
  1037. Only one current window is allowed per process. 
  1038.  
  1039.  
  1040. ΓòÉΓòÉΓòÉ <hidden> pglGetCurrentWindow - Related Functions ΓòÉΓòÉΓòÉ
  1041.  
  1042. Related Functions 
  1043.  
  1044.      pglMakeCurrent 
  1045.      pglGetCurrentContext 
  1046.  
  1047.  
  1048. ΓòÉΓòÉΓòÉ <hidden> pglGetCurrentWindow - Topics ΓòÉΓòÉΓòÉ
  1049.  
  1050. Select an item: 
  1051.  
  1052. Syntax
  1053. Parameters
  1054. Returns
  1055. Remarks
  1056. Related Functions
  1057.  
  1058.  
  1059. ΓòÉΓòÉΓòÉ 2.7. pglGrabFrontBitmap ΓòÉΓòÉΓòÉ
  1060.  
  1061.  
  1062. ΓòÉΓòÉΓòÉ <hidden> pglGrabFrontBitmap - Syntax ΓòÉΓòÉΓòÉ
  1063.  
  1064. This function queries the HPS and HBITMAP containing the bitmap representation 
  1065. of the front buffer of the current OpenGL window. Valid values are returned 
  1066. only if you are rendering with an indirect context. 
  1067.  
  1068. #include <pgl.h>
  1069.  
  1070. HAB          hab;
  1071. HPS         *phps;
  1072. HBITMAP     *phbitmap;
  1073. BOOL         rc;
  1074.  
  1075. rc = pglGrabFrontBitmap(hab, phps, phbitmap);
  1076.  
  1077.  
  1078. ΓòÉΓòÉΓòÉ <hidden> pglGrabFrontBitmap Parameter - hab ΓòÉΓòÉΓòÉ
  1079.  
  1080.  hab (HAB) - input 
  1081.     Handle to anchor block. 
  1082.  
  1083.  
  1084. ΓòÉΓòÉΓòÉ <hidden> pglGrabFrontBitmap Parameter - phps ΓòÉΓòÉΓòÉ
  1085.  
  1086.  phps (HPS *) - input 
  1087.     Pointer returning HPS with phbitmap set in it. 
  1088.  
  1089.  
  1090. ΓòÉΓòÉΓòÉ <hidden> pglGrabFrontBitmap Parameter - phbitmap ΓòÉΓòÉΓòÉ
  1091.  
  1092.  phbitmap (HBITMAP *) - input 
  1093.     Pointer returning HBITMAP containing OpenGL rendering. 
  1094.  
  1095.  
  1096. ΓòÉΓòÉΓòÉ <hidden> pglGrabFrontBitmap Return Value - rc ΓòÉΓòÉΓòÉ
  1097.  
  1098.  rc (BOOL) - returns 
  1099.  
  1100.     TRUE           Bitmap has been grabbed. 
  1101.     FALSE          No Current window exists for this process. 
  1102.  
  1103.  
  1104. ΓòÉΓòÉΓòÉ <hidden> pglGrabFrontBitmap - Parameters ΓòÉΓòÉΓòÉ
  1105.  
  1106.  hab (HAB) - input 
  1107.     Handle to anchor block. 
  1108.  
  1109.  phps (HPS *) - input 
  1110.     Pointer returning HPS with phbitmap set in it. 
  1111.  
  1112.  phbitmap (HBITMAP *) - input 
  1113.     Pointer returning HBITMAP containing OpenGL rendering. 
  1114.  
  1115.  rc (BOOL) - returns 
  1116.  
  1117.     TRUE           Bitmap has been grabbed. 
  1118.     FALSE          No Current window exists for this process. 
  1119.  
  1120.  
  1121. ΓòÉΓòÉΓòÉ <hidden> pglGrabFrontBitmap - Remarks ΓòÉΓòÉΓòÉ
  1122.  
  1123. After locking the bitmap with pglGrabFrontBitmap, the application should call 
  1124. pglReleaseFrontBitmap as soon as possible to release the bitmap. While the 
  1125. bitmap is locked, the application cannot receive WM_SIZE or WM_ADJUSTPOSITION 
  1126. messages in the current OpenGL hwnd, and the current window cannot be sized. An 
  1127. implicit glFlush occurs before this call completes. Applications must call 
  1128. pglReleaseFrontBitmap when they are done with the HBITMAP. 
  1129.  
  1130. The HBITMAP is valid only for the time between calls to pglGrabFrontBitmap and 
  1131. pglReleaseFrontBitmap. The HPS is valid until the current window is unbound by 
  1132. calling pglMakeCurrent. 
  1133.  
  1134. While the bitmap is locked, applications should not: 
  1135.  
  1136.      Destroy the HPS or HBITMAP. 
  1137.      Use GpiSetPalette to modify the HPS's color palette. 
  1138.      Disassociate the HPS from its DC or unset the bitmap from HPS. 
  1139.      Set any PS size, units, and format using GpiSetPS. 
  1140.  
  1141.  In other words, "Look, but don't touch!" 
  1142.  
  1143.  See pglWaitPM and pglWaitGL for integrating OpenGL and Gpi drawing. 
  1144.  
  1145.  
  1146. ΓòÉΓòÉΓòÉ <hidden> pglGrabFrontBitmap - Related Functions ΓòÉΓòÉΓòÉ
  1147.  
  1148. Related Functions 
  1149.  
  1150.      pglIsIndirect 
  1151.      pglReleaseFrontBitmap 
  1152.      pglWaitGL 
  1153.      pglWaitPM 
  1154.  
  1155.  
  1156. ΓòÉΓòÉΓòÉ <hidden> pglGrabFrontBitmap - Topics ΓòÉΓòÉΓòÉ
  1157.  
  1158. Select an item: 
  1159.  
  1160. Syntax
  1161. Parameters
  1162. Returns
  1163. Remarks
  1164. Related Functions
  1165.  
  1166.  
  1167. ΓòÉΓòÉΓòÉ 2.8. pglIsIndirect ΓòÉΓòÉΓòÉ
  1168.  
  1169.  
  1170. ΓòÉΓòÉΓòÉ <hidden> pglIsIndirect - Syntax ΓòÉΓòÉΓòÉ
  1171.  
  1172. This function determines whether a context handle belongs to a direct context 
  1173. or an indirect one. The specified context handle must have been returned from 
  1174. pglCreateContext. 
  1175.  
  1176. #include <pgl.h>
  1177.  
  1178. HAB     hab;
  1179. HGC     hgc;
  1180. LONG    rc;
  1181.  
  1182. rc = pglIsIndirect(hab, hgc);
  1183.  
  1184.  
  1185. ΓòÉΓòÉΓòÉ <hidden> pglIsIndirect Parameter - hab ΓòÉΓòÉΓòÉ
  1186.  
  1187.  hab (HAB) - input 
  1188.     Handle to anchor block. 
  1189.  
  1190.  
  1191. ΓòÉΓòÉΓòÉ <hidden> pglIsIndirect Parameter - hgc ΓòÉΓòÉΓòÉ
  1192.  
  1193.  hgc (HGC) - input 
  1194.     Handle to an OpenGL context. 
  1195.  
  1196.  
  1197. ΓòÉΓòÉΓòÉ <hidden> pglIsIndirect Return Value - rc ΓòÉΓòÉΓòÉ
  1198.  
  1199.  rc (LONG) - returns 
  1200.     The following values can be returned: 
  1201.  
  1202.     0              This Context bypasses GPI and is faster. 
  1203.     < 0            Error occurred. 
  1204.     1              This Context uses conventional PM blitting methods and is 
  1205.                    slower. However it allows an application to integrate OpenGL 
  1206.                    and GPI rendering commands. See Remarks section. 
  1207.  
  1208.  
  1209. ΓòÉΓòÉΓòÉ <hidden> pglIsIndirect - Parameters ΓòÉΓòÉΓòÉ
  1210.  
  1211.  hab (HAB) - input 
  1212.     Handle to anchor block. 
  1213.  
  1214.  hgc (HGC) - input 
  1215.     Handle to an OpenGL context. 
  1216.  
  1217.  rc (LONG) - returns 
  1218.     The following values can be returned: 
  1219.  
  1220.     0              This Context bypasses GPI and is faster. 
  1221.     < 0            Error occurred. 
  1222.     1              This Context uses conventional PM blitting methods and is 
  1223.                    slower. However it allows an application to integrate OpenGL 
  1224.                    and GPI rendering commands. See Remarks section. 
  1225.  
  1226.  
  1227. ΓòÉΓòÉΓòÉ <hidden> pglIsIndirect - Remarks ΓòÉΓòÉΓòÉ
  1228.  
  1229. If pglIsIndirect returns 1, it uses GPI to blit OpenGL rendering. Integration 
  1230. of OpenGL and GPI rendering functions is allowed only on indirect contexts and 
  1231. is controlled through the use of pglWaitPM and pglWaitGL Applications must call 
  1232. pglGrabFrontBitmap when they need access to the actual bitmap, and call 
  1233. pglReleaseFrontBitmap when they are done with it. The PM bitmap is not 
  1234. guaranteed to contain any OpenGL rendering until the OpenGL graphics pipeline 
  1235. has been flushed by a call to glFlush, pglSwapBuffers, or pglWaitGL. 
  1236.  
  1237. Most things that can be done with GPI can also be done with OpenGL, so in most 
  1238. cases it is simpler to use OpenGL with direct contexts, which are usually 
  1239. faster than indirect contexts. 
  1240.  
  1241.  
  1242. ΓòÉΓòÉΓòÉ <hidden> pglIsIndirect - Related Functions ΓòÉΓòÉΓòÉ
  1243.  
  1244. Related Functions 
  1245.  
  1246.      pglCreateContext 
  1247.  
  1248.  
  1249. ΓòÉΓòÉΓòÉ <hidden> pglIsIndirect - Topics ΓòÉΓòÉΓòÉ
  1250.  
  1251. Select an item: 
  1252.  
  1253. Syntax
  1254. Parameters
  1255. Returns
  1256. Remarks
  1257. Related Functions
  1258.  
  1259.  
  1260. ΓòÉΓòÉΓòÉ 2.9. pglMakeCurrent ΓòÉΓòÉΓòÉ
  1261.  
  1262.  
  1263. ΓòÉΓòÉΓòÉ <hidden> pglMakeCurrent - Syntax ΓòÉΓòÉΓòÉ
  1264.  
  1265. This function binds an OpenGL context to an OS/2 PM window. Only one context 
  1266. can be bound to a window at a time. 
  1267.  
  1268. #include <pgl.h>
  1269.  
  1270. HAB     hab;
  1271. HGC     hgc;
  1272. HWND    hwnd;
  1273. BOOL    rc;
  1274.  
  1275. rc = pglMakeCurrent(hab, hgc, hwnd);
  1276.  
  1277.  
  1278. ΓòÉΓòÉΓòÉ <hidden> pglMakeCurrent Parameter - hab ΓòÉΓòÉΓòÉ
  1279.  
  1280.  hab (HAB) - input 
  1281.     Handle to anchor block. 
  1282.  
  1283.  
  1284. ΓòÉΓòÉΓòÉ <hidden> pglMakeCurrent Parameter - hgc ΓòÉΓòÉΓòÉ
  1285.  
  1286.  hgc (HGC) - input 
  1287.     Handle to an OpenGL context. 
  1288.  
  1289.  
  1290. ΓòÉΓòÉΓòÉ <hidden> pglMakeCurrent Parameter - hwnd ΓòÉΓòÉΓòÉ
  1291.  
  1292.  hwnd (HWND) - input 
  1293.     Handle to a PM window. 
  1294.  
  1295.  
  1296. ΓòÉΓòÉΓòÉ <hidden> pglMakeCurrent Return Value - rc ΓòÉΓòÉΓòÉ
  1297.  
  1298.  rc (BOOL) - returns 
  1299.     The following values may be returned: 
  1300.  
  1301.     TRUE           Context was successfully destroyed, or context was bound to 
  1302.                    a window. 
  1303.     FALSE          Error occurred. 
  1304.  
  1305.  
  1306. ΓòÉΓòÉΓòÉ <hidden> pglMakeCurrent - Parameters ΓòÉΓòÉΓòÉ
  1307.  
  1308.  hab (HAB) - input 
  1309.     Handle to anchor block. 
  1310.  
  1311.  hgc (HGC) - input 
  1312.     Handle to an OpenGL context. 
  1313.  
  1314.  hwnd (HWND) - input 
  1315.     Handle to a PM window. 
  1316.  
  1317.  rc (BOOL) - returns 
  1318.     The following values may be returned: 
  1319.  
  1320.     TRUE           Context was successfully destroyed, or context was bound to 
  1321.                    a window. 
  1322.     FALSE          Error occurred. 
  1323.  
  1324.  
  1325. ΓòÉΓòÉΓòÉ <hidden> pglMakeCurrent - Remarks ΓòÉΓòÉΓòÉ
  1326.  
  1327. This function replaces the old current context (if there was one) with the new 
  1328. context specified by hgc. Before unbinding the old context, an implicit flush 
  1329. of the old context takes place. Subsequent OpenGL rendering calls use hgc to 
  1330. modify hwnd. 
  1331.  
  1332. The first time hgc is made current to a window, its viewport is initialized to 
  1333. the full size of hwnd. Subsequent calls to pglMakeCurrent with hgc do not 
  1334. affect its viewport. 
  1335.  
  1336. To unbind the current context without binding a new context, issue the call 
  1337. pglMakeCurrent(hab,NULL,None). 
  1338.  
  1339. For an OpenGL context to be bound to a PM window, the window should be created 
  1340. with window client class CS_SIZEREDRAW and CS_MOVENOTIFY. During the time the 
  1341. context is bound to the window, the application cannot subclass the window with 
  1342. WinSubclassWindow. 
  1343.  
  1344.  
  1345. ΓòÉΓòÉΓòÉ <hidden> pglMakeCurrent - Related Functions ΓòÉΓòÉΓòÉ
  1346.  
  1347. Related Functions 
  1348.  
  1349.      pglCreateContext 
  1350.      pglGetCurrentContext 
  1351.      pglGetCurrentWindow 
  1352.  
  1353.  
  1354. ΓòÉΓòÉΓòÉ <hidden> pglMakeCurrent - Topics ΓòÉΓòÉΓòÉ
  1355.  
  1356. Select an item: 
  1357.  
  1358. Syntax
  1359. Parameters
  1360. Returns
  1361. Remarks
  1362. Related Functions
  1363.  
  1364.  
  1365. ΓòÉΓòÉΓòÉ 2.10. pglQueryCapability ΓòÉΓòÉΓòÉ
  1366.  
  1367.  
  1368. ΓòÉΓòÉΓòÉ <hidden> pglQueryCapability - Syntax ΓòÉΓòÉΓòÉ
  1369.  
  1370. This function queries the OpenGL capability of the current machine. 
  1371.  
  1372. #include <pgl.h>
  1373.  
  1374. HAB     hab;
  1375. LONG    rc;
  1376.  
  1377. rc = pglQueryCapability(hab);
  1378.  
  1379.  
  1380. ΓòÉΓòÉΓòÉ <hidden> pglQueryCapability Parameter - hab ΓòÉΓòÉΓòÉ
  1381.  
  1382.  hab (HAB) - input 
  1383.     Handle to anchor block. 
  1384.  
  1385.  
  1386. ΓòÉΓòÉΓòÉ <hidden> pglQueryCapability Return Value - rc ΓòÉΓòÉΓòÉ
  1387.  
  1388.  rc (LONG) - returns 
  1389.  
  1390.     NULL           No OpenGL Support on this machine. 
  1391.     1              OpenGL Support available through PM and DIVE. 
  1392.     2              OpenGL support available through PM blitting only. 
  1393.     3              Advanced OpenGL support available. 
  1394.  
  1395.  
  1396. ΓòÉΓòÉΓòÉ <hidden> pglQueryCapability - Parameters ΓòÉΓòÉΓòÉ
  1397.  
  1398.  hab (HAB) - input 
  1399.     Handle to anchor block. 
  1400.  
  1401.  rc (LONG) - returns 
  1402.  
  1403.     NULL           No OpenGL Support on this machine. 
  1404.     1              OpenGL Support available through PM and DIVE. 
  1405.     2              OpenGL support available through PM blitting only. 
  1406.     3              Advanced OpenGL support available. 
  1407.  
  1408.  
  1409. ΓòÉΓòÉΓòÉ <hidden> pglQueryCapability - Topics ΓòÉΓòÉΓòÉ
  1410.  
  1411. Select an item: 
  1412.  
  1413. Syntax
  1414. Parameters
  1415. Returns
  1416.  
  1417.  
  1418. ΓòÉΓòÉΓòÉ 2.11. pglQueryConfigs ΓòÉΓòÉΓòÉ
  1419.  
  1420.  
  1421. ΓòÉΓòÉΓòÉ <hidden> pglQueryConfigs - Syntax ΓòÉΓòÉΓòÉ
  1422.  
  1423. This function returns a NULL terminated array of pointers to available visual 
  1424. configuration structures. 
  1425.  
  1426. #include <pgl.h>
  1427.  
  1428. HAB              hab;
  1429. PVISUALCONFIG    pVisualConfig;
  1430.  
  1431. pVisualConfig = pglQueryConfigs(hab);
  1432.  
  1433.  
  1434. ΓòÉΓòÉΓòÉ <hidden> pglQueryConfigs Parameter - hab ΓòÉΓòÉΓòÉ
  1435.  
  1436.  hab (HAB) - input 
  1437.     Handle to anchor block. 
  1438.  
  1439.  
  1440. ΓòÉΓòÉΓòÉ <hidden> pglQueryConfigs Return Value - pVisualConfig ΓòÉΓòÉΓòÉ
  1441.  
  1442.  pVisualConfig (PVISUALCONFIG) - returns 
  1443.     A NULL-terminated array of pointers to VISUALCONFIG structures. The list of 
  1444.     structures is not guaranteed to be in any certain order. A NULL is returned 
  1445.     if no suitable VISUALCONFIG was found. 
  1446.  
  1447.  
  1448. ΓòÉΓòÉΓòÉ <hidden> pglQueryConfigs - Parameters ΓòÉΓòÉΓòÉ
  1449.  
  1450.  hab (HAB) - input 
  1451.     Handle to anchor block. 
  1452.  
  1453.  pVisualConfig (PVISUALCONFIG) - returns 
  1454.     A NULL-terminated array of pointers to VISUALCONFIG structures. The list of 
  1455.     structures is not guaranteed to be in any certain order. A NULL is returned 
  1456.     if no suitable VISUALCONFIG was found. 
  1457.  
  1458.  
  1459. ΓòÉΓòÉΓòÉ <hidden> pglQueryConfigs - Remarks ΓòÉΓòÉΓòÉ
  1460.  
  1461. A visual configuration structure defines the buffers that are available to the 
  1462. OpenGL rendering context. A VISUALCONFIG is required to create an OpenGL 
  1463. context and is used for rendering operations such as depth, accumulation, 
  1464. alpha, and stenciling. 
  1465.  
  1466. After pglQueryConfigs returns the available visual configurations, the 
  1467. application should choose the visual configuration that has only the buffers 
  1468. that will be used by the rendering context. Your application can call 
  1469. pglChooseConfig, which chooses a suitable configuration based on the minimum 
  1470. requirements you specify. 
  1471.  
  1472. Note:  Do not modify the fields of the returned PVISUALCONFIG structures. When 
  1473. your application is done with the returned PVISUALCONFIG list , that memory can 
  1474. be freed by calling the C library routine free(). 
  1475.  
  1476.  
  1477. ΓòÉΓòÉΓòÉ <hidden> pglQueryConfigs - Related Functions ΓòÉΓòÉΓòÉ
  1478.  
  1479. Related Functions 
  1480.  
  1481.      pglChooseConfig 
  1482.      pglCreateContext 
  1483.  
  1484.  
  1485. ΓòÉΓòÉΓòÉ <hidden> pglQueryConfigs - Topics ΓòÉΓòÉΓòÉ
  1486.  
  1487. Select an item: 
  1488.  
  1489. Syntax
  1490. Parameters
  1491. Returns
  1492. Remarks
  1493. Related Functions
  1494.  
  1495.  
  1496. ΓòÉΓòÉΓòÉ 2.12. pglReleaseFrontBitmap ΓòÉΓòÉΓòÉ
  1497.  
  1498.  
  1499. ΓòÉΓòÉΓòÉ <hidden> pglReleaseFrontBitmap - Syntax ΓòÉΓòÉΓòÉ
  1500.  
  1501. This function releases the HBITMAP that was grabbed using pglGrabFrontBitmap. 
  1502. The calling process can now begin receiving WM_SIZE and WM_ADJUSTPOSITION 
  1503. messages in its current OpenGL window again. 
  1504.  
  1505. #include <pgl.h>
  1506.  
  1507. HAB     hab;
  1508. BOOL    rc;
  1509.  
  1510. rc = pglReleaseFrontBitmap(hab);
  1511.  
  1512.  
  1513. ΓòÉΓòÉΓòÉ <hidden> pglReleaseFrontBitmap Parameter - hab ΓòÉΓòÉΓòÉ
  1514.  
  1515.  hab (HAB) - input 
  1516.     Handle to anchor block. 
  1517.  
  1518.  
  1519. ΓòÉΓòÉΓòÉ <hidden> pglReleaseFrontBitmap Return Value - rc ΓòÉΓòÉΓòÉ
  1520.  
  1521.  rc (BOOL) - returns 
  1522.  
  1523.     TRUE           Bitmap was released. 
  1524.     FALSE          No bitmap needs to be released. 
  1525.  
  1526.  
  1527. ΓòÉΓòÉΓòÉ <hidden> pglReleaseFrontBitmap - Parameters ΓòÉΓòÉΓòÉ
  1528.  
  1529.  hab (HAB) - input 
  1530.     Handle to anchor block. 
  1531.  
  1532.  rc (BOOL) - returns 
  1533.  
  1534.     TRUE           Bitmap was released. 
  1535.     FALSE          No bitmap needs to be released. 
  1536.  
  1537.  
  1538. ΓòÉΓòÉΓòÉ <hidden> pglReleaseFrontBitmap - Remarks ΓòÉΓòÉΓòÉ
  1539.  
  1540. See pglWaitPM and pglWaitGL for integrating OpenGL and PM drawing. Applications 
  1541. should call pglReleaseFrontBitmap as soon as possible after locking the bitmap 
  1542. with pglGrabFrontBitmap. 
  1543.  
  1544.  
  1545. ΓòÉΓòÉΓòÉ <hidden> pglReleaseFrontBitmap - Related Functions ΓòÉΓòÉΓòÉ
  1546.  
  1547. Related Functions 
  1548.  
  1549.      pglIsIndirect 
  1550.      pglGrabFrontBitmap 
  1551.      pglWaitGL 
  1552.      pglWaitPM 
  1553.  
  1554.  
  1555. ΓòÉΓòÉΓòÉ <hidden> pglReleaseFrontBitmap - Topics ΓòÉΓòÉΓòÉ
  1556.  
  1557. Select an item: 
  1558.  
  1559. Syntax
  1560. Parameters
  1561. Returns
  1562. Remarks
  1563. Related Functions
  1564.  
  1565.  
  1566. ΓòÉΓòÉΓòÉ 2.13. pglSelectColorIndexPalette ΓòÉΓòÉΓòÉ
  1567.  
  1568.  
  1569. ΓòÉΓòÉΓòÉ <hidden> pglSelectColorIndexPalette - Syntax ΓòÉΓòÉΓòÉ
  1570.  
  1571. This function passes a color index palette for OpenGL to use and is needed only 
  1572. when using a context created with a color index VISUALCONFIG. When using an RGB 
  1573. VISUALCONFIG, OpenGL sets up the palette itself and selects it when needed. The 
  1574. call to pglSelectColorIndexPalette must be made before a context can be bound 
  1575. to a window for the first time. 
  1576.  
  1577. #include <pgl.h>
  1578.  
  1579. HAB     hab;   /*  Handle to the anchor block. */
  1580. HPAL    hpal;  /*  Handle to the palette. */
  1581. HGC     hgc;   /*  Handle to the color index OpenGL context. */
  1582. BOOL    rc;    /*  Success indicator. */
  1583.  
  1584. rc = pglSelectColorIndexPalette(hab, hpal,
  1585.        hgc);
  1586.  
  1587.  
  1588. ΓòÉΓòÉΓòÉ <hidden> pglSelectColorIndexPalette Parameter - hab ΓòÉΓòÉΓòÉ
  1589.  
  1590.  hab (HAB) - input 
  1591.     Handle to the anchor block. 
  1592.  
  1593.  
  1594. ΓòÉΓòÉΓòÉ <hidden> pglSelectColorIndexPalette Parameter - hpal ΓòÉΓòÉΓòÉ
  1595.  
  1596.  hpal (HPAL) - input 
  1597.     Handle to the palette. 
  1598.  
  1599.  
  1600. ΓòÉΓòÉΓòÉ <hidden> pglSelectColorIndexPalette Parameter - hgc ΓòÉΓòÉΓòÉ
  1601.  
  1602.  hgc (HGC) - input 
  1603.     Handle to the color index OpenGL context. 
  1604.  
  1605.  
  1606. ΓòÉΓòÉΓòÉ <hidden> pglSelectColorIndexPalette Return Value - rc ΓòÉΓòÉΓòÉ
  1607.  
  1608.  rc (BOOL) - returns 
  1609.     Success indicator. 
  1610.  
  1611.     TRUE           Palette selection was successful. 
  1612.     FALSE          An error occurred. 
  1613.  
  1614.  
  1615. ΓòÉΓòÉΓòÉ <hidden> pglSelectColorIndexPalette - Parameters ΓòÉΓòÉΓòÉ
  1616.  
  1617.  hab (HAB) - input 
  1618.     Handle to the anchor block. 
  1619.  
  1620.  hpal (HPAL) - input 
  1621.     Handle to the palette. 
  1622.  
  1623.  hgc (HGC) - input 
  1624.     Handle to the color index OpenGL context. 
  1625.  
  1626.  rc (BOOL) - returns 
  1627.     Success indicator. 
  1628.  
  1629.     TRUE           Palette selection was successful. 
  1630.     FALSE          An error occurred. 
  1631.  
  1632.  
  1633. ΓòÉΓòÉΓòÉ <hidden> pglSelectColorIndexPalette - Remarks ΓòÉΓòÉΓòÉ
  1634.  
  1635. Do not call GpiSelectPalette; OpenGL does this for you. The 
  1636. pglSelectColorIndexPalette function is used only for Color Index contexts. 
  1637.  
  1638.  
  1639. ΓòÉΓòÉΓòÉ <hidden> pglSelectColorIndexPalette - Topics ΓòÉΓòÉΓòÉ
  1640.  
  1641. Select an item: 
  1642.  
  1643. Syntax
  1644. Parameters
  1645. Returns
  1646. Remarks
  1647.  
  1648.  
  1649. ΓòÉΓòÉΓòÉ 2.14. pglSwapBuffers ΓòÉΓòÉΓòÉ
  1650.  
  1651.  
  1652. ΓòÉΓòÉΓòÉ <hidden> pglSwapBuffers - Syntax ΓòÉΓòÉΓòÉ
  1653.  
  1654. This function swaps the front and back buffers of hwnd. Double-buffered 
  1655. rendering is done when smooth animation between frames is desired. 
  1656.  
  1657. #include <pgl.h>
  1658.  
  1659. HAB     hab;
  1660. HWND    hwnd;
  1661.  
  1662. pglSwapBuffers(hab, hwnd);
  1663.  
  1664.  
  1665. ΓòÉΓòÉΓòÉ <hidden> pglSwapBuffers Parameter - hab ΓòÉΓòÉΓòÉ
  1666.  
  1667.  hab (HAB) - input 
  1668.     Handle to anchor block. 
  1669.  
  1670.  
  1671. ΓòÉΓòÉΓòÉ <hidden> pglSwapBuffers Parameter - hwnd ΓòÉΓòÉΓòÉ
  1672.  
  1673.  hwnd (HWND) - input 
  1674.     Handle to a PM window. 
  1675.  
  1676.  
  1677. ΓòÉΓòÉΓòÉ <hidden> pglSwapBuffers - Return Value ΓòÉΓòÉΓòÉ
  1678.  
  1679.  
  1680. ΓòÉΓòÉΓòÉ <hidden> pglSwapBuffers - Parameters ΓòÉΓòÉΓòÉ
  1681.  
  1682.  hab (HAB) - input 
  1683.     Handle to anchor block. 
  1684.  
  1685.  hwnd (HWND) - input 
  1686.     Handle to a PM window. 
  1687.  
  1688.  
  1689. ΓòÉΓòÉΓòÉ <hidden> pglSwapBuffers - Remarks ΓòÉΓòÉΓòÉ
  1690.  
  1691. When a window's buffers are swapped, the back buffer becomes the front, and the 
  1692. front buffer becomes the back. An implicit glFlush is done by pglSwapBuffers 
  1693. before it returns. OpenGL commands issued after calling pglSwapBuffers are not 
  1694. issued until the buffer swap is complete. This function has no effect on 
  1695. windows attached to single-buffered contexts. 
  1696.  
  1697. The programmer can control which buffer is affected by OpenGL rendering calls 
  1698. through the use of glDrawBuffer. Front and back buffers are not created for a 
  1699. window until it has been bound to an OpenGL context. The window specified by 
  1700. hwnd does not have to be currently bound to an OpenGL context; it needs only to 
  1701. have been bound at some point. This function has no effect on a PM window that 
  1702. has never been bound to an OpenGL context. 
  1703.  
  1704.  
  1705. ΓòÉΓòÉΓòÉ <hidden> pglSwapBuffers - Topics ΓòÉΓòÉΓòÉ
  1706.  
  1707. Select an item: 
  1708.  
  1709. Syntax
  1710. Parameters
  1711. Returns
  1712. Remarks
  1713.  
  1714.  
  1715. ΓòÉΓòÉΓòÉ 2.15. pglUseFont ΓòÉΓòÉΓòÉ
  1716.  
  1717.  
  1718. ΓòÉΓòÉΓòÉ <hidden> pglUseFont - Syntax ΓòÉΓòÉΓòÉ
  1719.  
  1720. This function creates the specified number (count) of OpenGL display lists 
  1721. containing bitmaps of the named logical character set identifier (llcid). 
  1722.  
  1723. #include <pgl.h>
  1724.  
  1725. HAB       hab;
  1726. HPS       hps;
  1727. FATTRS    fattrs;
  1728. LONG      llcid;
  1729. int       first;
  1730. int       count;
  1731. int       listbase;
  1732. BOOL      rc;
  1733.  
  1734. rc = pglUseFont(hab, hps, fattrs, llcid, first,
  1735.        count, listbase);
  1736.  
  1737.  
  1738. ΓòÉΓòÉΓòÉ <hidden> pglUseFont Parameter - hab ΓòÉΓòÉΓòÉ
  1739.  
  1740.  hab (HAB) - input 
  1741.     Handle to anchor block. 
  1742.  
  1743.  
  1744. ΓòÉΓòÉΓòÉ <hidden> pglUseFont Parameter - hps ΓòÉΓòÉΓòÉ
  1745.  
  1746.  hps (HPS) - input 
  1747.     Handle to a PS that the logical font was created with. 
  1748.  
  1749.  
  1750. ΓòÉΓòÉΓòÉ <hidden> pglUseFont Parameter - fattrs ΓòÉΓòÉΓòÉ
  1751.  
  1752.  fattrs (FATTRS) - input 
  1753.     Font Attributes (was used in GpiCreateLogFont). 
  1754.  
  1755.  
  1756. ΓòÉΓòÉΓòÉ <hidden> pglUseFont Parameter - llcid ΓòÉΓòÉΓòÉ
  1757.  
  1758.  llcid (LONG) - input 
  1759.     Logical Set ID for created Logical Font. 
  1760.  
  1761.  
  1762. ΓòÉΓòÉΓòÉ <hidden> pglUseFont Parameter - first ΓòÉΓòÉΓòÉ
  1763.  
  1764.  first (int) - input 
  1765.     Index of first glyph to be taken. 
  1766.  
  1767.  
  1768. ΓòÉΓòÉΓòÉ <hidden> pglUseFont Parameter - count ΓòÉΓòÉΓòÉ
  1769.  
  1770.  count (int) - input 
  1771.     Number of glyphs to be taken. 
  1772.  
  1773.  
  1774. ΓòÉΓòÉΓòÉ <hidden> pglUseFont Parameter - listbase ΓòÉΓòÉΓòÉ
  1775.  
  1776.  listbase (int) - input 
  1777.     Index of first display list to be created. 
  1778.  
  1779.  
  1780. ΓòÉΓòÉΓòÉ <hidden> pglUseFont Return Value - rc ΓòÉΓòÉΓòÉ
  1781.  
  1782.  rc (BOOL) - returns 
  1783.  
  1784.     FALSE          Error occurred. 
  1785.     TRUE           Bitmap display lists were successfully created. 
  1786.  
  1787.  
  1788. ΓòÉΓòÉΓòÉ <hidden> pglUseFont - Parameters ΓòÉΓòÉΓòÉ
  1789.  
  1790.  hab (HAB) - input 
  1791.     Handle to anchor block. 
  1792.  
  1793.  hps (HPS) - input 
  1794.     Handle to a PS that the logical font was created with. 
  1795.  
  1796.  fattrs (FATTRS) - input 
  1797.     Font Attributes (was used in GpiCreateLogFont). 
  1798.  
  1799.  llcid (LONG) - input 
  1800.     Logical Set ID for created Logical Font. 
  1801.  
  1802.  first (int) - input 
  1803.     Index of first glyph to be taken. 
  1804.  
  1805.  count (int) - input 
  1806.     Number of glyphs to be taken. 
  1807.  
  1808.  listbase (int) - input 
  1809.     Index of first display list to be created. 
  1810.  
  1811.  rc (BOOL) - returns 
  1812.  
  1813.     FALSE          Error occurred. 
  1814.     TRUE           Bitmap display lists were successfully created. 
  1815.  
  1816.  
  1817. ΓòÉΓòÉΓòÉ <hidden> pglUseFont - Remarks ΓòÉΓòÉΓòÉ
  1818.  
  1819. Before calling pglUseFont, the application should create the OS/2 logical font 
  1820. using the specified hps, llcid, and fattrs 
  1821.  
  1822. Each bitmap consists of a single glBitmap command. Display lists are numbered 
  1823. listbase, through listbase + count -1. The parameters to glBitmap for display 
  1824. list listbase +i are derived from bitmap first +i in the logical font. OpenGL 
  1825. might delay glBitmap creation until a font glyph is accessed. 
  1826.  
  1827. Empty display lists are created for all glyphs requested but not defined in the 
  1828. logical font. No display lists are created if there is no current OpenGL 
  1829. context. 
  1830.  
  1831.  
  1832. ΓòÉΓòÉΓòÉ <hidden> pglUseFont - Related Functions ΓòÉΓòÉΓòÉ
  1833.  
  1834. Related Functions 
  1835.  
  1836.      pglIsIndirect 
  1837.      pglWaitGL 
  1838.      pglWaitPM 
  1839.  
  1840.  
  1841. ΓòÉΓòÉΓòÉ <hidden> pglUseFont - Topics ΓòÉΓòÉΓòÉ
  1842.  
  1843. Select an item: 
  1844.  
  1845. Syntax
  1846. Parameters
  1847. Returns
  1848. Remarks
  1849. Related Functions
  1850.  
  1851.  
  1852. ΓòÉΓòÉΓòÉ 2.16. pglWaitGL ΓòÉΓòÉΓòÉ
  1853.  
  1854.  
  1855. ΓòÉΓòÉΓòÉ <hidden> pglWaitGL - Syntax ΓòÉΓòÉΓòÉ
  1856.  
  1857. This function ensures that all OpenGL rendering commands made before the call 
  1858. to pglWaitGL are executed, and that the GPI rendering calls made after 
  1859. pglWaitGL is issued are executed after the return of pglWaitGL. 
  1860.  
  1861. #include <pgl.h>
  1862.  
  1863. HAB    hab;
  1864. HPS    hps;
  1865.  
  1866. hps = pglWaitGL(hab);
  1867.  
  1868.  
  1869. ΓòÉΓòÉΓòÉ <hidden> pglWaitGL Parameter - hab ΓòÉΓòÉΓòÉ
  1870.  
  1871.  hab (HAB) - input 
  1872.     Handle to anchor block. 
  1873.  
  1874.  
  1875. ΓòÉΓòÉΓòÉ <hidden> pglWaitGL Return Value - hps ΓòÉΓòÉΓòÉ
  1876.  
  1877.  hps (HPS) - returns 
  1878.     Handle to the PS that is used to blit the OpenGL image to the screen. This 
  1879.     HPS can be used for GPI drawing commands. NULL is returned if no current 
  1880.     context exists, or if the current context is not using GPI to display 
  1881.     OpenGL images. 
  1882.  
  1883.  
  1884. ΓòÉΓòÉΓòÉ <hidden> pglWaitGL - Parameters ΓòÉΓòÉΓòÉ
  1885.  
  1886.  hab (HAB) - input 
  1887.     Handle to anchor block. 
  1888.  
  1889.  hps (HPS) - returns 
  1890.     Handle to the PS that is used to blit the OpenGL image to the screen. This 
  1891.     HPS can be used for GPI drawing commands. NULL is returned if no current 
  1892.     context exists, or if the current context is not using GPI to display 
  1893.     OpenGL images. 
  1894.  
  1895.  
  1896. ΓòÉΓòÉΓòÉ <hidden> pglWaitGL - Remarks ΓòÉΓòÉΓòÉ
  1897.  
  1898. The pglWaitGL and pglWaitPM functions enable an application to alternate GPI 
  1899. rendering functions with OpenGL rendering functions. Intermingling of GPI 
  1900. drawing with OpenGL drawing is allowed only on OpenGL indirect contexts, which 
  1901. use GPI to blit OpenGL rendering functions to the screen. 
  1902.  
  1903. The pglWaitGL function flushes the OpenGL rendering stream in preparation for 
  1904. the issuing of GPI rendering functions to the current indirect context. The 
  1905. call to pglWaitGL is ignored if there is no current context or if the current 
  1906. context is a direct context. 
  1907.  
  1908. The return value for this function is HPS, which has the bitmap set in it to be 
  1909. the bitmap containing OpenGL rendering. 
  1910.  
  1911.  
  1912. ΓòÉΓòÉΓòÉ <hidden> pglWaitGL - Related Functions ΓòÉΓòÉΓòÉ
  1913.  
  1914. Related Functions 
  1915.  
  1916.      pglIsIndirect 
  1917.      pglWaitPM 
  1918.  
  1919.  
  1920. ΓòÉΓòÉΓòÉ <hidden> pglWaitGL - Topics ΓòÉΓòÉΓòÉ
  1921.  
  1922. Select an item: 
  1923.  
  1924. Syntax
  1925. Parameters
  1926. Returns
  1927. Remarks
  1928. Related Functions
  1929.  
  1930.  
  1931. ΓòÉΓòÉΓòÉ 2.17. pglWaitPM ΓòÉΓòÉΓòÉ
  1932.  
  1933.  
  1934. ΓòÉΓòÉΓòÉ <hidden> pglWaitPM - Syntax ΓòÉΓòÉΓòÉ
  1935.  
  1936. This function ensures that all GPI rendering commands made before the call to 
  1937. pglWaitPM are executed before the execution of OpenGL rendering calls made 
  1938. after pglWaitPM. 
  1939.  
  1940. #include <pgl.h>
  1941.  
  1942. HAB     hab;
  1943.  
  1944. pglWaitPM(hab);
  1945.  
  1946.  
  1947. ΓòÉΓòÉΓòÉ <hidden> pglWaitPM Parameter - hab ΓòÉΓòÉΓòÉ
  1948.  
  1949.  hab (HAB) - input 
  1950.     Handle to anchor block. 
  1951.  
  1952.  
  1953. ΓòÉΓòÉΓòÉ <hidden> pglWaitPM - Return Value ΓòÉΓòÉΓòÉ
  1954.  
  1955.  
  1956. ΓòÉΓòÉΓòÉ <hidden> pglWaitPM - Parameters ΓòÉΓòÉΓòÉ
  1957.  
  1958.  hab (HAB) - input 
  1959.     Handle to anchor block. 
  1960.  
  1961.  
  1962. ΓòÉΓòÉΓòÉ <hidden> pglWaitPM - Remarks ΓòÉΓòÉΓòÉ
  1963.  
  1964. Intermingling of GPI drawing with OpenGL drawing is allowed only on OpenGL 
  1965. indirect contexts. Indirect contexts use GPI to blit OpenGL rendering functions 
  1966. to the screen. GPI drawing is not guaranteed to be visible until pglWaitPM has 
  1967. been called. 
  1968.  
  1969. GPI has no concept of front and back buffers; therefore all GPI drawing 
  1970. commands are assumed to affect the OpenGL front buffer. 
  1971.  
  1972. The call to pglWaitPM is ignored if there is no current context. 
  1973.  
  1974.  
  1975. ΓòÉΓòÉΓòÉ <hidden> pglWaitPM - Related Functions ΓòÉΓòÉΓòÉ
  1976.  
  1977. Related Functions 
  1978.  
  1979.      pglIsIndirect 
  1980.      pglWaitGL 
  1981.  
  1982.  
  1983. ΓòÉΓòÉΓòÉ <hidden> pglWaitPM - Topics ΓòÉΓòÉΓòÉ
  1984.  
  1985. Select an item: 
  1986.  
  1987. Syntax
  1988. Parameters
  1989. Returns
  1990. Remarks
  1991. Related Functions
  1992.  
  1993.  
  1994. ΓòÉΓòÉΓòÉ 2.18. OpenGL Data Types ΓòÉΓòÉΓòÉ
  1995.  
  1996. This section describes the following data types that are used with the pgl 
  1997. functions: 
  1998.  
  1999.      VISUALCONFIG 
  2000.  
  2001.  
  2002. ΓòÉΓòÉΓòÉ 2.19. VISUALCONFIG ΓòÉΓòÉΓòÉ
  2003.  
  2004. The Visual Configuration structure is required when creating an OpenGL context. 
  2005.  
  2006. typedef struct _VISUALCONFIG {
  2007.   ULONG                     vid;             /*  Visual ID. */
  2008.   BOOL                      rgba;
  2009.   int                       redSize;
  2010.   int                       greenSize;
  2011.   int                       blueSize;
  2012.   int                       alphaSize;
  2013.   ULONG                     redMask;
  2014.   ULONG                     greenMask;
  2015.   ULONG                     blueMask;
  2016.   ULONG                     accumRedSize;
  2017.   ULONG                     accumGreenSize;
  2018.   ULONG                     accumBlueSize;
  2019.   ULONG                     accumAlphaSize;
  2020.   BOOL                      doubleBuffer;
  2021.   BOOL                      stereo;
  2022.   int                       bufferSize;
  2023.   int                       depthSize;
  2024.   int                       stencilSize;
  2025.   int                       auxBuffers;
  2026.   int                       level;
  2027.   PVOID                     reserved;
  2028.   struct visualconfig      *next;
  2029. } VISUALCONFIG;
  2030.  
  2031. typedef VISUALCONFIG *PVISUALCONFIG;
  2032.  
  2033.  
  2034. ΓòÉΓòÉΓòÉ <hidden> VISUALCONFIG Field - vid ΓòÉΓòÉΓòÉ
  2035.  
  2036.  vid (ULONG) 
  2037.     Visual ID. 
  2038.  
  2039.  
  2040. ΓòÉΓòÉΓòÉ <hidden> VISUALCONFIG Field - rgba ΓòÉΓòÉΓòÉ
  2041.  
  2042.  rgba (BOOL) 
  2043.  
  2044.  
  2045. ΓòÉΓòÉΓòÉ <hidden> VISUALCONFIG Field - redSize ΓòÉΓòÉΓòÉ
  2046.  
  2047.  redSize (int) 
  2048.  
  2049.  
  2050. ΓòÉΓòÉΓòÉ <hidden> VISUALCONFIG Field - greenSize ΓòÉΓòÉΓòÉ
  2051.  
  2052.  greenSize (int) 
  2053.  
  2054.  
  2055. ΓòÉΓòÉΓòÉ <hidden> VISUALCONFIG Field - blueSize ΓòÉΓòÉΓòÉ
  2056.  
  2057.  blueSize (int) 
  2058.  
  2059.  
  2060. ΓòÉΓòÉΓòÉ <hidden> VISUALCONFIG Field - alphaSize ΓòÉΓòÉΓòÉ
  2061.  
  2062.  alphaSize (int) 
  2063.  
  2064.  
  2065. ΓòÉΓòÉΓòÉ <hidden> VISUALCONFIG Field - redMask ΓòÉΓòÉΓòÉ
  2066.  
  2067.  redMask (ULONG) 
  2068.  
  2069.  
  2070. ΓòÉΓòÉΓòÉ <hidden> VISUALCONFIG Field - greenMask ΓòÉΓòÉΓòÉ
  2071.  
  2072.  greenMask (ULONG) 
  2073.  
  2074.  
  2075. ΓòÉΓòÉΓòÉ <hidden> VISUALCONFIG Field - blueMask ΓòÉΓòÉΓòÉ
  2076.  
  2077.  blueMask (ULONG) 
  2078.  
  2079.  
  2080. ΓòÉΓòÉΓòÉ <hidden> VISUALCONFIG Field - accumRedSize ΓòÉΓòÉΓòÉ
  2081.  
  2082.  accumRedSize (ULONG) 
  2083.  
  2084.  
  2085. ΓòÉΓòÉΓòÉ <hidden> VISUALCONFIG Field - accumGreenSize ΓòÉΓòÉΓòÉ
  2086.  
  2087.  accumGreenSize (ULONG) 
  2088.  
  2089.  
  2090. ΓòÉΓòÉΓòÉ <hidden> VISUALCONFIG Field - accumBlueSize ΓòÉΓòÉΓòÉ
  2091.  
  2092.  accumBlueSize (ULONG) 
  2093.  
  2094.  
  2095. ΓòÉΓòÉΓòÉ <hidden> VISUALCONFIG Field - accumAlphaSize ΓòÉΓòÉΓòÉ
  2096.  
  2097.  accumAlphaSize (ULONG) 
  2098.  
  2099.  
  2100. ΓòÉΓòÉΓòÉ <hidden> VISUALCONFIG Field - doubleBuffer ΓòÉΓòÉΓòÉ
  2101.  
  2102.  doubleBuffer (BOOL) 
  2103.  
  2104.  
  2105. ΓòÉΓòÉΓòÉ <hidden> VISUALCONFIG Field - stereo ΓòÉΓòÉΓòÉ
  2106.  
  2107.  stereo (BOOL) 
  2108.  
  2109.  
  2110. ΓòÉΓòÉΓòÉ <hidden> VISUALCONFIG Field - bufferSize ΓòÉΓòÉΓòÉ
  2111.  
  2112.  bufferSize (int) 
  2113.  
  2114.  
  2115. ΓòÉΓòÉΓòÉ <hidden> VISUALCONFIG Field - depthSize ΓòÉΓòÉΓòÉ
  2116.  
  2117.  depthSize (int) 
  2118.  
  2119.  
  2120. ΓòÉΓòÉΓòÉ <hidden> VISUALCONFIG Field - stencilSize ΓòÉΓòÉΓòÉ
  2121.  
  2122.  stencilSize (int) 
  2123.  
  2124.  
  2125. ΓòÉΓòÉΓòÉ <hidden> VISUALCONFIG Field - auxBuffers ΓòÉΓòÉΓòÉ
  2126.  
  2127.  auxBuffers (int) 
  2128.  
  2129.  
  2130. ΓòÉΓòÉΓòÉ <hidden> VISUALCONFIG Field - level ΓòÉΓòÉΓòÉ
  2131.  
  2132.  level (int) 
  2133.  
  2134.  
  2135. ΓòÉΓòÉΓòÉ <hidden> VISUALCONFIG Field - reserved ΓòÉΓòÉΓòÉ
  2136.  
  2137.  reserved (PVOID) 
  2138.  
  2139.  
  2140. ΓòÉΓòÉΓòÉ <hidden> VISUALCONFIG Field - next ΓòÉΓòÉΓòÉ
  2141.  
  2142.  next (struct visualconfig *) 
  2143.  
  2144.  
  2145. ΓòÉΓòÉΓòÉ 2.20. OpenGL Sample ΓòÉΓòÉΓòÉ
  2146.  
  2147. The following sample code draws a gouraud shaded octahedron. 
  2148.  
  2149. /* sample code for using OpenGL and PGL  */
  2150. /* Draws a gouraud shaded octahedron     */
  2151.  
  2152. #include <stdio.h>
  2153. #include "pgl.h"     /* PGL calls    */
  2154. #include "gl.h"      /* OpenGL calls */
  2155. #define PM_ESCAPE 0x0f
  2156. #define MSGBOXID 22
  2157. #define SQRT2  1.414
  2158.  
  2159. /* attributes passed into pglChooseConfig */
  2160. int attriblist[] = {
  2161.   PGL_DOUBLEBUFFER,  /* request doublebuffered visual config   */
  2162.   PGL_RGBA,          /* request rgb (true color) visual config */
  2163.   None               /* always end list with this              */
  2164. };
  2165.  
  2166. HAB hab;
  2167.  
  2168. void DispError(PSZ errstr)
  2169. {
  2170.   char buffer[256];
  2171.   sprintf(buffer, "Error (0x%x) in SAMPOGL.EXE:", WinGetLastError(hab));
  2172.   WinMessageBox(HWND_DESKTOP,HWND_DESKTOP,errstr,buffer,
  2173.                 MSGBOXID,MB_MOVEABLE!MB_CUACRITICAL!MB_CANCEL);
  2174.   exit(0);
  2175. }
  2176.  
  2177. void Setup()
  2178. {
  2179.   glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE);
  2180.   glDepthMask(GL_FALSE);
  2181.   glEnable(GL_CULL_FACE);
  2182. }
  2183.  
  2184. float verts[][3] = {
  2185.   { 0.0, 0.0, (1.0/SQRT2)},
  2186.   { 0.5, 0.5, 0.0},
  2187.   {-0.5, 0.5, 0.0},
  2188.   {-0.5,-0.5, 0.0},
  2189.   { 0.5,-0.5, 0.0},
  2190.   { 0.0, 0.0, -(1.0/SQRT2)}
  2191. };
  2192.  
  2193. float colors[][3] = {
  2194.   {1.0, 1.0, 1.0},
  2195.   {1.0, 0.0, 0.0},
  2196.   {0.0, 1.0, 0.0},
  2197.   {0.0, 0.0, 1.0},
  2198.   {1.0, 0.0, 1.0},
  2199.   {0.0, 1.0, 1.0},
  2200. };
  2201.  
  2202. MRESULT EXPENTRY WindowProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
  2203. {
  2204.   static float t = 0.0;
  2205.   static SWP clientsize;
  2206.   static USHORT mycode;
  2207.   static UCHAR key;
  2208.  
  2209.   switch(msg) {
  2210.   case WM_SIZE:
  2211.     /* Upon a resize, query new window size and set OpenGL viewport */
  2212.     WinQueryWindowPos(hwnd,&clientsize);
  2213.     glViewport(0, 0, clientsize.cx, clientsize.cy);
  2214.     return WinDefWindowProc(hwnd, msg, mp1, mp2);
  2215.   case WM_TIMER:
  2216.     /* Upon getting a timer message, the invalidate rectangle call  */
  2217.     /* will cause a WM_PAINT message to be sent, enabling animation */
  2218.     WinInvalidateRect(hwnd, NULLHANDLE, NULL);
  2219.     return WinDefWindowProc(hwnd, msg, mp1, mp2);
  2220.   case WM_PAINT:
  2221.     /* This is what is done for every frame of the animation        */
  2222.     t += 1.0;
  2223.     glClear(GL_COLOR_BUFFER_BIT ! GL_DEPTH_BUFFER_BIT);
  2224.     glPushMatrix();
  2225.     glRotatef(t, 1.0, 1.0, 1.0);
  2226.     glBegin(GL_TRIANGLE_FAN);
  2227.       glColor3fv(colors[0]);
  2228.       glVertex3fv(verts[0]);
  2229.       glColor3fv(colors[1]);
  2230.       glVertex3fv(verts[1]);
  2231.       glColor3fv(colors[2]);
  2232.       glVertex3fv(verts[2]);
  2233.       glColor3fv(colors[3]);
  2234.       glVertex3fv(verts[3]);
  2235.       glColor3fv(colors[4]);
  2236.       glVertex3fv(verts[4]);
  2237.       glColor3fv(colors[1]);
  2238.       glVertex3fv(verts[1]);
  2239.     glEnd();
  2240.     glBegin(GL_TRIANGLE_FAN);
  2241.       glColor3fv(colors[5]);
  2242.       glVertex3fv(verts[5]);
  2243.       glColor3fv(colors[1]);
  2244.       glVertex3fv(verts[1]);
  2245.       glColor3fv(colors[4]);
  2246.       glVertex3fv(verts[4]);
  2247.       glColor3fv(colors[3]);
  2248.       glVertex3fv(verts[3]);
  2249.       glColor3fv(colors[2]);
  2250.       glVertex3fv(verts[2]);
  2251.       glColor3fv(colors[1]);
  2252.       glVertex3fv(verts[1]);
  2253.     glEnd();
  2254.     glPopMatrix();
  2255.     pglSwapBuffers(hab, hwnd);
  2256.     return WinDefWindowProc(hwnd, msg, mp1, mp2);
  2257.   case WM_CHAR:
  2258.     mycode = (USHORT)SHORT1FROMMP(mp1);
  2259.     if ((mycode & KC_CHAR) && !(mycode & KC_KEYUP))
  2260.       key = CHAR1FROMMP(mp2);
  2261.     else if ((mycode & KC_VIRTUALKEY) && !(mycode & KC_KEYUP))
  2262.       key = CHAR3FROMMP(mp2);
  2263.     if (key == PM_ESCAPE)
  2264.       WinPostMsg(hwnd, WM_CLOSE, (MPARAM)0, (MPARAM)0);
  2265.     return WinDefWindowProc(hwnd, msg, mp1, mp2);
  2266.   default:
  2267.     return WinDefWindowProc(hwnd, msg, mp1, mp2);
  2268.   }
  2269. }
  2270. main(int argc, char **argv)
  2271. {
  2272.   PVISUALCONFIG vishead; /* visual configuration             */
  2273.   HMQ hmq;               /* message queue                    */
  2274.   HWND hwnd;
  2275.   HWND hwndFrame;
  2276.   ULONG createflags = FCF_TITLEBAR !
  2277.                       FCF_SYSMENU  !
  2278.                       FCF_MINMAX   !
  2279.                       FCF_SIZEBORDER;
  2280.   QMSG qmsg;             /* message                          */
  2281.   HGC hgc;               /* OpenGL context                   */
  2282.   int  major, minor;     /* OpenGL version                   */
  2283.   int err;
  2284.  
  2285.   hab = WinInitialize(0);
  2286.   hmq = WinCreateMsgQueue(hab, 0);
  2287.   if (!hmq)
  2288.     DispError("Couldn't create a message queue!\n");
  2289.  
  2290.   /* Check to see if OpenGL exists */
  2291.   if (pglQueryCapability(hab)) {
  2292.     pglQueryVersion(hab, &major, &minor);
  2293.     /* Version 1.0                */
  2294.     if ((major == 1) && (minor == 0)) {
  2295.       /* Choose a visual configuration that matches desired  */
  2296.       /* attributes in attriblist                            */
  2297.       vishead = pglChooseConfig(hab, attriblist);
  2298.       if (!vishead)
  2299.         DispError("Couldn't find a visual!\n");
  2300.       if (WinRegisterClass(
  2301.             hab,
  2302.             (PSZ)"PGLtest",
  2303.             WindowProc,
  2304.             CS_SIZEREDRAW ! CS_MOVENOTIFY, /* Need at least this! */
  2305.             0))
  2306.       {
  2307.         hwndFrame = WinCreateStdWindow (
  2308.                       HWND_DESKTOP,            /* Child of the desktop    */
  2309.                       WS_VISIBLE,              /* Frame style             */
  2310.                       &createflags,        /* min FCF_MENU!FCF_MINMAX */
  2311.                       (PSZ)"PGLtest",  /* class name              */
  2312.                       "OpenGL Sample", /* window title            */
  2313.                       WS_VISIBLE,              /* client style            */
  2314.                       0,                       /* resource handle         */
  2315.                       1,                       /* Resource ID             */
  2316.                       &hwnd);              /* Window handle           */
  2317.         if (!hwndFrame)
  2318.           DispError("Couldn't create a window!\n");
  2319.         /* you must set window size before you call pglMakeCurrent */
  2320.         if (!WinSetWindowPos(
  2321.                hwndFrame,
  2322.                HWND_TOP,
  2323.                0,
  2324.                0,
  2325.                300,
  2326.                300,
  2327.                SWP_ACTIVATE ! SWP_SIZE ! SWP_MOVE ! SWP_SHOW))
  2328.           DispError("Couldn't position window!\n");
  2329.         hgc = pglCreateContext(hab,  /* anchor block handle    */
  2330.                  vishead,            /* visual configuration   */
  2331.                  (HGC)NULL,          /* (no) shared contexts   */
  2332.                  (BOOL)TRUE);        /* direct (fast) context  */
  2333.         if (!hgc)
  2334.           DispError("Couldn't create an OpenGL context!\n");
  2335.         if(!pglMakeCurrent(hab, hgc, hwnd))
  2336.           DispError("Could not bind OpenGL context to window!\n");
  2337.         /* Don't subclass your window past here! */
  2338.         Setup();
  2339.         /* Start timer to cause WM_TIMER messages to be sent   */
  2340.         /* periodically.  This is used to animate.             */
  2341.         WinStartTimer(hab, hwnd, 0L, 0L);
  2342.         while (WinGetMsg(hab, &qmsg, NULLHANDLE, 0, 0))
  2343.           WinDispatchMsg(hab, &qmsg);
  2344.       }
  2345.     }
  2346.   }
  2347. }
  2348.  
  2349.  
  2350. ΓòÉΓòÉΓòÉ 3. Notices ΓòÉΓòÉΓòÉ
  2351.  
  2352. August 1996 
  2353.  
  2354. The following paragraph does not apply to the United Kingdom or any country 
  2355. where such provisions are inconsistent with local law:  INTERNATIONAL BUSINESS 
  2356. MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY 
  2357. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
  2358. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states 
  2359. do not allow disclaimer of express or implied warranties in certain 
  2360. transactions, therefore, this statement may not apply to you. 
  2361.  
  2362. This publication could include technical inaccuracies or typographical errors. 
  2363. Changes are periodically made to the information herein; these changes will be 
  2364. incorporated in new editions of the publication. IBM may make improvements 
  2365. and/or changes in the product(s) and/or the program(s) described in this 
  2366. publication at any time. 
  2367.  
  2368. It is possible that this publication may contain reference to, or information 
  2369. about, IBM products (machines and programs), programming, or services that are 
  2370. not announced in your country.  Such references or information must not be 
  2371. construed to mean that IBM intends to announce such IBM products, programming, 
  2372. or services in your country. 
  2373.  
  2374. Requests for technical information about IBM products should be made to your 
  2375. IBM authorized reseller or IBM marketing representative. 
  2376.  
  2377.  
  2378. ΓòÉΓòÉΓòÉ 3.1. Copyright Notices ΓòÉΓòÉΓòÉ
  2379.  
  2380. COPYRIGHT LICENSE: This publication contains printed sample application 
  2381. programs in source language, which illustrate OS/2 programming techniques. You 
  2382. may copy, modify, and distribute these sample programs in any form without 
  2383. payment to IBM, for the purposes of developing, using, marketing or 
  2384. distributing application programs conforming to the OS/2 application 
  2385. programming interface. 
  2386.  
  2387. Each copy of any portion of these sample programs or any derivative work, which 
  2388. is distributed to others, must include a copyright notice as follows: "(C) 
  2389. (your company name) (year).  All rights reserved." 
  2390.  
  2391. (C) Copyright International Business Machines Corporation 1996. All rights 
  2392. reserved. 
  2393. Note to U.S. Government Users - Documentation related to restricted rights - 
  2394. Use, duplication or disclosure is subject to restrictions set forth in GSA ADP 
  2395. Schedule Contract with IBM Corp. 
  2396.  
  2397.  
  2398. ΓòÉΓòÉΓòÉ 3.2. Disclaimers ΓòÉΓòÉΓòÉ
  2399.  
  2400. References in this publication to IBM products, programs, or services do not 
  2401. imply that IBM intends to make these available in all countries in which IBM 
  2402. operates. Any reference to an IBM product, program or service is not intended 
  2403. to state or imply that only IBM's product, program, or service may be used. Any 
  2404. functionally equivalent product, program, or service that does not infringe any 
  2405. of IBM's intellectual property rights or other legally protectable rights may 
  2406. be used instead of the IBM product, program, or service. Evaluation and 
  2407. verification of operation in conjunction with other products, programs, or 
  2408. services, except those expressly designated by IBM, are the user's 
  2409. responsibility. 
  2410.  
  2411. IBM may have patents or pending patent applications covering subject matter in 
  2412. this document. The furnishing of this document does not give you any license to 
  2413. these patents. You can send license inquiries, in writing, to the IBM Director 
  2414. of Licensing, IBM Corporation, 500 Columbus Avenue, Thornwood NY 10594, U.S.A. 
  2415.  
  2416.  
  2417. ΓòÉΓòÉΓòÉ 3.3. Trademarks ΓòÉΓòÉΓòÉ
  2418.  
  2419. The following terms, denoted by an asterisk (*) in this publication, are 
  2420. trademarks of the IBM Corporation in the United States or other countries: 
  2421.  
  2422. IBM
  2423. PM
  2424. Presentation Manager
  2425. OS/2
  2426.  
  2427. The following terms, denoted by a double asterisk (**) in this publication, are 
  2428. trademarks of other companies as follows. Other trademarks are trademarks of 
  2429. their respective companies. 
  2430.  
  2431.  OpenGL              Silicon Graphics, Inc. 
  2432.