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.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?
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.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?
3 GLUT
3.010 What is GLUT? How is it different from OpenGL?
3.020 Should I use GLUT?
3.040 How does GLUT do ?
3.050 How can I perform animations with GLUT?
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
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?
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 seem to work. What's going on?
5.070 Can I use OpenGL with DirectDraw?
5.080 Is it ok to use DirectDraw to change the screen resolution or desktop pixel depth?
5.090 My card supports OpenGL, but I don't get acceleration regardless of which pixel format I try.
5.100 How do I get hardware acceleration?
5.110 Why doesn't OpenGL hardware acceleration work with multiple monitors?
5.120 Why does my MFC window flash, even though I'm using d
5.121 Why does my double buffered window appear incomplete or contain black stripes?
5.130 What's the difference between opengl.dll and opengl32.dll?
5.140 Should I use Direct3D or OpenGL?
5.150 What do I need to know to use OpenGL with MFC?
5.160 How can I use OpenGL with MFC?
5.170 Is OpenGL inherently slower when used with MFC?
5.180 Where can I find MFC examples?
5.190 What do I need to know about mixing WGL and GDI calls?
5.200 Why does my code crash under Windows NT or 2000 but run fine under 9x?
6 Windows, Buffers, and Rendering Contexts
7 Interacting with the Window System, Operating System, and Input Devices
7.010 How do I obtain the window width and height or screen max width and height?
8 Using Viewing and Camera Transforms, and gluLookAt()
8.010 How does the camera work in OpenGL?
8.020 How can I move my eye, or camera, in my scene?
8.030 Where should my camera go, the ModelView or projection matrix?
8.040 How do I implement a zoom operation?
8.050 Given the current ModelView matrix, how can I determine the object-space location of the camera?
8.060 How do I make the camera "orbit" around a point in my scene?
8.080 Why doesn't gluLookAt work?
8.090 How do I get a specified point (XYZ) to appear at the center of the scene?
9.001 I can't get transformations to work. Where can I learn more about matrices?
9.005 Are OpenGL matrices column-major or row-major?
9.010 What are OpenGL coordinate units?
9.011 How are coordinates transformed? What are the different coordinate spaces?
9.020 How do I transform only one object in my scene or give each object its own transform?
9.030 How do I draw 2D controls over my 3D rendering?
9.040 How do I bypass OpenGL matrix transformations and send 2D coordinates directly for rasterization?
9.050 What are the pros and cons of using absolute versus relative coordinates?
9.060 How can I draw more than one view of the same scene?
9.085 How can I make a call to glFrustum() that matches my call to gluPerspective()?
9.090 How do I draw a full-screen quad?
9.100 How can I find the screen coordinates for a given object-space coordinate?
9.110 How can I find the object-space coordinates for a pixel on the screen?
9.120 How do I find the coordinates of a vertex transformed only by the ModelView matrix?
9.130 How do I calculate the object-space distance from the viewer to a given point?
9.140 How do I keep my aspect ratio correct after a window resize?
9.150 Can I make OpenGL use a left-handed coordinate space?
9.160 How can I transform an object so that it points at or follows another object or point in my scene?
9.162 How can I transform an object with a given yaw, pitch, and roll?
10 Clipping, Culling, and Visibility Testing
10.010 How do I tell if a vertex has been clipped or not?
10.020 How do I perform occlusion or visibility testing?
10.030 How do I render to a nonrectangular viewport?
10.080 Why doesn't glClear work for areas outside the scissor rectangle?
10.090 How does face culling work? Why doesn't it use the surface normal?
11 Color
11.010 My texture map colors reverse blue and red, yellow and cyan, etc. What's going on?
11.020 How do I render a color index into an RGB window or vice versa?
11.030 The colors are almost entirely missing when I render in Microsoft Windows. What's happening?
12.010 How do I make depth buffering work?
12.020 Depth buffering doesn't work in my perspective rendering. What's going on?
12.030 How do I write a previously stored depth image to the depth buffer?
12.050 Why is my depth buffer precision so poor?
12.060 How do I turn off the zNear clipping plane?
12.070 Why is there more precision at the front of the depth buffer?
13 Drawing Lines over Polygons and Using Polygon Offset
13.010 What are the basics for using polygon offset?
13.020 What are the two parameters in a glPolygonOffset() call and what do they mean?
13.040 Why doesn't polygon offset work when I draw line primitives over filled primitives?
14 Rasterization and Operations on the Framebuffer
14.010 How do I obtain the address of the OpenGL framebuffer, so that I might write directly to it?
14.015 How do I use glDrawPixels() and glReadPixels()?
14.020 How do I change between double- and single-buffered mode in an existing window?
14.030 How do I read back a single pixel?
14.040 How do I obtain the Z value for a rendered primitive?
14.050 How do I draw a pattern into the stencil buffer?
14.060 How do I copy from the front buffer to the back buffer and vice versa?
14.090 How do I obtain exact pixelization of lines?
14.100 How do I turn on wide-line endpoint capping or mitering?
14.110 How do I render rubber band lines?
14.130 How do I draw a full-screen quad?
14.140 How do I initialize or clear a buffer without calling glClear()?
15 Transparency, Translucency, and Using Blending
15.010 What is the difference between transparent, translucent, and blended primitives?
15.020 How can I achieve a transparent effect?
15.030 How can I create screen door transparency?
15.040 How can I render glass with OpenGL?
15.080 How can I make part of my texture maps transparent or translucent?
16 Display Lists and Vertex Arrays
16.010 Why does a display list take up so much memory?
16.020 How can I share display lists between different contexts?
16.030 How does display list nesting work? Is the called list copied into the calling list?
16.040 How can I do a particular function while a display list is called?
16.060 How can I obtain a list of function calls and the OpenGL call parameters from a display list?
16.070 I've converted my program to use display lists, and it doesn't run any faster! Why not?
16.080 To save space, should I convert all my coordinates to short before storing them in a display list?
16.090 Will putting textures in a display list make them run faster?
16.100 Will putting vertex arrays in a display list make them run faster?
16.120 How many display lists can I create?
16.130 How much memory does a display list use?
16.140 How will I know if the memory a display list uses is freed?
17 Using Fonts
17.010 How can I add fonts to my OpenGL scene?
17.020 How can I use TrueType fonts in my OpenGL scene?
17.030 How can I make 3D letters that I can light, shade, and rotate?
18.010 What should I know about lighting in general?
18.020 Why are my objects all one flat color and not shaded and illuminated?
18.030 How can I make OpenGL automatically calculate surface normals?
18.040 Why can I only get flat shading when I light my model?
18.050 How can I make my light move or not move and control the light position?
18.060 How can I make a spotlight work?
18.070 How can I create more lights than GL_MAX_LIGHTS?
18.080 Which is faster: making glMaterial*() calls or using glColorMaterial()?
18.090 Why is the lighting incorrect after I scale my scene to change its size?
18.100 After I turn on lighting, everything is lit. How can I light only some of the objects?
18.110 How can I use light maps (e.g., Quake-style) in OpenGL?
18.120 How can I achieve a refraction lighting effect?
18.130 How can I render caustics?
19 Curves, Surfaces, and Using Evaluators
19.010 How can I use OpenGL evaluators to create a B-spline surface?
19.020 How can I retrieve the geometry values produced by evaluators?
20 Picking and Using Selection
20.010 How can I know which primitive a user has selected with the mouse?
20.020 What do I need to know to use selection?
20.030 Why doesn't selection work?
20.040 How can I debug my picking code?
20.050 How can I perform pick highlighting the way PHIGS and PEX provided?
21.010 What are the basic steps for performing texture mapping?
21.020 I'm trying to use texture mapping, but it doesn't work. What's wrong?
21.030 Why doesn't lighting work when I turn on texture mapping?
21.040 Lighting and texture mapping work pretty well, but why don't I see specular highlighting?
21.050 How can I automatically generate texture coordinates?
21.060 Should I store texture maps in display lists?
21.070 How do texture objects work?
21.080 Can I share textures between different rendering contexts?
21.090 How can I apply multiple textures to a surface?
21.100 How can I perform light mapping?
21.110 How can I turn my files, such as GIF, JPG, BMP, etc. into a texture map?
21.120 How can I render into a texture map?
21.130 What's the maximum size texture map my device will render hardware accelerated?
21.140 How can I texture map a sphere, cylinder, or any other object with multiple facets?
22 Performance
22.010 What do I need to know about performance?
22.020 How can I measure my application's performance?
22.030 Which primitive type is the fastest?
22.040 What's the cost of redundant calls?
22.070 Why are glDrawPixels() and glReadPixels() so slow?
22.080 Is it faster to use absolute coordinates or to use relative coordinates?
23.010 Where can I find information on different OpenGL extensions?
23.020 How will I know which OpenGL version my program is using?
23.030 What is the difference between OpenGL 1.0, 1.1, and 1.2?
23.040 How can I code for different versions of OpenGL?
23.050 How can I find which extensions are supported?
23.060 How can I code for extensions that may not exist on a target platform?
23.070 How can I call extension routines on Microsoft Windows?
23.080 How can I call extension routines on Linux?
23.090 Where can I find extension enumerants and function prototypes?
24.010 How can I render a wireframe scene with hidden lines removed?
24.020 How can I render rubber-band lines?
24.039 Where can I find 3D model files?
24.040 How can I load geometry files, such as 3DS, OBJ, DEM, etc. and render them with OpenGL?
24.060 Can I use a BSP tree with OpenGL?
24.070 Can I use an octree with OpenGL?
24.080 Can I do radiosity with OpenGL?
24.090 Can I raytrace with OpenGL?
24.100 How can I perform CSG with OpenGL?
24.110 How can I perform collision detection with OpenGL?
24.130 What's the difference between glFlush() and glFinish() and why would I want to use these routines?
24.140 How can I print with OpenGL?
24.150 Can I capture or log the OpenGL calls an application makes?
Appendix A Microsoft OpenGL Information
Appendix B Source Code Index