The Red Book Examples using JOGL This page contains ported C examples from the OpenGL Programming Guide (affectionately known among graphics programmers as the "red book"). They were ported using *javax.media.opengl* extension library. Ported by Kiet "AK " Le Last Updated : 20070227 Established. 20060329 About Your OpenGL Red Book Site Red Book PDF ** Free Chapter C Examples Red Book Online Blue Book Online Orange Book Site Extensions Registry OpenGL SDK JOGL Doc Online OpenGL Wiki JOGL Wiki glredbook.rar glredbook-src.rar New in 5th Ed: New in 4th Ed: * combiner * cubemap * fogcoord.jnlp * mvarray * pointp * shadowmap * surfpoints New in 3rd Ed: * blendeqn * colormatrix * colortable * convolution * histogram * minmax * multitex * readImage * quadric * texture3d New in 2nd Ed: * aaindex * aapoly * aargb * hello * image * polyoff * tess * tesswind * texbind * texgen * texprox * texsub * torus * unproject * varray * wrap First Edition: * accanti * accnot * accpersp * accum * aim * alpha * alpha3D * anti * antiindex * antipindex * antipoint * antipoly * bezcurve * bezmesh * bezsurf * checker * checker2 * chess * clip * colormat * cone * cube * curve * depthcue * disk * dof * dofnot * double(buf ) * drawf * feedback * fog * fogindex * font * jitter.h * light * linelist * lines * list * list2 * maplight * material * mipmap * model * movelight * nurbs * pickdepth * pickline * picksquare * plane * planet * planetup * polys * robot * sccolorlight * scene * scenebamb * sceneflat * select * simple * smooth * sphere * stencil * stroke * surface * tea * teaambient * teapots * texturesurf * trim * xfontjfont Locations of visitors to this page Red Book Editions, OpenGL Versions 1. First edition, OpenGL 1.0 2. Second edition, OpenGL 1.1 3. Third edition, OpenGL 1.2/1.2.1 * 4. Fourth edition, OpenGL 1.3/1.4 5. Fift edition, OpenGL 1.5/2.0 Not sure which OpenGL version you have? Quickly check here . It will tell about * JOGL Binding info * OpenGL Vendor, Version, Driver info * OpenGL Extensions listing * This is the edition I own. Difference Between C and Java Examples * No render calls from listeners compare to C examples. * Some data, especially n-dimensional arrays, requires wrapping in another buffer object or a direct buffer. * Swing replaces GLUT's window management API. Also all examples now use *GLJPanel* * All examples file names are preserved in the Java version; except for double.c, which is renamed to doublebuf.java. to resolve name conflict with *double* keyword. * xfont.c, an X Window example, is jfont.java for Java. * All color index and NURBS examples are not ported since javax.media.opengl does not support for them. * All examples are doubly buffered and all quits on *Esc* button. * * All examples quit with shut down hook *runExit()* button. WebStart OpenGL Examples I made Java Web Start (JWS) links for all the programs but you may need to set your "file type association" so your browser will download and deploy programs with JWS file extension (.jnlp). As a convenience, I have archived all the JNLP files along with the sources and classes for the examples so you don't have to individually download each examples. You do need to extract the jnlp folder from that archive to get to the individual jnlp file. 1 Intro to OpenGL Briefs you on the OpenGL graphics system, as an API, what it does, what it do not; provides a couple of examples to show the sequence of steps for a simple rendition and animation. simple.jnlp hello.jnlp 1.1 doublebuf.jnlp 2 State Management and Drawing Geometric Objects How to draw geometric primitives, the basic of managing states, steps in using vertex arrays. lines.jnlp polys.jnlp varray.jnlp 1.1 mvarray.jnlp 1.4 3 Viewing Describes the view and modeling, projection, and viewport transformations; working with the matrix stacks, using clipping planes, composing transformations, and reverse transformation. cube.jnlp model.jnlp clip.jnlp planet.jnlp robot.jnlp unproject.jnlp 1.1 4 Color Colors as a 4-tuple RGBA versus color-index, how to draw colored objects, how shading affect a multicolor polygon. smooth.jnlp 5 Lighting Describes light models, material colors of objects, how normals affect light on an object, directional lighting, multiple lights, moving light sources. light.jnlp movelight.jnlp material.jnlp colormat.jnlp scene.jnlp 6 Blending, Antialiasing, and Fog blendeqn.jnlp 1.2 ARB_imaging alpha.jnlp alpha3D.jnlp 1.1 aargb.jnlp 1.1 aaindex.jnlp multisamp.jnlp 1.3 pic fog.jnlp fogindex.jnlp fogcoord.jnlp 1.4 pointp.jnlp 1.4 polyoff.jnlp 1.1 7 Display Lists Describes use of display lists to increase performance. torus.jnlp 1.1 list.jnlp stroke.jnlp 8 Drawing Pixels, Bitmaps, Fonts, and Images How to draw 2D datas, its uses as font. drawf.jnlp font.jnlp image.jnlp 1.1 colortable.jnlp 1.2 ARB_imaging convolution.jnlp 1.2 ARB_imaging colormatrix.jnlp 1.2 ARB_imaging histogram.jnlp 1.2 ARB_imaging minmax.jnlp 1.2 ARB_imaging 9 Texture Mapping How to map 1D/2D images to geometric objects for added effect. checker.jnlp texsub.jnlp 1.1 texture3d.jnlp 1.2 mipmap.jnlp texbind.jnlp 1.1 texgen.jnlp cubemap.jnlp 1.3 multitex.jnlp 1.3 combiner.jnlp 1.3 shadowmap.jnlp 1.4 10 The Framebuffer Describes the many uses of possible buffers. stencil.jnlp accpersp.jnlp accanti.jnlp dofnot.jnlp 11 Tesselators and Quadrics How to use tessellators and quadrics. tess.jnlp 1.1 tesswind.jnlp 1.1 quadric.jnlp 1.2 12 Evaluators and NURBS Use of curves and surfaces. bezcurve.jnlp bezsurf.jnlp bezmesh.jnlp texturesurf.jnlp surface.jnlp 1.1 surfpoints.jnlp 1.2 trim.jnlp 1.1 13 Selection and Feedback Describes use of selection to choose object drawn, and use fo feedback to collect drawing info GL produces. select.jnlp picksquare.jnlp pickdepth.jnlp feedback.jnlp 14 Now that you know The book has no examples for this chapter. Querying and Printing an Error Is an Extension Available Is a Function Available Update Log 20070227. one archive, repackaged 20060629. fixed texture3d, font 20060606. JWS program to get info about your GL 20060429. moved jnlp files to csclub.cs.sjsu.edu 20060420. 4th ed examples 20060419. page edits, links, ads; fix logo problem 20060417. 3rd ed. ARB_imaging examples available 20060415. remove more JSE1.5 code; many fixes 20060411. red book 2nd ed. available; src|jnlp in jar file Editions:Version Difference Web Start Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 ** Chapter 10 Chapter 11 Chapter 12 Chapter 13 Chapter 14 Update Log ------------------------------------------------------------------------ Copyright (c) 2006 Kiet Le. Original GL programs copyrighted by SGI. The OpenGL logo is a trademark of SGI and it is use here with permission. You cannot replicate this page without prior written permission. StatCounter - Free Web Tracker and Counter