-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

OpenGL Data Visualization Cookbook

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.
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.
To use the precompiled binary package for GLFW, follow these steps:
C:/Program Files (x86)/glfw-3.0.4
directory. Grant the necessary permissions when prompted.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.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.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:
build
inside the extracted glfw-3.0.4
folder to store the binaries.and open cmake-gui
.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:build
directory and double-click on GLFW.sln to open Visual Studio.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.
Change the font size
Change margin width
Change background colour