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
OpenGL Data Visualization Cookbook

You're reading from   OpenGL Data Visualization Cookbook Over 35 hands-on recipes to create impressive, stunning visuals for a wide range of real-time, interactive applications using OpenGL

Arrow left icon
Product type Paperback
Published in Aug 2015
Publisher Packt
ISBN-13 9781782169727
Length 298 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (11) Chapters Close

Preface 1. Getting Started with OpenGL 2. OpenGL Primitives and 2D Data Visualization FREE CHAPTER 3. Interactive 3D Data Visualization 4. Rendering 2D Images and Videos with Texture Mapping 5. Rendering of Point Cloud Data for 3D Range-sensing Cameras 6. Rendering Stereoscopic 3D Models using OpenGL 7. An Introduction to Real-time Graphics Rendering on a Mobile Platform using OpenGL ES 3.0 8. Interactive Real-time Data Visualization on Mobile Devices 9. Augmented Reality-based Visualization on Mobile or Wearable Platforms Index

Installing the GLFW library in Windows

There are two ways to install the GLFW library in Windows, both of which will be discussed in this section. The first approach involves compiling the GLFW source code directly with CMake for full control. However, to simplify the process, we suggest that you download the precompiled binary distribution.

Getting ready

We assume that you have successfully installed both Visual Studio 2013 and CMake, as described in the earlier section. For completeness, we will demonstrate how to install GLFW using CMake.

How to do it...

To use the precompiled binary package for GLFW, follow these steps:

  1. Create the C:/Program Files (x86)/glfw-3.0.4 directory. Grant the necessary permissions when prompted.
  2. Download the glfw-3.0.4.bin.WIN32.zip package from http://sourceforge.net/projects/glfw/files/glfw/3.0.4/glfw-3.0.4.bin.WIN32.zip and unzip the package.
  3. Copy all the extracted content inside the glfw-3.0.4.bin.WIN32 folder (for example, include lib-msvc2012) into the C:/Program Files (x86)/glfw-3.0.4 directory. Grant permissions when prompted.
  4. Rename the lib-msvc2012 folder to lib inside the C:/Program Files (x86)/glfw-3.0.4 directory. Grant permissions when prompted.

Alternatively, to compile the source files directly, follow these procedures:

  1. Download the source package from http://sourceforge.net/projects/glfw/files/glfw/3.0.4/glfw-3.0.4.zip and unzip the package on the desktop. Create a new folder called build inside the extracted glfw-3.0.4 folder to store the binaries.and open cmake-gui.
  2. Select glfw-3.0.4 (from the desktop) as the source directory and glfw-3.0.4/build as the build directory. The screenshot is shown as follows:
    How to do it...
  3. Click on Generate and select Visual Studio 12 2013 in the prompt.
    How to do it...
  4. Click on Generate again.
    How to do it...
  5. Open the build directory and double-click on GLFW.sln to open Visual Studio.
  6. In Visual Studio, click Build Solution (press F7).
  7. Copy build/src/Debug/glfw3.lib to C:/Program Files (x86)/glfw-3.0.4/lib.
  8. Copy the include directory (inside glfw-3.0.4/include) to C:/Program Files (x86)/glfw-3.0.4/.

After this step, we should have the include (glfw3.h) and library (glfw3.lib) files inside the C:/Program Files (x86)/glfw-3.0.4 directory, as shown in the setup procedure using precompiled binaries.

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 €18.99/month. Cancel anytime