Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
OpenGL Game Development By Example
OpenGL Game Development By Example

OpenGL Game Development By Example: Design and code your own 2D and 3D games efficiently using OpenGL and C++

eBook
NZ$53.99 NZ$77.99
Paperback
NZ$96.99
Subscription
Free Trial

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

OpenGL Game Development By Example

Chapter 1. Building the Foundation

Building a game is like building a house. Except this is a crazy house with rooms sticking out everywhere, and at any time someone might decide to add another room just here, and remove a room over there. You had better have a good foundation!

This chapter will take you through the process of setting up the foundation to build your game. You will learn, how to set up a development environment using Visual Studio. Next, you will set up the game loop, which is the foundation for every game ever created. Finally, you will set up the development environment to use OpenGL as your rendering engine.

Introducing the development environment

The development environment is the set of tools that you use to edit, compile, and run your program. There are many development tools out there; some tools are glorified text editors, while others are entire suites of tools that are integrated into a single application. These more advanced suites are known as Integrated Development Environments (IDEs).

Microsoft's Visual Studio is by far the most widely used IDE, and the good news is that you can obtain and use it for free. Go to https://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx and follow the links to download the latest version of Visual Studio Community, previously known as Visual Studio Express. Visual Studio Community is not a trial version and will not expire. You will probably see trial versions of Visual Studio being offered, so make sure you download the free version of Visual Studio Community.

Visual Studio offers several languages to program in. We will be using C++ throughout this book. When you first use Visual Studio, you may be asked which language you want to set up the development environment for. I recommend that you choose the C++ settings. However, you will still be able to use Visual Studio for C++ even if you choose a different default programming language.

Visual Studio Community 2013 was the current version at the time this book was written. All of the screenshots you see in the book are from that version. It is quite likely that a later version of Visual Studio will have come out by the time you get your hands on this book. The general functionality stays the same from one version to another, so this should not be a problem. If you are using a different version of Visual Studio, then the exact location of some commands may not be the same as in the screenshots in this book.

Tip

Microsoft differentiates between programs written for Windows Desktop and those written for Windows Universal. Ensure that you download Visual Studio Community Express for Desktop.

When you first start Visual Studio, you will be asked for a few options, so I thought I'd cover them here:

  • If you are asked which programming language you would like to set up as your default development environment, it really doesn't matter which language you choose. If you think you will be using C++ a lot, then pick C++. If you pick another language as your default you will still be able to code in C++.
  • You will be asked to sign into your Microsoft account. If you have ever used MSN, Hotmail, or Windows Messenger, then you already have a Microsoft account. At any rate, if you don't have a Microsoft account you can use your own e-mail address to create one, and it doesn't cost anything.
  • You may be asked to set up a developer license for Windows. Just click I Agree and it will be done. Again, no charge!

A quick look at Visual Studio

As Visual Studio can do so many things, it may be a bit intimidating the first time you use it. I have been using Visual Studio for over 20 years and there are still parts of it that I have never needed! Let's take a look at the key components, in the following screenshot, that you will use every day:

A quick look at Visual Studio

Start screen

The start screen, as shown in the preceding screenshot, allows you to quickly start a new project or open an existing project. The most recent projects that you have worked with can be quickly accessed from the list of recent projects.

The Solution Explorer panel

The Solution Explorer panel allows you to navigate and work with all of the code and other resources in your project. If you do not see the Solution Explorer window on your screen, click View | Solution Explorer.

The Solution Explorer panel

From this window you can:

  • Double-click on any item to open it
  • Right-click to add existing items to the project
  • Right-click to add new items to the project
  • Create folders to organize your code

The Standard Toolbar panel

The Standard Toolbar panel contains buttons for the most common tasks:

  • Save the current file
  • Save all modified files
  • Undo and Redo
  • Run the program

Tip

There are basically two ways to run your program. You can run the program with or without debugging. Debugging mode allows you to set checkpoints that stop the program and let you view the state of variables, and perform other operations while the code is running. If you run the program without debugging, you will not be able to do these things.

The Standard Toolbar panel

The code window

The center of the IDE is dominated by the code window. This is where you type and edit your code. You can have several code windows open at once. Each code window will add a tab across the top, allowing you to switch from one piece of code to another with a single click:

The code window

You will notice that the text is color-coded. This allows you to easily see different types of code. For example, the comments in the code in the preceding screenshot are in green, while the C++ objects are in blue. You can also zoom in and out of the code by holding down the Ctrl button and using the scroll wheel on the mouse.

The output window

