⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 OpenGL学习资料
💻
字号:
These are the example programs which are featured in the OpenGLProgramming Guide, Version 1.2.  To compile these programs, youneed OpenGL development libraries for your machine and Mark Kilgard'sGLUT (Graphics Library Utility Toolkit). There is a simple Imakefile in this directory, which can be used to create a Makefile to compile the example programs.  There is also a simple Makefile, which can be used to compile the programs(in case your support doesn't support imake, or you just don't want to be bothered).  There is also a Makefile.win, which has been testedon Windows-based PCs.When using either the Imakefile or the Makefile,you will probably need to modify some of the variables inside thefiles to make sure that GLUT headers and libraries are correctlyincluded and linked.The Imakefile should generate a good Makefile with a simplecommand such as:% imake -DUseInstalled -I/usr/lib/X11/configThere are a handful of modifications from the code which isprinted in the OpenGL Programming Guide.  Most noticeably, everyprogram (except for hello.c and double.c, which are featured inthe first chapter) has a keyboard callback function to exit theprogram when the ESCape key is pressed.* Changes between this directory and the examples printed in the bookAlso, after the book went to press, a couple of discrepanciesbetween the UNIX and MS Windows compilers became noticeable, requiringchanges to the source code.  Most obviously, all PC programs had toinclude <windows.h> before <gl.h> or <glu.h>.  GLUT already doesthis in the correct order, so the simplest solution was to onlyinclude <GL/glut.h> and to let it include (if needed) the windows.h,gl.h, and glu.h files, in the correct order.The torus.c program refers to a symbolic constant M_PI, which maynot be found on MS Windows based systems.  A new constant PI_ has replaced it and is defined within the program.Several programs use callback functions.  The method of castingthose callback functions worked fine on UNIX based systems, butnot on PCs.  The programs quadric.c, surface.c, trim.c, tess.c,and tesswind.c have been modified.  References to (GLvoid (*))cast have been removed, and a reference to the CALLBACK type has been added to the declaration of the callback functions.Where CALLBACK is undefined (for instance, in UNIX systems),it is stubbed out by use of #ifndef.The programs accpersp.c and dof.c used the variable names "near"and "far" which are reserved words for PC compilers.  If needed,these variables names are now redefined during pre-processing (by using #ifdef).* OpenGL 1.0 to 1.1 compatibility issuesMost of these programs also run well on OpenGL 1.0.  There arenine programs which use features not found in OpenGL 1.0.  The four programs checker.c, mipmap.c, texgen.c, and wrap.c usetexture objects, and have been modified so that they will avoidthe use of texture objects on OpenGL 1.1 machines.  So theseprograms will still run well on OpenGL 1.0.The five programs polyoff.c, texbind.c, texprox.c, texsub.c,and varray.c demonstrate features which are new in OpenGL 1.1.On OpenGL 1.0, these five programs will not run; instead an errormessage will be printed out.  If your implementation of OpenGL 1.0supports polygon offset, vertex array, and/or texture extensions,you may be able to modify the code to run on your implementation.* OpenGL 1.1 to 1.2 compatiblity issuesMost of the programs included in this distribution will work withOpenGL 1.1.* Notes for programs demonstrating the ARB Imaging SubsetWith the introduction of OpenGL 1.2, the OpenGL Architecture ReviewBoard added the ARB Imaging Subset.  The imaging subset is not part ofthe core OpenGL functionality, and as such, your implementation may notsupport it.  For simplicity's sake, the programs included in this set ofprograms do not check for support of the imaging subset; productionapplications should.  These programs are: colormatrix.c, colortable.c,convolution.c, histogram.c, minmax.c, and blendeqn.c.  These programsmay not compile, if your client library doesn't support the ARB ImagingSubset.  Likewise, if your server (or hardware driver) does not exportthe string, "GL_ARB_imaging" when you query for extensions, theseprograms will not execute.	   Thank you.Mason Woo - mason@woo.comDave Shreiner - shreiner@sgi.comCo-authors of the OpenGL Programming Guide, Version 1.2

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -