Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
C++ Game Development By Example

You're reading from   C++ Game Development By Example Learn to build games and graphics with SFML, OpenGL, and Vulkan using C++ programming

Arrow left icon
Product type Paperback
Published in May 2019
Publisher Packt
ISBN-13 9781789535303
Length 420 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Siddharth Shekar Siddharth Shekar
Author Profile Icon Siddharth Shekar
Siddharth Shekar
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Section 1: Basic Concepts FREE CHAPTER
2. C++ Concepts 3. Mathematics and Graphics Concepts 4. Section 2: SFML 2D Game Development
5. Setting Up Your Game 6. Creating Your Game 7. Finalizing Your Game 8. Section 3: Modern OpenGL 3D Game Development
9. Getting Started with OpenGL 10. Building on the Game Objects 11. Enhancing Your Game with Collision, Loops, and Lighting 12. Section 4: Rendering 3D Objects with Vulkan
13. Getting Started with Vulkan 14. Preparing the Clear Screen 15. Creating Object Resources 16. Drawing Vulkan Objects 17. Other Books You May Enjoy

Getting Started with OpenGL

In the previous three chapters, we rendered 2D objects called sprites in our tiny Bazooka game using the Simple and Fast Media Library (SFML). At the core of SFML is OpenGL; this is used to render anything on screen, including 2D objects.

SFML does a great job of putting everything in a nice little package, and this allows us to get a 3D game going very quickly. However, in order to understand how a graphics library actually works, we need to learn how OpenGL works by delving deeper into how to use it so that we can render anything on the screen.

In this chapter, we will discover how to use a graphics library, such as OpenGL, in order to render 3D objects in any scene. We will cover the following topics:

  • What is OpenGL?
  • Creating our first OpenGL project
  • Creating a window and ClearScreen
  • Creating a Mesh class
  • Creating a Camera class
  • The Shaderloader...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at R$50/month. Cancel anytime