Computer Graphics Programming in OpenGL with C++

Author: V. Scott Gordon
Publisher: Mercury
Date: September 2018
Pages: 384
ISBN: 978-1683922216
Print: 1683922212
Kindle: B07MHD8TKB
Audience: Developers wanting to learn OpenGL
Rating: 5
Reviewer: Mike James


C++ and OpenGL are a natural pair and this book will help you get started.

Graphics is processor hungry and you can never have enough processing power to get the job done between frames. This is a version of the author's book on OpenGL in Java, but the language used here is C++. The dialect of C++ is a fairly straightforward one so that you can follow the examples easily. In fact, as the code is mostly function calls it might as well be C as C++. I get the feeling that this is a translation from the Java book to the C++ book, but this isn't a huge problem. It is also worth mentioning that there is a Windows bias in that directories are given in Windows form - again not a big problem.

Banner

The plan of the book follows the Java book. Chapter 1 deals with the basics and introduces the libraries that are going to be used. Chapter 2 introduces the graphics pipeline and gives us a first example which surprisingly includes some animation. From here we take a detour into theory, i.e. basic 2 and 3D transformations are introduced along with the dot and cross product. It is very basic and if you have done anything similar you will not have any problems. If you are new to this I would suggest reading another book to expand on the ideas. 

Chapter 4 introduces buffers, uniforms and so on. This is the core chapter you have to master before moving on to anything else. Chapter 5 explains texture mapping, which is the other major idea you need to master. From here the book expands to cover more general topics. Chapter 6 explains how to create simple 3D models and how to import more complex models. Chapter 7 is about lighting - the standard models, Gourand and Phong in particular. Chapter 8 deals with the ever troublesome shadowing and chapter 9 is about backgrounds. Chapter 10 introduces more sophisticated surface effects - bump maps etc. Chapter 11 returns to parametric modelling with a look at surfaces via Bezier curves. Chapter 12 uses this in combination with tessellations to create landscapes. The book rounds out with a look at geometry shaders and other techniques - fog, blending, 3D Textures, noise and so on.

Conclusion

This is an easy introduction to OpenGL, well about as easy as a complex topic can get. The ideas are introduced in plain language and simple programs. There are diagrams  in color to help. The programs also help make the point of what exactly is being proposed so be prepared to read them in detail. You'll also find the code on the CD along with object models, figures and more.

You will need to be fairly good at C++ written in a C style to cope and you will need to do some debugging. but this is how you learn. You will need a reference book to go beyond what the book explains, but the fact it explains it rather than just presents it is a valuable plus.

If you want to use OpenGL from C++/C then this is a good place to start.

To keep up with our coverage of books for programmers, follow @bookwatchiprog on Twitter or subscribe to I Programmer's Books RSS feed for each day's new addition to Book Watch and for new reviews.

Banner


Algorithms: Absolute Beginner's Guide

Author: Kirupa Chinnathambi
Publisher: Addison-Wesley
Date: November 2023
Pages: 416
ISBN: 978-0138222291
Print: 0138222290
Kindle: B0CCTZ37DQ
Audience: General
Rating: 4.5
Reviewer: Kay Ewbank

Subtitled 'a practical introduction to data structures and algorithms in JavaScript', this book is split into tw [ ... ]



Professional C++, 6th Ed (Wiley)

Author: Marc Gregoire
Publisher: Wiley
Date: February 2024
Pages: 1376
ISBN:978-1394193172
Print:1394193173
Kindle:B0CRXK5191
Audience: C++ developers
Rating: 4
Reviewer: Mike James
Can a book on C++ get any bigger and does it need to?


More Reviews

Last Updated ( Tuesday, 18 February 2020 )