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


Basic Electronics: Theory and Practice

Authors: Sean Westcott, Jean Riescher Westcott
Publisher: Mercury
Pages: 
ISBN: 978-683925286
Print: 1683925289
Kindle:  B08BPK1VW2
Audience: Students and hobbyists
Rating: 2
Reviewer: Harry Fairhead
More and more programmers need an understanding of electronics as the needs of the IoT mix  [ ... ]



SQL Server 2017 Query Performance Tuning, 5th Ed

Author: Grant Fritchey
Publisher: Apress
Pages: 966
ISBN: 978-1484238875
Print: 1484238877
Kindle: B07H49LN75
Audience: DBAs and developers
Rating: 4.7
Reviewer: Ian Stirk

A popular performance tuning book gets updated for SQL Server 2017, how does it fare?


More Reviews

Last Updated ( Tuesday, 18 February 2020 )