HP XL Class 500/550MHz hp visualize workstation - Getting started guide for gr - Page 11

Compiling and Linking OpenGL Applications

Page 11 highlights

Getting Started Compiling and Linking OpenGL Applications Compiling and Linking OpenGL Applications The HP OpenGL library has its own gl.h with HP extensions defined in that file. (see /usr/GL/hp/include/GL/gl.h). Simply including "" will give you the HP file unless the program is compiled with the -I/usr/X11R6/include option. If the program is compiled with the -I/usr/X11R6/include option, the MesaGL library that is shipped as a part of Red Hat 6.2 will be pulled in instead of the HP include file because the MesaGL gl.h is in /usr/X11R6/include for now. To avoid getting the MesaGL gl.h, HP recommends that all GL programs are compiled with the -I/usr/GL/hp/include compile option before the -I/usr/X11R6/include option. This is not necessary unless the program is accessing some of the HP extensions. Linking the program is simple and can be accomplished through the typical -lGL and -lGLU link line. For example: cc -lGL -lGLU -o donkey donkey.c The HP libraries are generally compatible with the Mesa libraries, but Mesa has 1.2 extensions that the HP libraries do not have. Tuning the HP Visualize fx5 and fx10 driver Getting the card to avoid image tearing for a more visually pleasing, but slightly slower, result on high frame rate, double-buffered, animations is done by setting an environment variable: export HPOGL_DSM_DISABLE_FAST_BUFFER_SWAP=1 Chapter 1 11

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

Chapter 1
11
Getting Started
Compiling and Linking OpenGL Applications
Compiling and Linking OpenGL Applications
The HP OpenGL library has its own
gl.h
with HP extensions defined in that file. (see
/usr/GL/hp/include/GL/gl.h
). Simply including “<GL/gl.h>” will give you the HP file
unless the program is compiled with the
-I/usr/X11R6/include
option. If the program is
compiled with the
-I/usr/X11R6/include
option, the MesaGL library that is shipped as a
part of Red Hat 6.2 will be pulled in instead of the HP
includ
e file because the MesaGL
gl.h
is in
/usr/X11R6/include
for now. To avoid getting the MesaGL
gl.h
, HP
recommends that all GL programs are compiled with the
-I/usr/GL/hp/include
compile
option before the
-I/usr/X11R6/include
option. This is not necessary unless the program
is accessing some of the HP extensions. Linking the program is simple and can be
accomplished through the typical
-lGL
and
-lGLU
link line.
For example:
cc -lGL -lGLU -o donkey donkey.c
The HP libraries are generally compatible with the Mesa libraries, but Mesa has 1.2
extensions that the HP libraries do not have.
Tuning the HP Visualize
fx
5
and
fx
10
driver
Getting the card to avoid image tearing for a more visually pleasing, but slightly slower, result
on high frame rate, double-buffered, animations is done by setting an environment variable:
export HPOGL_DSM_DISABLE_FAST_BUFFER_SWAP=1