HP c8000 manual Sample 64-bit compile and link for 11.x only, SLS support

Page 16

overview of OpenGL

the OpenGL product

64-bit OpenGL allows “large data space” because the pointers are now 64-bit. But, the OpenGL data types themselves are the same as the

32-bit library. For example, GLint is a 32-bit integer, not a 64-bit long.

All 64-bit OpenGL libraries are located in

/opt/graphics/OpenGL/lib/pa20_64. The following sample compile and link lines may help you to build your application once it has been ported to take advantage of 64-bit capabilities:

Sample 32-bit compile and link:

cc-g -Aa -D_HPUX_SOURCE -z -I/opt/graphics/OpenGL/include\ -I/usr/include/X11R6 -o cube.32 cube.c -L/opt/graphics/OpenGL/lib\

-L/usr/lib/X11R6 -ldld -lGLU -lGL -lXHP11 -lXext -lX11 -lm

Sample 64-bit compile and link (for 11.x only):

cc -g -Aa +DA2.0W -D_HPUX_SOURCE -z

-I/opt/graphics/OpenGL/include -I/usr/include/X11R6 -o cube.64 cube.c -L/opt/graphics/OpenGL/lib/pa20_64 -L/usr/lib/X11R6/pa20_64 -L/usr/lib/pa20_64 -L/usr/lib -ldld\ -lGLU -lGL -lXHP11 -lXext -lX11 -lm

using libGL in 64-bit together with the +compat linker option Because of a limitation in the 64-bit linker, if the +compat linker option is used, -lc must appear in the link order before -lGL. Otherwise, a segmentation violation will occur when running the linked program.

The following partial compile line shows the relevant order:

cc +DA2.OW prog.c -Wl,+compat

-L/opt/graphics/OpenGL/lib/pa20_64 -lc -lGL

When not using -Wl,+compat, the link order should have -lGL before -lc. By default, cc implicitly links in -lc as the last library in a link. Without Wl,+compat, a partial compile line is:

cc +DA2.OW prog.c -L/opt/graphics/OpenGL/lib/pa20_64 -lGL -lc

or

cc +DA2.OW prog.c -L/opt/graphics/OpenGL/lib/pa20_64 -lGL

SLS support

When the display is in a multi-display configuration using the XServer Single Logical Screen (SLS) extension, OpenGL can and will render to windows on or spanning any of the SLS displays. This rendering is done

14

Chapter 1

Image 16
Contents OpenGL Implementation Guide Legal Notices Contents Installation and setup Programming hints Contents Overview of OpenGL Introduction OpenGL Reference ManualHp’s implementation of OpenGL OpenGL productHp’s implementation of the OpenGL libraries Supported graphics devices Supported operating systemsSupported visuals Visual Table for HP Visualize fxeVisual Table for ATI Fire GL T2/X1/X3 Stereo Visual Support for HP Fire GL-UX Visual support for other graphics devicesBuffer sharing between multiple processes and threads Sigchld and the GRM daemonBit programming Sample 64-bit compile and link for 11.x only SLS supportStandard OpenGL product OpenGL Utilities Library GLUInput and output routines OpenGL extensions for the X Window system GLXOpenGL product Mixing of OpenGL and Xlib Gamma correction OpenGL extensions Visibility test extensionsOcclusion extension Occlusion culling code fragmentsEnumerated Types for Occlusion GLHPsupersample extension Default visuals Rendering detailsEXP and EXP2 fogging Bow-tie quadrilateralsDecomposition of concave quadrilaterals Index mode ditheringVertices outside of a begin/end pair Environment variables New environment variables as of release Switches to the faster double buffering method Installation and setup Installation and setup Is your system software preloaded with instant ignition? Verification instructionsVerify that OpenGL is on your workstation Installing OpenGL Install OpenGLOpenGL Development Environment Filesets for 11.0 Check log file Verify the product OpenGL file structure 64-bit libraries are in a subdirectory OpenGL file structure Chapter Running OpenGL programs Visual support for the VGL mode Virtual GLX VGL modeSpecial considerations Bool hpglXDisplayIsVGLDisplay *dpy, int screen Running hps implementation of the OpenGL stereo application Running hps implementation of the OpenGL stereo application Running OpenGL programs Compiling and linking programs Overview Subdirectory This Directory ContainsIncluding header files Linking shared libraries Compiling 32-bit and 64-bit applications for OpenGL OpenGL procedure calls Programming hints Programming hints 4D values OpenGL correctness hintsTexture coordinates Glcompileandexecute mode OpenGL performance hintsDisplay list performance Geometric primitivesDraw array set extensions Textures State changes and their effects on display listsRegular primitive data Texture downloading performance Selection performanceState change Occlusion culling Optimization of lightingHigh frame rate applications Rescaling normals OpenGL performance hints
Related manuals
Manual 27 pages 63.95 Kb Manual 8 pages 32.71 Kb Manual 89 pages 28.35 Kb