The output window is typically at the bottom of the IDE. This window is where you will look at to see the status of the current run, and where you will find errors when you try to compile run your program.

If you see an error in the output window, you can usually double-click on it, and Visual Studio will take you to the line in code that caused the error:

The output window

Starting your project

It's time to stop reading and start doing! We are going to use Visual Studio to start our game project.

  1. Open Visual Studio and click the New Project link in the start window.
  2. Navigate to the left-hand side panel and select Win32 under the Visual C++ branch of Templates.
    Starting your project
  3. Select Win32 Project in the center area.
  4. Give the project a name. The first game we will be working on is a 2D robot racing game that we'll call RoboRacer2D.
  5. Choose a folder location to store the project, or just leave the default location.
  6. The solution name is almost always the same as the project name, so leave that as it is.
  7. Leave Create directory for solution checked.
  8. Click OK.
  9. On the next screen click Finish.

We need to tell Visual Studio how to work with Unicode characters. Right-click on the project name in the Solution Explorer panel and choose Properties. Then select General. Change the Character Set property to Not Set.

Congratulations! You have now created your Windows application and set up your development environment. It's time to move on to creating the framework for your game.

The game loop

The game loop is the primary mechanism that moves the game forward in time. Before we learn how to create this important component, let's briefly take a look at the structure of most games.

The game structure

There are three phases to most games: the initialization phase, the game loop, and the shutdown phase. The core of any game is the game loop.

The game structure

The game loop is a sequence of processes that run continuously as long as the game is running. The three main processes that occur in the game loop are input, update, and render.

The input process is how the player controls the game. This could be any combination of keyboard, mouse, or control pad. Newer technologies allow the game to be controlled via a sensing device that detects gestures, while mobile devices detect touch, acceleration, and even GPS.

The update process encompasses all of the tasks required to update the game: calculating where characters and game objects have moved, determining whether items in the game have collided, and applying physics and other forces in the game.

Once the preceding calculations have been completed, then it is time to draw results. This is known as the render process. OpenGL is the library of code that handles the rendering for your game.

Tip

Many people think that OpenGL is a game engine. This is not accurate. OpenGL—the open graphics language—is a rendering library. As you can see, rendering is only one process involved in the execution of a game.

Let's take a closer look at each stage of the game so that we can get a better idea of how OpenGL fits in.

Initialization

There are certain parts of the game that must be set up only once before the game can run. This typically includes initializing variables and loading resources. There are certain parts of OpenGL that must be initialized during this phase as well.

The game loop

Once the initialization is complete, the game loop takes over. The game loop is literally an endless loop that cycles until something tells it to stop. This is often the player telling the game to end.

In order to create the illusion of movement, the render phase must occur several times a second. In general, games strive to render at least 30 frames to the screen every second, and 60 frames per second (fps) is even better.

Tip

It turns out that 24 fps is the threshold at which the human eye begins to see continuous motion instead of individual frames. This is why we want the slowest speed for our game to be 30 fps.

Shutdown

When the game does end, it isn't enough to just exit the program. Resources that are taking up precious computer memory must be properly released to the reclaim that memory. For example, if you have allocated memory for an image, you will want to release that memory by the end of the game. OpenGL has to be properly shut down so that it doesn't continue to control the Graphics Processing Unit (GPU). The final phase of the game is to return control to the device so that it will continue working properly in its normal, nongaming mode.

Creating the game structure

Now that we created our RoboRacer2D project in Visual Studio project, let's learn how to modify this code to create our game structure. Start Visual Studio and open the project we just created.

You should now see a window with code in it. The name of the code file should be RoboRacer2D.cpp. If you don't see this code window, then find Solution Explorer, navigate to RoboRacer2D.cpp, and open it up.

I'll be the first person to admit that the Windows C++ code is both ugly and intimidating! There is a lot of code created from you by Visual Studio when you choose the Windows desktop template to create your project. In fact, you can run this code right now by clicking DEBUG from the menu bar and then choosing Start Debugging. You can also press the F5 key.

Go ahead and do it!

Creating the game structure

You will see a window telling you that the project is out of date. This simply means that Visual Studio needs to process your code and turn it into an executable—a process called building the project. For the computer science majors out there, this is where your code is compiled, linked, and then executed by the operating system.

Click Yes to continue.

Creating the game structure

Congratulations! You have now created and run your first program in Visual Studio. It may not look like much, but there is a lot going on here:

  • A fully sizeable and moveable window
  • A working menu system with File and Help choices
  • A title bar with RoboRacer2D
  • Working minimize, maximize, and close buttons

