overview of OpenGL
the OpenGL product
Chapter 114
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
OGLImp.book Page 14 Tuesday, February 14, 2006 9:15 AM