Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Instant GLEW

📅 2013-Jul-30 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ book, glew, opengl, opengl extension ⬩ 📚 Archive

Instant GLEW

I have written a small book titled Instant GLEW about deploying OpenGL extensions in graphics programs by using the GLEW library. The book is published by PacktPub and is available from 26 July 2013. It is available in both print and ebook formats. The book is available at PacktPubAmazon, Safari, Kobo and AbeBooks. You can rate and review it at Goodreads. Get this book if you are taking your first steps with using OpenGL extensions in your programs.

GLEW is a pretty simple library to use, but students who are studying computer graphics for the first time have a hard time using OpenGL and OpenGL extensions. This problem is all the more exacerbated by the archaic versions of OpenGL that ship with the various versions of Windows. Programmers are forced to use OpenGL extensions for features that are considered basic and essential in graphics programs. This is the problem that GLEW attacks successfully.

In the book, I explain how to install the GLEW library on Windows and customize your Visual Studio solution to use it for compiling and linking your programs. I illustrate the usage of GLEW by using it to apply vertex and fragment shader programs on a teapot in 3D. Using shaders in an OpenGL program is probably the most popular use of OpenGL extensions and that is the reason I picked this example. You do not need to know GLSL or shader programming to understand this example.

In later sections of the book, I explain the other useful APIs of GLEW which help you write clean and portable programs that can fallback on older rendering techniques when advanced methods are not available. I also introduce a few useful utilities that make using OpenGL extensions informative and fun. Finally, there might be times when you need to access a bleeding-edge OpenGL extension that is not yet supported in GLEW. I show how to use such a new extension in your programs. It can get messy, but I show you how to get it done.

All said, this tiny book should be useful to students and programmers to quickly start using GLEW in their programs. If you find yourself using OpenGL extensions, do try Instant GLEW! 😊


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