Keep in mind that you haven't written a single line of code yet!

Now that you see it, feel free to use the close button to close the window and return to Visual Studio.

But wait, this doesn't look like a game!

If you are thinking the RoboRacer2D program doesn't look much like a game, you are correct! In fact, to make a game we typically strip away about everything that you now see! However, for this demonstration, we are going to keep the window just like it is, and worry more about the code than the appearance.

Port of access

Every program has a starting point, and for a Windows program the entry point is the _tWinMain function. Look for the following line of code:

int APIENTRY wWinMain

The _wWinMain function will start running and will set up everything required to run a Windows desktop program. It is beyond the scope of this book to go into everything that is going on here. We will just take it for granted that the code we are looking at sets things up to run in Windows, and we will focus on the things that we need to modify to make a game.

The Windows message loop

It turns out that _wWinMain already sets up a loop. In a similar manner to games, Windows programs actually run in an endless loop, until they receive some kind of event that tells them to stop. Here's the code:

// Main message loop:
while (GetMessage(&msg, nullptr, 0, 0))
{
  if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
  {
    TranslateMessage(&msg);
    DispatchMessage(&msg);
  }
}

As you can see, these lines of code set up a while loop that will continue to run until the result of the GetMessage call is false.

Again, we won't worry about the exact details, but suffice to say that GetMessage constantly checks for messages, or events, that are sent by Windows. One particular message is the quit event, which will return a result of false, ending the while loop, exiting the _tWinMain function, and ending the program.

Our goal is to modify the Windows message loop and turn this block of code into a game loop:

StartGame();
//Game Loop
bool done = false;
while (!done)
{
  if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
  {
    if (msg.message == WM_QUIT)
    {
      done = true;
    }
    else
    {
      TranslateMessage(&msg);
      DispatchMessage(&msg);
    }
  }
  else
  {
    GameLoop();
  }
}
EndGame();

Study the preceding code. You will see that we have added three new functions: StartGame, GameLoop, and EndGame.

  • StartGame comes before the Windows message loop, which means that everything in StartGame will run once before Windows enters its loop. We will put all of the game initialization code in the StartGame function.
  • EndGame comes after the Windows message loop. This means that the code in EndGame will only execute one time after the Windows message loop has exited. This is the perfect place for us to release resources and shut the game down.
  • GameLoop is interleaved in the Windows message loop. Basically, the code is saying, "Keep running until you receive a Windows message to quit. While you are running, check to see if Windows has passed any events that need to be handled. If there are no messages to handle, then run our game."

Tip

Order is important. For example, you have to declare these functions before the wWinMain function. This is because they are called by wWinMain, so they have to exist before tWinMain uses them. In general, a function has to be declared before the code that uses it.

In order for these new functions to be valid, go to the line just before the _tWinMain and enter some stubs for these three functions:

void StartGame()
{
}

void GameLoop()
{
}

void EndGame()
{
}

The idea here is to help you see how easy it is to convert the standard Windows message loop into a game loop.

Introducing OpenGL

We have spent a lot of time so far talking about game loops and Visual Studio. We are finally going to discuss the main topic of this book: OpenGL!

What is OpenGL?

OpenGL makes it possible to render sophisticated 2D and 3D graphics on your computer screen. In fact, OpenGL is also the technology behind most mobile devices and tablet devices.

OpenGL works in conjunction with your device's graphics device to draw graphics on the screen. Most modern computing devices have two processors: the Central Processing Unit (CPU) and the Graphics Processing Unit (GPU).

Drawing modern 2D and 3D graphics is a very processor intensive task. In order to free the computer's main processor (the CPU) to do its job, the GPU takes on the task of rendering to the screen. OpenGL is a language that tells the GPU what to do and how to do it.

Tip

Technically, OpenGL is an API, or application programming interface. Another way to understand this is that OpenGL is a library of code that you can access once you have included the proper headers in your code. There are different versions of OpenGL. This book uses OpenGL 1.1. Although this is the very first version of OpenGL, it is included in all versions of Windows and provides the building blocks for all future versions.

The other GL

By the way, you have probably heard of the "other" graphics engine—Microsoft's DirectX. Similar to OpenGL, DirectX allows programmers to talk to the GPU. A lot of people want to know the differences between OpenGL and DirectX, and which is the best choice.

Although there are certainly going to be fans and defenders of both technologies, the only real difference between DirectX and OpenGL is the specific way that you code them. Both technologies are about the same when it comes to features and abilities.

