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! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
OpenGL Game Development By Example

You're reading from   OpenGL Game Development By Example Design and code your own 2D and 3D games efficiently using OpenGL and C++

Arrow left icon
Product type Paperback
Published in Mar 2016
Publisher
ISBN-13 9781783288199
Length 340 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
 Madsen Madsen
Author Profile Icon Madsen
Madsen
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

A fun framework


Now, it's time to create our playground. Before we start coding, let's decide on the basic features that we want to set up:

  • Visual Studio project

  • Windows environment

  • OpenGL environment

  • Game loop

That's all we are going to do for now. The idea is to set up a basic template that you can use to start any game or experimental project. We don't want to include too much in this basic framework, so we will leave out sound, input, sprite, and model loading for now. These can be added in as they are needed.

Setting up the Visual Studio project

Start a new blank project and name it FunWith3D. Make sure to add the correct libraries as we have done before in the project Properties, Configuration Properties, Linker, Input, Additional Dependencies property:

glu32.lib;opengl32.lib;SOIL.lib;

We are going to include the SOIL library because it is so useful to load images. You will want to copy the following files over from our SpaceRacer3D.cpp project folder:

  • glut.h

  • glut32.lib

  • glut32.dll

  • SOIL.h...

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 $15.99/month. Cancel anytime
Visually different images