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

HP j6700 - Workstation Manual

HP j6700 manual content summary:

  • HP j6700 | 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 j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 2
    prior written consent of Hewlett-Packard Company. Restricted Rights Legend Use, duplication, or disclosure by the U.S. Government Department of part of this document may be photocopied, reproduced or translated to another language without the prior written consent of Hewlett-Packard Company. UNIX
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 3
    hp's implementation of OpenGL 7 hp's implementation of the OpenGL libraries 7 supported graphics devices 8 supported operating systems 8 supported visuals 9 10 visual support for other graphics 18 occlusion extension 18 occlusion culling code fragments 18 GL_HP_supersample extension 20
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 4
    is on your workstation 29 installing OpenGL 30 1. install OpenGL 30 2. check log file 32 3. verify the product 33 the OpenGL file structure 34 3. running OpenGL programs virtual GLX (VGL) mode 38 visual support for the VGL mode 38 special considerations 38 running hp's implementation of the
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 5
    display list performance 52 geometric primitives 52 GL_COMPILE_AND_EXECUTE mode 52 draw array set extensions 52 benefits of glDrawArraySethp 53 using glDrawArraySethp 53 textures 54 state changes and their effects on display lists 54 regular primitive data 55 texture downloading performance
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 6
    Contents 4
  • HP j6700 | 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 j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 8
    , refer to these documents, published by Addison-Wesley and shipped with HP's implementation of OpenGL: • OpenGL Programming Guide Instruction on programming in OpenGL, offered in a tutorial format. • OpenGL Reference Manual A reference that contains details on all standard OpenGL functions, as well
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 9
    of OpenGL Topics covered in this section are: • HP's implementation of the OpenGL libraries • Supported graphics devices • Supported visuals • Visual support for other graphics devices • Buffer sharing between multiple processes hp's implementation of the OpenGL libraries The OpenGL product does
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 10
    * are loaded automatically at execution time, contingent upon device type. The user program does not 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
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 11
    In this section, each visual table will have a graphics device associated with it. For information on visual support for graphics devices not in the above list, read the subsequent section "Visual Support for Other Graphics Devices." Visual Table for HP Visualize fxe X Visual Information OpenGL
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 12
    -10 and Fire GL-UX will have the following additional stereo visuals available. For more information on OpenGL stereo, read the section "Running HP's Implementation of the OpenGL Stereo Application," found in Chapter 3 of this document. Table 1-5 Stereo Visual Support for HP Visualize fx-5 and fx
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 13
    Support for HP 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 j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 14
    that occurs as part of that start-up. However, if grmd dies for some reason, the graphics libraries will restart grmd whenever they need shared memory. An example of where this can occur is during calls to glXCreateContext or glXMakeCurrent. threads support threads support in November, 1999
  • HP j6700 | 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 j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 16
    is used, -lc must appear in the link order before -lGL. Otherwise, a segmentation violation will occur when running the 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
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 17
    Reference Manual. input and output routines OpenGL was designed to be independent of operating systems and window systems, therefore, it does not have commands that perform such tasks as reading events from a keyboard or mouse, or opening windows. To obtain these capabilities, you will need to use
  • HP j6700 | 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 j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 19
    and Xlib mixing of OpenGL and Xlib The OpenGL implementation conforms to the specification definition for mixing of Xlib and OpenGL rendering to the same drawable. The rendering as well as with VMD, when using alpha buffers, can produce unexpected side effects and should be avoided. Chapter 1 17
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 20
    -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 have not already been
  • HP j6700 | 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 j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 22
    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 the engine and transmission last. In this way, the engine would not be rendered due to the bounding box test indicating that the engine is
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 23
    adjust the Display->X Server Configuration->Screen Options set the "FSAAScale" option to a super sample resolution (e.g. 2, 4, or 6) which results in the number of samples per screen pixel. The actual number of samples used will depend on the availability of video memory to implement the supersample
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 24
    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 of two lines will in most cases be different from what is expected. HP treats the two parts of the bow tie
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 25
    HP determines whether the concave quadrilateral will become front-facing or back-facing prior to dividing the quadrilateral into triangles. HP vertex causing concavity. vertices outside of a begin/end pair HP's implementation of this specification is indeterminate as defined by the OpenGL standard.
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 26
    for a local HP display connection, a direct context will be created instead because the performance will be much better. HPOGL_ENABLE_MIT_SHMEM When rendering locally using the VM Driver, this variable allows the server and client to look at the rendering buffer at the same time. This variable has
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 27
    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 -NULL value, the new or faster double buffering method will be used. (This is the default behavior and does not need
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 28
    switch between the slower and faster double buffering methods using the following new glHint calls: glHint(GL_BUFFER_SWAP_MODE_HINT_HP, GL_FASTEST HPOGL_DSM_ENABLE_FAST_BUFFER_SWAP or HPOGL_DSM_DISABLE_FAST_BUFFER_SWAP in the application environment will disable and thus override the behavior of the
  • HP j6700 | 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 j6700 | 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 j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 31
    in that product list you will see lines similar to the following if HP OpenGL has been installed on your system. OpenGLDevKit B.11.00.20 HP-UX OpenGL 3D Graphics API Developer's Kit OpenGLRunTime B.11.00.20 HP-UX OpenGL Run Time Environment If OpenGL is not preloaded, you will need to install it by
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 32
    that OpenGL is on Your Workstation" above. If OpenGL is installed, you are done with the section. If OpenGL is not installed, execute this command (as root): /usr/sbin/swinstall ...and follow the installation instructions provided in the document Managing HP-UX Software with SD-UX. OpenGLDevKit
  • HP j6700 | 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 Support File OpenGL Shared Libraries Chapter 2 31
  • HP j6700 | 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 j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 35
    . • Run the program /opt/graphics/OpenGL/demos/verify_install If OpenGL has been correctly installed on your system, running verify_install will cause a instructions on how to set up and run the examples. Example programs from the OpenGL Programming Guide are installed in the directory: /opt/graphics
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 36
    /brokers/extensions/Glx.1 /usr/lib/X11/Xserver/modules/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 location of the run-time shared libraries is: /opt/graphics/openGL/lib 34 Chapter 2
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 37
    libGL.2) There is only one version of libraries for 64-bit. These libraries are version numbered. The other libraries you will see in these directories are all drivers for specific graphics devices. All libdd... are loaded automatically at execution time, contingent upon device type. Chapter 2 35
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 38
    installation and setup the OpenGL file structure 36 Chapter 2
  • HP j6700 | 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 j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 40
    client to render through OpenGL to X servers and/or X terminals that do not support OpenGL or the X server extension for GLX. This mode is implemented by emulating the X server extension within the OpenGL API client-side library and using the hp Virtual Memory Driver (VMD) to perform Xlib rendering
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 41
    VGL mode may behave differently than if a GLX capable X server were used. This is because in VGL mode OpenGL rendering is not for VGL visuals. Note that calls made to XdbeSwapBuffers will not work correctly. • A call can be made hp function that is not available on other implementations of OpenGL. Chapter
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 42
    visuals support stereo, you will need to re-configure your monitor to a configuration that 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 the
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 43
    a FireGL graphics device an additional step is required. Run "sam" to configure stereo mode in the /etc/X11/XF86Config file. Select the "Display" area and the "X Server Configuration" then select the display device icon. Using the Actions menu select "Modify Screen Options". This dialog box will the
  • HP j6700 | 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 j6700 | 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 j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 46
    libraries. 64-bit run-time shared libraries. Run-time executables. OpenGL documentation including reference pages. A Motif widget library and source code. Utilities found in the OpenGL Utility Toolkit as mentioned in the OpenGL Programming for the X Window System manual. Utility to print display
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 47
    need only include the header file gl.h under the /opt/graphics/OpenGL/include/GL directory. Use the following syntax: #include Still other header accompanies a utility or function. The README also includes instructions for using or operating the utilities. Your header file declarations at
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 48
    OpenGL is supported on workstations using shared libraries hp X extensions library (libXext). An ANSI C compile line will typically look similar to this: cc -g -Aa -D_hpUX_SOURCE -z \ -I/opt/graphics using HP's ANSI C++ compiler, use the aCC compiler. See the HP Graphics Administration Guide
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 49
    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
  • HP j6700 | 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 j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 51
    in this 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 j6700 | 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 j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 53
    OpenGL correctness hints Hints provided in this section are intended to help you correctly use HP's implementation of OpenGL. 4D values When specifying 4D values, such as vertices, light positions, etc, if possible supply a w value that is not near the floating point limits of MINFLOAT or MAXFLOAT
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 54
    when using HP's implementation times faster than 20 GL_TRIANGLES primitives with a single triangle in each one. GL_COMPILE_AND_EXECUTE mode Due to the pre-processing of the display list, and execution performance enhancements, creating a display list using the GL_COMPILE_AND_EXECUTE mode will
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 55
    . Use of glDrawArraySethp will be easy for applications which currently store geometry in vertex arrays and use multiple the graphics device. To achieve optimum glDrawArraySethp rendering performance, group as many primitives in each set as possible. using glDrawArraySethp: To use glDrawArraySethp
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 56
    will . The final value in the sequence indexes the end of the set. The total number of indices indices from list. For 0 HP uses list[i+1] - list[i] sequential use Array Sets and Arrays, Display, and Immediate Mode (Vertex API). Note that if you are going to use the same texture multiple times
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 57
    glEnd(); In immediate mode, this would give you the best performance. However, if you are putting these calls into a display list, you will get much better performance by duplicating the normal for each vertex, thereby giving regular data to the display list: glBegin(GL_TRIANGLES); glNormal3fv(&v1
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 58
    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 possible, you should use texture objects to store and bind textures. • If you are doing dynamic downloading of texture maps, you will get better performance by
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 59
    glNormal glEdgeFlag glMaterial glTexCoord The processing of these calls is very fast. Restructuring a program to eliminate some vertex data commands will not significantly improve performance. The second category is modal state-setting commands, or sometimes referred to as "mode changes." These
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 60
    time), and then rendering primitives, will part of a scene's primitives are lighted, draw all the lighted primitives, then turn off lighting and draw all the unlighted primitives, rather than enabling/disabling lighting many times use of HP's of Visualize and OEM graphics devices, avoid the following
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 61
    in many cases, normal vectors with unit length 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
  • HP j6700 | OpenGL Implementation Guide for HP-UX 11.x - Page 62
    the fully transformed normal is If rescaling is disabled, f is 1, otherwise f is computed as follows: Let mij denote the matrix element in row i and column j of is calculated as dictated by the OpenGL Spec. If both normalize and rescale are enabled, HP's implementation skips the rescale and does only
  • 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