There is one advantage that OpenGL has over DirectX. DirectX only works on Microsoft technologies, while OpenGL works on Microsoft technologies and many others, including most modern cell phones, and the Apple Mac line of computers.

Downloading OpenGL

I remember when I was first learning OpenGL. I searched in vain, looking for the link to download the OpenGL SDK. It turns out that you don't have to download the OpenGL SDK because it is already installed when you install Visual Studio.

You do want to make sure that you have the latest OpenGL driver for your video card. To do that, go to http://www.opengl.org/wiki/Getting_started#Downloading_OpenGL and follow the appropriate link.

Adding OpenGL to the project

In order to use OpenGL in our program, we will need to add some code. Open the RoboRacer2D project that we have been working on, and let's do this!

Linking to the OpenGL library

Everything that you need to use OpenGL is found in the OpenGL32.dll lib file. It's up to you to tell Visual Studio that you want to use the OpenGL library in your project.

Right-click on Project | RoboRacer2D properties.

Tip

By the way, Visual Studio first creates a solution, and then puts a project in the solution. The solution is the top entry in the Solution Explorer hierarchy, and the project is the first child. In this case, make sure you right-click on the project, not the solution.

Linking to the OpenGL library
  1. For the Configuration drop-down box, make sure you select All Configurations.
  2. Open the Configuration Properties branch, then the Linker branch.
  3. Select the Input option.
  4. Click the dropdown for Additional Dependencies and choose <Edit…>.
  5. Enter OpenGL32.lib into the dialog window and click OK.
    Linking to the OpenGL library
  6. Close the Property Pages window.

Even if you are writing a 64 bit application, you will use the OpenGL 32 bit library.

Next, we need to tell Visual Studio that you want to include the OpenGL headers in your program. If you take a look at the top of your code, you will see several headers already being loaded:

#include "stdafx.h"
#include "RoboRacer2D.h"

Just below these lines, add the following:

#include <Windows.h>
#include <gl\GL.h>
#include <gl\GLU.h>

Tip

GL.h is the main header for the OpenGL library. GLU.h stands for GL Utility and is an additional library of features that make OpenGL a little easier to use. These headers correspond to the OpenGL32.lib and Glu32.lib libraries that we added to the project.

Congratulations! You have set up the development environment to use OpenGL and you are now ready to program your first game.

Summary

We covered a lot of ground in this chapter. We learned how to set up your development environment by downloading and installing Visual Studio. Next, we created a C++ Windows Desktop application.

We discussed the structure of most games and the importance of the game loop. Recall that an average game should run at 30 fps, while top-end games shoot for 60 fps to provide smooth animations.

Finally, we learned about OpenGL and how to initialize OpenGL in your project. Remember, OpenGL is the graphics engine that will be responsible for drawing every image and piece of text to your screen using the power of your GPU.

After all this work, there still isn't a lot to see. In the next chapter, we will go into all of the details of how to render your first image to the screen. Believe it or not, getting your development environment properly set up means you have already accomplished a great deal toward creating your first game using OpenGL.

Left arrow icon Right arrow icon

Key benefits

  • Create 2D and 3D games completely, through a series of end-to-end game projects
  • Learn to render high performance 2D and 3D graphics using OpenGL
  • Implement a rudimentary game engine using step-by-step code

Description

OpenGL is one of the most popular rendering SDKs used to develop games. OpenGL has been used to create everything from 3D masterpieces running on desktop computers to 2D puzzles running on mobile devices. You will learn to apply both 2D and 3D technologies to bring your game idea to life. There is a lot more to making a game than just drawing pictures and that is where this book is unique! It provides a complete tutorial on designing and coding games from the setup of the development environment to final credits screen, through the creation of a 2D and 3D game. The book starts off by showing you how to set up a development environment using Visual Studio, and create a code framework for your game. It then walks you through creation of two games–a 2D platform game called Roboracer 2D and a 3D first-person space shooter game–using OpenGL to render both 2D and 3D graphics using a 2D coordinate system. You'll create sprite classes, render sprites and animation, and navigate and control the characters. You will also learn how to implement input, use audio, and code basic collision and physics systems. From setting up the development environment to creating the final credits screen, the book will take you through the complete journey of creating a game engine that you can extend to create your own games.

Who is this book for?

If you are a prospective game developer with some experience using C++, then this book is for you. Both prospective and experienced game programmers will find nuggets of wisdom and practical advice as they learn to code two full games using OpenGL, C++, and a host of related tools.

