HP C8000 OpenGL Implementation Guide for HP-UX 11.x

HP C8000 - Workstation - 0 MB RAM Manual

HP C8000 manual content summary:

  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 1
    OpenGL Implementation Guide for HP-UX 11.x Manufacturing Part Number : B2355-IE002 Edition E0206 © Copyright 2005-2006 by Hewlett-Packard
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 2
    . Hewlett-Packard assumes no responsibility for the use or reliability of its software on equipment that is not furnished by Hewlett-Packard. This document contains proprietary information that is protected by copyright. All rights reserved. No part of this document may be photocopied, reproduced
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 3
    documentation 13 64-bit programming 13 using libGL in 64-bit together with the +compat linker option 14 SLS support 14 the standard OpenGL product 14 the OpenGL Utilities Library (GLU 15 input and output routines 15 the OpenGL extensions for the X Window system (GLX 15 mixing of OpenGL and
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 4
    Contents new environment variables as of release 1.05 24 2. installation and setup verification instructions 29 is your system software preloaded with instant ignition 29 verify that OpenGL is on your workstation 29 installing OpenGL 30 1. install OpenGL 30 2. check log file 32 3. verify the
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 5
    52 draw array set extensions 52 benefits of glDrawArraySethp 53 using glDrawArraySethp 53 textures 54 state changes and their effects on display selection performance 56 state change 56 optimization of lighting 58 occlusion culling 58 high frame rate applications 58 rescaling normals 58
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 6
    Contents 4
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 7
    1 overview of OpenGL Chapter 1 OpenGL is a hardware-independent Application Programming Interface (API) that provides an interface to graphics operations. HP's implementation of OpenGL converts API commands to graphical images via hardware and/or software functionality. 5
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 8
    • Viewing operations • Lighting specifications • Manual A reference that contains details on all standard OpenGL functions, as well as utility (GLU) functions and X-windows (GLX) functions. • OpenGL Programming for the X Window System Instructions on interfacing OpenGL with the X Window system
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 9
    . hp's implementation of OpenGL Topics covered in this section are: • HP's implementation of the OpenGL libraries • Supported graphics devices • Supported visuals • Visual support for depicts the organization of these libraries, which follows the HP-UX standard for 64-bit libraries. Chapter 1 7
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 10
    specifically link in a device driver. supported graphics devices These are the graphics devices that support OpenGL: • HP Visualize fxe • HP Visualize fx-5 • HP Visualize fx-10 • HP Fire GL-UX • ATI FireGL X1 • ATI FireGL T2 • ATI FireGL X3 supported operating systems OpenGL is supported on PA-RISC
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 11
    subsequent section "Visual Support for Other Graphics Devices." Visual Table for HP Visualize fxe X 1 1 0 8 8 8 8 24 4 16 16 16 0 Table 1-3 Visual Table for HP Fire GL-UX X Visual Information OpenGL GLX Information Class Depth Color Map Size Buffer Size Overlay=1 RGBA=1 or or
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 12
    24 8 16 16 16 16 1 1 0 8 8 8 8 24 8 16 16 16 16 stereo visual support for Visualize fx-5, fx-10, and Fire GL-UX When a monitor is configured in a stereo capable mode, HP Visualize fx-5, fx-10 and Fire GL-UX will have the following additional stereo visuals available. For more information on
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 13
    OpenGL support using the Virtual Memory Driver (VMD) in Virtual GLX mode (VGL). In addition, VMD allows you to use many X11 drawables (local or remote) as "virtual devices" for three-dimensional graphics with OpenGL. This includes rendering to X terminals and other non-GLX extended X servers
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 14
    to glXCreateContext or glXMakeCurrent. threads support threads support in November, 1999 11. ACE release Starting with the HP-UX 11.0 Additional Core Enhancements (ACE) (November, 1999) release, HP OpenGL will support Level 1b threads. This means HP OpenGL can be used in a threaded application, but
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 15
    Programming Guide • The OpenGL Reference Manual • Threadtime by S. Norton and M. Dipasquale 64-bit programming Starting with the HP-UX 11.0 Additional Core Enhancements (ACE) (November, 1999) release, HP OpenGL will support 64-bit programming. Applications using 64-bit computing are supported on
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 16
    -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
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 17
    of curves and surfaces (NURBS) • Handling errors For a detailed description of these routines, refer to the Reference section or the OpenGL Reference Manual. input and output routines OpenGL was designed to be independent of operating systems and window systems, therefore, it does not have commands
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 18
    overview of OpenGL the OpenGL product • Off-screen rendering • Double-buffering • Using X fonts For a detailed description of these routines, refer to the Reference section or the OpenGL Reference Manual. 16 Chapter 1
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 19
    the Z-buffer at that location resulted in the depth test passing. Note that mixing Xlib rendering with OpenGL rendering as well as with VMD, when using alpha buffers, can produce unexpected side effects and should be avoided. Chapter 1 17
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 20
    compensate for the non-linearities in the phosphor brightness of monitors. Gamma correction can be used to improve the "ropy" or modulated appearance of antialiased lines. Gamma correction is also used to improve the appearance of shaded graphics images, as well as scanned photographic images that
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 21
    Guide, OpenGL Reference Manual, and OpenGL Programming for the X Window System. visibility test extensions HP supports not be rendered. occlusion culling code fragments The following is a sample code segment that shows a simple box is visible, render part */ glGetBooleanv(GL_OCCLUSION_RESULT_HP, &
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 22
    testing its bounding box. It should also be noted that this occlusion culling functionality is very useful for viewing frustum culling. If a part's bounding box is not visible for any reason (not just because it's occluded in the Z-buffer) this test will give correct results. Table 1-9 To maximize
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 23
    extension defines a mechanism for enabling and disabling a full scene anti-aliasing method. It is supported on Visualize fx-10b, FireGL-UX and FireGL T2/X1/X3 graphics hardware. On the FireGL hardware the X Server must be configured to enable this capability in order for the extension to be present
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 24
    the default visual in the deepest image buffer, HP puts the default visual in the overlay planes. This behavior can be modified using SAM to adjust the Display->X Server Configuration->Screen Options. EXP and EXP2 fogging The Virtual Memory Driver's implementation of fog applies fog per fragment
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 25
    two triangles between vertices zero and two or one and three depending on the vertex causing concavity. vertices outside of a begin/end pair HP's implementation of this specification is indeterminate as defined by the OpenGL standard. index mode dithering If dithering is enabled in indexed visuals
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 26
    , rendering speed will slow down. If rendering is identical in both hardware and software, then this may indicate a problem in the application code. HPOGL_LIB_PATH This variable can be used to load OpenGL driver libraries from a directory outside the standard LIB_PATH. This variable should be set to
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 27
    Space" and "Optimization of Lighting" found in Chapter 5. This option is available only for the HP Visualize fx family of graphics devices. HPOGL_TXTR_SHMEM_THRESHOLD (HP Visualize fx family only) This variable sets a fence for the use of process memory vs. shared memory. Any 2D or 3D texture
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 28
    overview of OpenGL environment variables Additionally, an application can programmatically switch between the slower and faster double buffering methods using the following new glHint calls: glHint(GL_BUFFER_SWAP_MODE_HINT_HP, GL_FASTEST); Switches to the faster double buffering method. glHint(
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 29
    2 installation and setup Chapter 2 For HP-UX 11.X, the box containing the "HP-UX 11.0 Install and Core OS" CD-ROM will also hold a second CD-ROM entitled "HP-UX 11.0 Core Operating Systems Options." The OpenGL run-time and developer's 27
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 30
    installation and setup products are both available on the HP-UX 11.0 Core Operating Systems Options CD-ROM in the "Graphics and Technical Computing Software" bundle (B6268AA). 28 Chapter 2
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 31
    and setup verification instructions verification instructions This section provides you with the necessary information for determining if your OpenGL product has been installed. is your system software preloaded with instant ignition? Your workstation is preloaded with software, which may include
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 32
    sections. 1. install OpenGL For 11.00 and 11.11, OpenGL is bundled with the HP-UX Core Operating Systems Option CD-ROM in the "Graphics and Technical Computing Software" bundle B6268AA. If your system is Instantly Ignited, your OpenGL product is already installed. To verify that the OpenGL developer
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 33
    .11 OpenGLRuntime Fileset OPENGL-DEMO OPENGL-RUN OPENGL-SHLIBS OPENGL-64-DEMO OPENGL-64-RUN OPENGL-64-SHLB Contains OpenGL Demonstration Programs OpenGL Run Time Support Files OpenGL Shared Libraries OpenGL Demonstration Programs OpenGL Run Time
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 34
    file /var/adm/sw/swinstall.log. This file lists the filesets loaded, the customize scripts that ran during the installation process, and informative messages. Error messages that resulted from attempts to write across an NFS mount point may appear in this file and, if present, may be ignored. 32
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 35
    /verify_install If OpenGL has been correctly installed on your system, running verify_install will cause a window containing a 3D rendering of the text "OpenGL" directory contains instructions on how to set up and run the examples. Example programs from the OpenGL Programming Guide are installed
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 36
    the file structure of the 11.x file systems. Here is a list of files and directories that are a part of the OpenGL file structure. /opt /extensions/HP/glx.1 These are libraries for the GLX extension to X windows. This directory also contains other run-time libraries including device drivers. The
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 37
    The following graphic depicts the organization of these libraries, which follows the HP-UX standard for 64-bit libraries. In the library directory, you will see libraries you will see in these directories are all drivers for specific graphics devices. All libdd... are loaded automatically at execution
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 38
    installation and setup the OpenGL file structure 36 Chapter 2
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 39
    3 running OpenGL programs This chapter gives a description of the Virtual GLX mode, Virtual Memory Driver (VMD), and support of threaded applications. Chapter 3 37
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 40
    glXGetConfig() are synthesized from the list of X Visuals supported on the target X Server and the capabilities of the Virtual Memory Driver (VMD). Table 1-5 in Chapter 1 lists the X Visuals that are supported through the OpenGL Extension to the X Window System (GLX) in the Virtual GLX (VGL) mode
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 41
    than if a GLX capable X server were used. This is because in VGL case when a GLX server is used. In fact, rendering The glReadPixels routine when used in the VGL mode will , changes to the X11 window will not appear until a a particular display connection is operating in VGL mode. The return value
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 42
    supports stereo. For the Visualize fx family of graphics cards this is a single step process of re-configuring. For the HP FireGL-UX and ATI FireGL X1/X3 this is a two step process. Note that you can use in the /etc/X11/X*screens file for the X Server that you want to configure for stereo. For FireGL
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 43
    the X server can be restarted and will be in Stereo mode. 3. To select one of the stereo capable GLX visuals through OpenGL, the GLX_STEREO enumerated type should be passed to either glXChooseVisual() or glXGetConfig(). Once a stereo visual has been selected, it can be used to create a stereo window
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 44
    running OpenGL programs running hp's implementation of the OpenGL stereo application 42 Chapter 3
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 45
    4 compiling and linking programs Chapter 4 This chapter provides information for including header files in your program, linking shared libraries, compiling 32-bit and 64-bit applications for OpenGL and OpenGL procedure calls. 43
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 46
    OpenGL These subdirectories contain header files and libraries which may be used when compiling and linking your programs. Table 4-1 Subdirectory include/ and source code. Utilities found in the OpenGL Utility Toolkit as mentioned in the OpenGL Programming for the X Window System manual. Utility to
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 47
    to X Windows (GLX) you must include glx.h, as shown below. #include Instructions for including various additional header files are usually provided with the README file that accompanies a utility or function. The README also includes instructions for using or operating the utilities
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 48
    libraries Table 4-2 linking shared libraries OpenGL is supported on workstations using shared libraries that must be linked with the are going to compile your application using HP's ANSI C++ compiler, use the aCC compiler. See the HP Graphics Administration Guide for more information on compiling.
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 49
    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
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 50
    most likely using a compiler that does not support this calling convention. To get an appropriate HP C or C++ compiler, you will need to contact your local HP Sales Representative. You must also include the gl.h header file supplied with HP's implementation of OpenGL in any source code that makes
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 51
    chapter are intended to give you some helpful programming hints as you begin to develop your OpenGL applications. Note that these hints are specific to hp's implementation of OpenGL. For further information on OpenGL programming hints that are not
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 52
    programming hints specific, see Appendix G in the OpenGL Programming Guide and section 6.6 "Maximizing OpenGL Performance" in the OpenGL Programming for the X Window System manual. The programming hints in this chapter are covered in these sections: • OpenGL Correctness Hints • OpenGL Performance
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 53
    intended to help you correctly use HP's implementation of OpenGL. 4D values When specifying 4D values, such as vertices, light positions, etc, if . Using w values near the floating point limits increases the likelihood of floating point precision errors in calculations such as lighting,
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 54
    OpenGL performance hints OpenGL performance hints Hints provided in this section are intended to help improve your applications performance when using HP's implementation of OpenGL. display list performance The topics covered here are areas where you can gain substantial improvements in program
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 55
    the same programmatic benefits, that is reduced function calls and less user code. Note that glDrawArraySethp's major benefit is performance. glDrawArraySethp provides from 10%-55% performance advantage over using glDrawArrays alone. The amount of performance benefit depends upon several factors
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 56
    start of a primitive in the set. The final value in the sequence indexes the end of the set. The total number of indices is count+1. count The number of iterates over count + 1 vertex array indices from list. For 0 HP uses list[i+1] - list[i] sequential elements from each enabled array to construct
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 57
    Chapter 5 programming hints OpenGL performance hints ... many more vertices... glEnd(); than this: glBegin(GL_TRIANGLES); glColor3f(1,2,3); glVertex3f(...); ... many more vertices... glEnd(); For performance efficiency avoid glMaterial state changes, especially within a glBegin/glEnd pair. regular
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 58
    is increased by maximizing the number of vertices per Begin/End pair. If your vertex data in memory is organized in a linear, rather than a random the base level (level 0) first. • If it is possible, you should use texture objects to store and bind textures. • If you are doing dynamic downloading
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 59
    referred to as "mode changes." These are the commands that: • Turn on/off capabilities, • Change attribute settings for capabilities, • Define lights, • Change matrices, • etc. These calls cannot occur between a glBegin/glEnd pair. Examples of such commands are: glEnable(GL_LIGHTING); glFogf
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 60
    light. In addition, the GL_SHININESS material parameter is not particularly expensive to change. occlusion culling The proper use of HP swap and clear operations across the entire family of Visualize and OEM graphics devices, avoid the following: • Scissor rectangle smaller than the window size • Non
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 61
    in object coordinates will not need to be normalized as they are transformed into eye coordinates. As of Release 1.05 of HP's implementation of OpenGL 1.1, the GL_RESCALE_NORMAL_EXT token is supported. It is accepted by the parameter of glEnable, glDisable, and glIsEnabled, and by the
  • HP C8000 | OpenGL Implementation Guide for HP-UX 11.x - Page 62
    the normal. Then If normalization is disabled, then the square root in equation 2.1 is replaced with 1; otherwise, it is calculated as dictated by the OpenGL Spec. If both normalize and rescale are enabled, HP's implementation skips the rescale and does only the normalize. 60 Chapter 5
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62

OpenGL Implementation Guide
for HP-UX 11.x
Manufacturing Part Number : B2355-IE002
Edition E0206
© Copyright 2005-2006 by Hewlett-Packard