Opengl FAQ and Troubleshooting Guide

Total Page:16

File Type:pdf, Size:1020Kb

Opengl FAQ and Troubleshooting Guide OpenGL FAQ and Troubleshooting Guide Table of Contents OpenGL FAQ and Troubleshooting Guide v1.2001.01.17..............................................................................1 1 About the FAQ...............................................................................................................................................13 2 Getting Started ............................................................................................................................................17 3 GLUT..............................................................................................................................................................32 4 GLU.................................................................................................................................................................35 5 Microsoft Windows Specifics........................................................................................................................38 6 Windows, Buffers, and Rendering Contexts...............................................................................................45 7 Interacting with the Window System, Operating System, and Input Devices........................................46 8 Using Viewing and Camera Transforms, and gluLookAt().......................................................................48 9 Transformations.............................................................................................................................................52 10 Clipping, Culling, and Visibility Testing...................................................................................................61 11 Color..............................................................................................................................................................65 12 The Depth Buffer.........................................................................................................................................67 13 Drawing Lines over Polygons and Using Polygon Offset.........................................................................71 14 Rasterization and Operations on the Framebuffer...................................................................................74 15 Transparency, Translucency, and Blending..............................................................................................79 16 Display Lists and Vertex Arrays................................................................................................................82 17 Using Fonts...................................................................................................................................................85 18 Lights and Shadows.....................................................................................................................................87 19 Curves, Surfaces, and Using Evaluators....................................................................................................92 20 Picking and Using Selection........................................................................................................................93 21 Texture Mapping.........................................................................................................................................96 22 Performance...............................................................................................................................................101 23 Extensions and Versions............................................................................................................................105 i OpenGL FAQ and Troubleshooting Guide Table of Contents 24 Miscellaneous..............................................................................................................................................109 Appendix A Microsoft OpenGL Information..............................................................................................114 Windows Driver Development Kits....................................................................................................114 Preliminary Windows 2000 DDK..........................................................................................114 Windows Driver and Hardware Development....................................................................................114 Fluff articles.........................................................................................................................................114 MSDN Library.....................................................................................................................................115 Platform SDK........................................................................................................................115 OpenGL technical articles......................................................................................................117 Useful other articles................................................................................................................118 Knowledge Base..................................................................................................................................119 Current....................................................................................................................................119 Archive....................................................................................................................................121 Appendix B Source Code Index.....................................................................................................................124 ii OpenGL FAQ and Troubleshooting Guide v1.2001.01.17 1 About the FAQ 15 Transparency, Translucency, and Blending 2 Getting Started 16 Display Lists and Vertex Arrays 3 GLUT 17 Using Fonts 4 GLU 18 Lights and Shadows 5 Microsoft Windows Specifics 19 Curves, Surfaces, and Using Evaluators 6 Windows, Buffers, and Rendering Contexts 20 Picking and Using Selection 7 Interacting with the Window System, Operating 21 Texture Mapping System, and Input Devices 8 Using Viewing and Camera Transforms, and 22 Performance gluLookAt() 9 Transformations 23 Extensions and Versions 10 Clipping, Culling, and Visibility Testing 24 Miscellaneous 11 Color Appendix A Microsoft OpenGL Information 12 The Depth Buffer Appendix B Source code index 13 Drawing Lines over Polygons and Using Polygon German Translation: OpenGL häufig gestellte Offset fragen Japanese 14 Rasterization and Operations on the Framebuffer Translation: 1 About the FAQ 1.010 Introduction 1.020 How to contribute, and the contributors 1.030 Download the entire FAQ as a Zip file 1.031 Printing the PDF FAQ 1.040 Change Log 2 Getting Started 2.005 Where can I find 3D graphics info? 2.010 Where can I find examples, tutorials, documentation, and other OpenGL information? 2.020 What OpenGL books are available? 2.030 What OpenGL chat rooms and newsgroups are available? 2.040 What OpenGL implementations come with source code? 2.050 What compiler can I use? OpenGL FAQ and Troubleshooting Guide v1.2001.01.17 1 OpenGL FAQ and Troubleshooting Guide 2.060 What do I need to compile and run OpenGL programs? 2.070 Why am I getting compile, link, and runtime errors? 2.080 How do I initialize my windows, create contexts, etc.? 2.090 How do I create a full−screen window? 2.100 What is the general form of an OpenGL program? 2.110 My window is blank. What should I do? 2.120 My first frame renders correctly, but subsequent frames are incorrect or further away or I just get a blank screen. What's going on? 2.130 What is the AUX library? 2.140 What support for OpenGL does {Open,Net,Free}BSD or Linux provide? 2.150 Where is OpenGL 1.2? 2.160 What are the OpenGL Conformance Tests? 3 GLUT 3.010 What is GLUT? How is it different from OpenGL? 3.020 Should I use GLUT? 3.030 I need to set up different tasks for left and right mouse button motion. However, I can only set one glutMotionFunc() callback, which doesn't pass the button as a parameter. 3.040 How does GLUT do…? 3.050 How can I perform animations with GLUT? 3.060 Is it possible to change a window's size *after* it's opened (i.e., after I call glutInitWindowSize(); and glutCreateWindow();)? 3.070 I have a GLUT program that allocates memory at startup. How do I deallocate this memory when the program exits? 3.080 How can I make my GLUT program detect that the user has closed the window? 3.090 How can I make glutMainLoop() return to my calling program? 3.100 How do I get rid of the console window in a Windows GLUT application? 3.110 My GLUT question isn't answered here. Where can I get more info? 4 GLU OpenGL FAQ and Troubleshooting Guide v1.2001.01.17 2 OpenGL FAQ and Troubleshooting Guide 4.010 What is GLU? How is it different from OpenGL? 4.020 How does GLU render sphere, cylinder, and disk primitives? 4.030 How does gluPickMatrix work? 4.040 How do I use GLU tessellation routines? 4.050 Why aren't my tessellation callback routines called? 4.060 How do I use GLU NURBS routines? 4.070 How do I use gluProject and gluUnProject? 5 Microsoft Windows Specifics 5.010 What's a good source for Win32 OpenGL programming information? 5.020 I'm looking for a Wintel OpenGL card in a specific price range, any suggestions? 5.030 How do I enable and disable hardware rendering on a Wintel card? 5.040 How do I know my program is using hardware acceleration on a Wintel card? 5.050 Where can I get the OpenGL ICD for a Wintel card? 5.060 I'm using a Wintel card and an OpenGL feature doesn't
Recommended publications
  • Reviving the Development of Openchrome
    Reviving the Development of OpenChrome Kevin Brace OpenChrome Project Maintainer / Developer XDC2017 September 21st, 2017 Outline ● About Me ● My Personal Story Behind OpenChrome ● Background on VIA Chrome Hardware ● The History of OpenChrome Project ● Past Releases ● Observations about Standby Resume ● Developmental Philosophy ● Developmental Challenges ● Strategies for Further Development ● Future Plans 09/21/2017 XDC2017 2 About Me ● EE (Electrical Engineering) background (B.S.E.E.) who specialized in digital design / computer architecture in college (pretty much the only undergraduate student “still” doing this stuff where I attended college) ● Graduated recently ● First time conference presenter ● Very experienced with Xilinx FPGA (Spartan-II through 7 Series FPGA) ● Fluent in Verilog / VHDL design and verification ● Interest / design experience with external communication interfaces (PCI / PCIe) and external memory interfaces (SDRAM / DDR3 SDRAM) ● Developed a simple DMA engine for PCI I/F validation w/Windows WDM (Windows Driver Model) kernel device driver ● Almost all the knowledge I have is self taught (university engineering classes were not very useful) 09/21/2017 XDC2017 3 Motivations Behind My Work ● General difficulty in obtaining meaningful employment in the digital hardware design field (too many students in the field, difficulty obtaining internship, etc.) ● Collects and repairs abandoned computer hardware (It’s like rescuing puppies!) ● Owns 100+ desktop computers and 20+ laptop computers (mostly abandoned old stuff I
    [Show full text]
  • Opengl Distilled / Paul Martz
    Page left blank intently OpenGL® Distilled By Paul Martz ............................................... Publisher: Addison Wesley Professional Pub Date: February 27, 2006 Print ISBN-10: 0-321-33679-8 Print ISBN-13: 978-0-321-33679-8 Pages: 304 Table of Contents | Inde OpenGL opens the door to the world of high-quality, high-performance 3D computer graphics. The preferred application programming interface for developing 3D applications, OpenGL is widely used in video game development, visuali,ation and simulation, CAD, virtual reality, modeling, and computer-generated animation. OpenGL® Distilled provides the fundamental information you need to start programming 3D graphics, from setting up an OpenGL development environment to creating realistic te tures and shadows. .ritten in an engaging, easy-to-follow style, this boo/ ma/es it easy to find the information you0re loo/ing for. 1ou0ll quic/ly learn the essential and most-often-used features of OpenGL 2.0, along with the best coding practices and troubleshooting tips. Topics include Drawing and rendering geometric data such as points, lines, and polygons Controlling color and lighting to create elegant graphics Creating and orienting views Increasing image realism with te ture mapping and shadows Improving rendering performance Preserving graphics integrity across platforms A companion .eb site includes complete source code e amples, color versions of special effects described in the boo/, and additional resources. Page left blank intently Table of contents: Chapter 6. Texture Mapping Copyright ............................................................... 4 Section 6.1. Using Texture Maps ........................... 138 Foreword ............................................................... 6 Section 6.2. Lighting and Shadows with Texture .. 155 Preface ................................................................... 7 Section 6.3. Debugging .......................................... 169 About the Book ....................................................
    [Show full text]
  • Programming Graphics Hardware Overview of the Tutorial: Afternoon
    Tutorial 5 ProgrammingProgramming GraphicsGraphics HardwareHardware Randy Fernando, Mark Harris, Matthias Wloka, Cyril Zeller Overview of the Tutorial: Morning 8:30 Introduction to the Hardware Graphics Pipeline Cyril Zeller 9:30 Controlling the GPU from the CPU: the 3D API Cyril Zeller 10:15 Break 10:45 Programming the GPU: High-level Shading Languages Randy Fernando 12:00 Lunch Tutorial 5: Programming Graphics Hardware Overview of the Tutorial: Afternoon 12:00 Lunch 14:00 Optimizing the Graphics Pipeline Matthias Wloka 14:45 Advanced Rendering Techniques Matthias Wloka 15:45 Break 16:15 General-Purpose Computation Using Graphics Hardware Mark Harris 17:30 End Tutorial 5: Programming Graphics Hardware Tutorial 5: Programming Graphics Hardware IntroductionIntroduction toto thethe HardwareHardware GraphicsGraphics PipelinePipeline Cyril Zeller Overview Concepts: Real-time rendering Hardware graphics pipeline Evolution of the PC hardware graphics pipeline: 1995-1998: Texture mapping and z-buffer 1998: Multitexturing 1999-2000: Transform and lighting 2001: Programmable vertex shader 2002-2003: Programmable pixel shader 2004: Shader model 3.0 and 64-bit color support PC graphics software architecture Performance numbers Tutorial 5: Programming Graphics Hardware Real-Time Rendering Graphics hardware enables real-time rendering Real-time means display rate at more than 10 images per second 3D Scene = Image = Collection of Array of pixels 3D primitives (triangles, lines, points) Tutorial 5: Programming Graphics Hardware Hardware Graphics Pipeline
    [Show full text]
  • Deconstructing Hardware Usage for General Purpose Computation on Gpus
    Deconstructing Hardware Usage for General Purpose Computation on GPUs Budyanto Himawan Manish Vachharajani Dept. of Computer Science Dept. of Electrical and Computer Engineering University of Colorado University of Colorado Boulder, CO 80309 Boulder, CO 80309 E-mail: {Budyanto.Himawan,manishv}@colorado.edu Abstract performance, in 2001, NVidia revolutionized the GPU by making it highly programmable [3]. Since then, the programmability of The high-programmability and numerous compute resources GPUs has steadily increased, although they are still not fully gen- on Graphics Processing Units (GPUs) have allowed researchers eral purpose. Since this time, there has been much research and ef- to dramatically accelerate many non-graphics applications. This fort in porting both graphics and non-graphics applications to use initial success has generated great interest in mapping applica- the parallelism inherent in GPUs. Much of this work has focused tions to GPUs. Accordingly, several works have focused on help- on presenting application developers with information on how to ing application developers rewrite their application kernels for the perform the non-trivial mapping of general purpose concepts to explicitly parallel but restricted GPU programming model. How- GPU hardware so that there is a good fit between the algorithm ever, there has been far less work that examines how these appli- and the GPU pipeline. cations actually utilize the underlying hardware. Less attention has been given to deconstructing how these gen- This paper focuses on deconstructing how General Purpose ap- eral purpose application use the graphics hardware itself. Nor has plications on GPUs (GPGPU applications) utilize the underlying much attention been given to examining how GPUs (or GPU-like GPU pipeline.
    [Show full text]
  • AMD Radeon E8860
    Components for AMD’s Embedded Radeon™ E8860 GPU INTRODUCTION The E8860 Embedded Radeon GPU available from CoreAVI is comprised of temperature screened GPUs, safety certi- fiable OpenGL®-based drivers, and safety certifiable GPU tools which have been pre-integrated and validated together to significantly de-risk the challenges typically faced when integrating hardware and software components. The plat- form is an off-the-shelf foundation upon which safety certifiable applications can be built with confidence. Figure 1: CoreAVI Support for E8860 GPU EXTENDED TEMPERATURE RANGE CoreAVI provides extended temperature versions of the E8860 GPU to facilitate its use in rugged embedded applications. CoreAVI functionally tests the E8860 over -40C Tj to +105 Tj, increasing the manufacturing yield for hardware suppliers while reducing supply delays to end customers. coreavi.com [email protected] Revision - 13Nov2020 1 E8860 GPU LONG TERM SUPPLY AND SUPPORT CoreAVI has provided consistent and dedicated support for the supply and use of the AMD embedded GPUs within the rugged Mil/Aero/Avionics market segment for over a decade. With the E8860, CoreAVI will continue that focused support to ensure that the software, hardware and long-life support are provided to meet the needs of customers’ system life cy- cles. CoreAVI has extensive environmentally controlled storage facilities which are used to store the GPUs supplied to the Mil/ Aero/Avionics marketplace, ensuring that a ready supply is available for the duration of any program. CoreAVI also provides the post Last Time Buy storage of GPUs and is often able to provide additional quantities of com- ponents when COTS hardware partners receive increased volume for existing products / systems requiring additional inventory.
    [Show full text]
  • The Opengl Framebuffer Object Extension
    TheThe OpenGLOpenGL FramebufferFramebuffer ObjectObject ExtensionExtension SimonSimon GreenGreen NVIDIANVIDIA CorporationCorporation OverviewOverview •• WhyWhy renderrender toto texture?texture? •• PP--bufferbuffer // ARBARB renderrender texturetexture reviewreview •• FramebufferFramebuffer objectobject extensionextension •• ExamplesExamples •• FutureFuture directionsdirections WhyWhy RenderRender ToTo Texture?Texture? • Allows results of rendering to framebuffer to be directly read as texture • Better performance – avoids copy from framebuffer to texture (glCopyTexSubImage2D) – uses less memory – only one copy of image – but driver may sometimes have to do copy internally • some hardware has separate texture and FB memory • different internal representations • Applications – dynamic textures – procedurals, reflections – multi-pass techniques – anti-aliasing, motion blur, depth of field – image processing effects (blurs etc.) – GPGPU – provides feedback loop WGL_ARB_pbufferWGL_ARB_pbuffer •• PixelPixel buffersbuffers •• DesignedDesigned forfor offoff--screenscreen renderingrendering – Similar to windows, but non-visible •• WindowWindow systemsystem specificspecific extensionextension •• SelectSelect fromfrom anan enumeratedenumerated listlist ofof availableavailable pixelpixel formatsformats usingusing – ChoosePixelFormat() – DescribePixelFormat() ProblemsProblems withwith PBuffersPBuffers • Each pbuffer usually has its own OpenGL context – (Assuming they have different pixel formats) – Can share texture objects, display lists between
    [Show full text]
  • Troubleshooting Guide Table of Contents -1- General Information
    Troubleshooting Guide This troubleshooting guide will provide you with information about Star Wars®: Episode I Battle for Naboo™. You will find solutions to problems that were encountered while running this program in the Windows 95, 98, 2000 and Millennium Edition (ME) Operating Systems. Table of Contents 1. General Information 2. General Troubleshooting 3. Installation 4. Performance 5. Video Issues 6. Sound Issues 7. CD-ROM Drive Issues 8. Controller Device Issues 9. DirectX Setup 10. How to Contact LucasArts 11. Web Sites -1- General Information DISCLAIMER This troubleshooting guide reflects LucasArts’ best efforts to account for and attempt to solve 6 problems that you may encounter while playing the Battle for Naboo computer video game. LucasArts makes no representation or warranty about the accuracy of the information provided in this troubleshooting guide, what may result or not result from following the suggestions contained in this troubleshooting guide or your success in solving the problems that are causing you to consult this troubleshooting guide. Your decision to follow the suggestions contained in this troubleshooting guide is entirely at your own risk and subject to the specific terms and legal disclaimers stated below and set forth in the Software License and Limited Warranty to which you previously agreed to be bound. This troubleshooting guide also contains reference to third parties and/or third party web sites. The third party web sites are not under the control of LucasArts and LucasArts is not responsible for the contents of any third party web site referenced in this troubleshooting guide or in any other materials provided by LucasArts with the Battle for Naboo computer video game, including without limitation any link contained in a third party web site, or any changes or updates to a third party web site.
    [Show full text]
  • Graphics Pipeline and Rasterization
    Graphics Pipeline & Rasterization Image removed due to copyright restrictions. MIT EECS 6.837 – Matusik 1 How Do We Render Interactively? • Use graphics hardware, via OpenGL or DirectX – OpenGL is multi-platform, DirectX is MS only OpenGL rendering Our ray tracer © Khronos Group. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. 2 How Do We Render Interactively? • Use graphics hardware, via OpenGL or DirectX – OpenGL is multi-platform, DirectX is MS only OpenGL rendering Our ray tracer © Khronos Group. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. • Most global effects available in ray tracing will be sacrificed for speed, but some can be approximated 3 Ray Casting vs. GPUs for Triangles Ray Casting For each pixel (ray) For each triangle Does ray hit triangle? Keep closest hit Scene primitives Pixel raster 4 Ray Casting vs. GPUs for Triangles Ray Casting GPU For each pixel (ray) For each triangle For each triangle For each pixel Does ray hit triangle? Does triangle cover pixel? Keep closest hit Keep closest hit Scene primitives Pixel raster Scene primitives Pixel raster 5 Ray Casting vs. GPUs for Triangles Ray Casting GPU For each pixel (ray) For each triangle For each triangle For each pixel Does ray hit triangle? Does triangle cover pixel? Keep closest hit Keep closest hit Scene primitives It’s just a different orderPixel raster of the loops!
    [Show full text]
  • Xengt: a Software Based Intel Graphics Virtualization Solution
    XenGT: a Software Based Intel Graphics Virtualization Solution Oct 22, 2013 Haitao Shan, [email protected] Kevin Tian, [email protected] Eddie Dong, [email protected] David Cowperthwaite, [email protected] Agenda • Background • Existing Arts • XenGT Architecture • Performance • Summary 2 Background Graphics Computing • Entertainment applications • Gaming, video playback, browser, etc. • General purpose windowing • Windows Aero, Compiz Fusion, etc • High performance computing • Computer aided designs, weather broadcast, etc. Same capability required, when above tasks are moved into VM 4 Graphics Virtualization • Performance vs. multiplexing • Consistent and rich user experience in all VMs • Share a single GPU among multiple VMs Client Rich Virtual Client Server VDI, transcoder, GPGPU Embedded Smartphone, tablet, IVI 5 Existing Arts Device Emulation • Only for legacy VGA cards • E.g. Cirrus logic VGA card • Limited graphics capability • 2D only • Optimizations on frame buffer operations • E.g. PV framebuffer • Impossible to emulate a modern GPU • Complexity • Poor performance 7 Split Driver Model • Frontend/Backend drivers • Forward OpenGL/DirectX API calls • Implementation specific for the level of forwarding • E.g. VMGL, VMware vGPU, Virgil • Hardware agnostic • Challenges on forwarding between host/guest graphics stacks • API compatibility • CPU overhead 8 Direct Pass-Through/SR-IOV • Best performance with direct pass-through • However no multiplexing 9 XenGT Architecture XenGT • A mediated pass-through solution
    [Show full text]
  • Improving Shadows and Reflections Via the Stencil Buffer
    Improving Shadows and Reflections via the Stencil Buffer Mark J. Kilgard * NVIDIA Corporation “Slap textures on polygons, throw them at the screen, and let the depth buffer sort it out.” For too many game developers, the above statement sums up their approach to 3D hardware- acceleration. A game programmer might turn on some fog and maybe throw in some transparency, but that’s often the limit. The question is whether that is enough anymore for a game to stand out visually from the crowd. Now everybody’s using 3D hardware-acceleration, and everybody’s slinging textured polygons around, and, frankly, as a result, most 3D games look more or less the same. Sure there are differences in game play, network interaction, artwork, sound track, etc., etc., but we all know that the “big differentiator” for computer gaming, today and tomorrow, is the look. The problem is that with everyone resorting to hardware rendering, most games look fairly consistent, too consistent. You know exactly the textured polygon look that I’m talking about. Instead of settling for 3D hardware doing nothing more than slinging textured polygons, I argue that cutting-edge game developers must embrace new hardware functionality to achieve visual effects beyond what everybody gets today from your basic textured and depth-buffered polygons. Two effects that can definitely set games apart from the crowd are better quality shadows and reflections. While some games today incorporate shadows and reflections to a limited extent, the common techniques are fairly crude. Reflections in today’s games are mostly limited to “infinite extent” ground planes or ground planes bounded by walls.
    [Show full text]
  • Manual for a Ati Rage Iic Driver Win98.Pdf
    Manual For A Ati Rage Iic Driver Win98 Do a custom install and check the Free drivers for ATI Rage 128 / PRO. rage 128 pro ultra 32 sdr driver, wmew98r1284126292.exe (more), Windows 98. manuals BIOS Ovladaèe chipset Slot Socket information driver info manual driver ati 3d rage pro agp 2x driver 128 32mb ati driver rage ultra ati rage iic Go here. HP Pavilion dv7-3165dx 17.3 Notebook PC - AMD Turion II Ultra Dual-Core ATI RAGE. ATI Catalyst Display Driver (Windows 98/Me) Catalyst 6.2 Drivers and ATI Multimedia acer LCD Monitor X173W asus A181HL Manual • Manual acer A181HV ATI also shipped a TV encoder companion chip for RAGE II, the ImpacTV chip. How to make manual edits: ATI's Linux drivers never did support Wonder, Mach or Rage series cards. mode doesn't work at any bit depth on 4 MiB cards even though Windows 98 SE can manage it at 16 bpp. Although the Rage IIC has some kind of hardware 3D, it's not supported by the Mach64 module of X.Org. Drivers for Discontinued ATI Rage™ Series Products for Windows 98/Windows 98SE/Windows ME Display Driver Rage IIC. Release Notes Download ATI. class="portal)art book d hunter vampire (/url)sony p51 driver windows 98 class="register)child/x27s song (/url)x-10 powerhouse ur19a manual johnny cash ive microsoft access jdbc driver ati technologies 3d rage iic agp win2000 driver. Manual For A Ati Rage Iic Driver Win98 Read/Download driver windows 98. Ati rage 128 driver + Conexant bt878 driver xp Ii ar2td-b3 p le vivo r200 250500mhz 64mb ddr 128-bit hynix, Later, ati developed.
    [Show full text]
  • Linux Hardware Compatibility HOWTO
    Linux Hardware Compatibility HOWTO Steven Pritchard Southern Illinois Linux Users Group [email protected] 3.1.5 Copyright © 2001−2002 by Steven Pritchard Copyright © 1997−1999 by Patrick Reijnen 2002−03−28 This document attempts to list most of the hardware known to be either supported or unsupported under Linux. Linux Hardware Compatibility HOWTO Table of Contents 1. Introduction.....................................................................................................................................................1 1.1. Notes on binary−only drivers...........................................................................................................1 1.2. Notes on commercial drivers............................................................................................................1 1.3. System architectures.........................................................................................................................1 1.4. Related sources of information.........................................................................................................2 1.5. Known problems with this document...............................................................................................2 1.6. New versions of this document.........................................................................................................2 1.7. Feedback and corrections..................................................................................................................3 1.8. Acknowledgments.............................................................................................................................3
    [Show full text]