What you will learn

  • Set up your development environment in Visual Studio using OpenGL
  • Use 2D and 3D coordinate systems
  • Implement an input system to handle the mouse and the keyboard
  • Create a state machine to handle complex changes in the game
  • Load, display, and manipulate both 2D and 3D graphics
  • Implement collision detection and basic physics
  • Discover the key components needed to complete a polished game
  • Handle audio files and implement sound effects and music

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Mar 08, 2016
Length: 340 pages
Edition : 1st
Language : English
ISBN-13 : 9781783288199
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Mar 08, 2016
Length: 340 pages
Edition : 1st
Language : English
ISBN-13 : 9781783288199
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just NZ$7 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just NZ$7 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total NZ$ 302.97
OpenGL ??? Build high performance graphics
NZ$124.99
OpenGL Data Visualization Cookbook
NZ$80.99
OpenGL Game Development By Example
NZ$96.99
Total NZ$ 302.97 Stars icon

Table of Contents

13 Chapters
1. Building the Foundation Chevron down icon Chevron up icon
2. Your Point of View Chevron down icon Chevron up icon
3. A Matter of Character Chevron down icon Chevron up icon
4. Control Freak Chevron down icon Chevron up icon
5. Hit and Run Chevron down icon Chevron up icon
6. Polishing the Silver Chevron down icon Chevron up icon
7. Audio Adrenaline Chevron down icon Chevron up icon
8. Expanding Your Horizons Chevron down icon Chevron up icon
9. Super Models Chevron down icon Chevron up icon
10. Expanding Space Chevron down icon Chevron up icon
11. Heads Up Chevron down icon Chevron up icon
12. Conquer the Universe Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Half star icon Empty star icon Empty star icon 2.7
(6 Ratings)
5 star 16.7%
4 star 33.3%
3 star 0%
2 star 0%
1 star 50%
Filter icon Filter
Top Reviews

Filter reviews by




Robert Madsen Aug 12, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Full disclosure...I am the author of this book. I recognize the criticisms that the book is written to OpenGL 1.1. Keep in mind three things: (1) This book is intended as a primer. The reason for using OpenGL 1.1 is because that is the version that comes universally on all Windows PCs and therefore it is widely available and already pre-installed. (2) There is nothing taught in the book that is invalidated by newer versions of OpenGL, and (3) The book is much more that a book about OpenGL...it is a book about game development using OpenGL. In that regard, it covers other features of game development including good game design, audio, and UI. The reader creates 2 prototype games--one in 2D and one in 3D.I'll admit this is not an advanced OpenGL book...there are other books that fulfill that purpose. However, this book does exactly what the description says it does. It provides a beginner a good understanding of developing 2D and 3D games.Thanks for all of your comments.
Amazon Verified review Amazon
yetiman123 Mar 19, 2018
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Outdated a bit, but it works.
Amazon Verified review Amazon
Jairo Supelano Jul 29, 2020
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
About the objective of the text it more or less complies with it; it guides the user through the process of using OpenGL to develop both 2D and 3D games (intro level), and it gives pointers about free and open source tools that may help in the process, yet it makes use of things like GLUT, which must be avoided since is old, its use require things that are not part of C++ standard and is not a standard itself and is not always available, and it uses it for things like glutGet(GLUT_ELAPSED_TIME) which could be replaced by things like GetTickCount() since all examples are intended to run on Windows only (there are other alternatives which require to use at least C++ 11 or above, which would not be a problem with the tools used along the text).On the other hand the code examples where not verified for typos, and they would not even compile in the way they are presented in the text; from missing semi-colons to wrong type of parameters, to simply telling the user to include some files, but displayed in screenshots with the wrong name. Is obvious that the code was not copied from working code and was not tested before placing it in the text
Amazon Verified review Amazon
Amazon Customer Mar 10, 2016
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
Absolutely terrible. Very shallow introduction to OpenGL, with nothing about shaders or modern pipeline, no scene graph, no proper model loading, nothing about lighting a scene... this book is just useless. You can find much better information online, on great websites like (...) and (...)
Amazon Verified review Amazon
Gabor Szauer Mar 23, 2016
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
I got this book after reading Packt's other great books on shaders and OpenGL. I expected this to be great as well, it is not.The entire book focuses on the VERY outdated OpenGL 1.1 API. And even at that it does a poor job. The amount of information covered in this book is so low i can't even rant about it. The book does not even mention vertex arrays, forget about anything with buffer in the name. How did this manage to find a publisher and get published? If you want to get a good book about legacy OpenGL, go with OpenGL Game Programming, First edition/
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.