|
1 |
| -Example code for the OpenGL Programming Guide (Red Book) |
2 |
| -======================================================== |
| 1 | +OpenGL Red Book Example Code |
| 2 | +============================ |
3 | 3 |
|
4 |
| -Coming soon to a repository near you! |
| 4 | +This is the example code for the OpenGL Programming Guide (Red Book), 9th Edition. |
| 5 | +It is mostly an import of code from previous editions with minor updates |
| 6 | +to match some of the descriptions in the latest edition of the book. |
| 7 | +We will be adding more samples and updating existing ones over time. |
| 8 | +Treat this as a live repository. Pull requests and issues are welcome. |
| 9 | +Go forth and fork! |
| 10 | + |
| 11 | +Building |
| 12 | +-------- |
| 13 | + |
| 14 | +We are using CMake as our build system. To build the samples, enter |
| 15 | +the "build" subdirectory and enter "cmake -G "{your generator here}" .." |
| 16 | +Project files or makefiles will be produced in the build subdirectory. |
| 17 | +We have tested Unix makefiles ("Unix Makefiles") and Visual Studio project files. |
| 18 | +Visual Studio 2013 ("Visual Studio 12") was used to develop most of the samples. |
| 19 | +An update to add support for 2015 will land shortly. Code should compile, but the |
| 20 | +templates for the project files are not in the repository at this time. |
| 21 | +Other compilers and IDEs should work, but we haven't tested them. |
| 22 | + |
| 23 | +Running |
| 24 | +------- |
| 25 | + |
| 26 | +Download the media pack from the download area in the repository and unpack it |
| 27 | +into the bin/media directory. This contains model files and textures used by the |
| 28 | +applications. Without this, most applications won't work and will quite possibly |
| 29 | +crash. Don't file bugs about that if you don't have the media files. |
| 30 | +Otherwise, the samples should compile and run out-of-the box. Of course, make sure your |
| 31 | +OpenGL drivers are up to date and that your hardware is capable of running OpenGL 4.5. |
| 32 | +That's what this book is about. Some systems don't support OpenGL 4.5 and will therefore |
| 33 | +not run some of the samples. Trying to run such samples on a machine that doesn't have |
| 34 | +OpenGL 4.5 support will fail. For example, if a platform were limited to, say OpenGL 4.1, |
| 35 | +then the samples wouldn't work on that platform. Please don't file bugs about that either. |
| 36 | +Error checking in these applications is minimal. If you don't have media files or if |
| 37 | +your OpenGL drivers are out of date, they'll probably fail spectacularly. |
0 commit comments