Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learn OpenGL
  • Table Of Contents Toc
Learn OpenGL

Learn OpenGL

By : Frahaan Hussain
2.5 (4)
close
close
Learn OpenGL

Learn OpenGL

2.5 (4)
By: Frahaan Hussain

Overview of this book

Learn OpenGL is your one-stop reference guide to get started with OpenGL and C++ for game development. From setting up the development environment to getting started with basics of drawing and shaders, along with concepts such as lighting, model loading, and cube mapping, this book will get you up to speed with the fundamentals. You begin by setting up your development environment to use OpenGL on Windows and macOS. With GLFW and GLEW set up using absolute and relative linking done, you are ready to setup SDL and SFML for both the operating systems. Now that your development environment is set up, you'll learn to draw using simple shaders as well as make the shader more adaptable and reusable. Then we move on to more advanced topics like texturing your objects with images and transforming your objects using translate, rotate and scale. With these concepts covered, we'll move on to topics like lighting to enable you to incorporate amazing dynamic lights in your game world. By the end of the book, you'll learn about model loading, right from setting up ASSIMP to learning about the model class and loading a model in your game environment. We will conclude by understanding cube mapping to bring advance worlds to your game.
Table of Contents (8 chapters)
close
close

Lightmaps

Let's discuss lightmaps in this section. But first, let's try to understand what a lighting map is. Well, in the real world, if you have, let's say, a crate that is partly metal and partly wood, similar to the following screenshot:

The wooden parts of it will react differently to the light compared to the metal parts. It might sound obvious, but OpenGL (or any other sort of 3D graphics API) doesn't have a concept of wood or metal or plastic, or anything else and as a result, we need to program that in. We need to use other techniques to help illustrate that visually as the wood should be less shiny than the metal parts of the crate. If you search on lighting maps, you'll get a bunch of information. You can create them in various tools. You can use Maya or Photoshop to create them. So, without further ado, let's get down to the coding...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Learn OpenGL
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon