OpenGL – Build high performance graphics

Gain proficiency with OpenGL and build compelling graphics for your games and applications
Preview in Mapt
Code Files

OpenGL – Build high performance graphics

Muhammad Mobeen Movania et al.

Gain proficiency with OpenGL and build compelling graphics for your games and applications
Mapt Subscription
FREE
$29.99/m after trial
eBook
$47.60
RRP $67.99
Save 29%
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$47.60
$29.99 p/m after trial
RRP $67.99
Subscription
eBook
Start 14 Day Trial

Frequently bought together


OpenGL – Build high performance graphics Book Cover
OpenGL – Build high performance graphics
$ 67.99
$ 47.60
OpenGL ES 3.0 Cookbook Book Cover
OpenGL ES 3.0 Cookbook
$ 39.99
$ 28.00
Buy 2 for $35.00
Save $72.98
Add to Cart

Book Details

ISBN 139781788296724
Paperback982 pages

Book Description

OpenGL is a fully functional, cross-platform API widely adopted across the industry for 2D and 3D graphics development. It is mainly used for game development and applications, but is equally popular in a vast variety of additional sectors. This practical course will help you gain proficiency with OpenGL and build compelling graphics for your games and applications.

OpenGL Development Cookbook – This is your go-to guide to learn graphical programming techniques and implement 3D animations with OpenGL. This straight-talking Cookbook is perfect for intermediate C++ programmers who want to exploit the full potential of OpenGL. Full of practical techniques for implementing amazing computer graphics and visualizations using OpenGL.

OpenGL 4.0 Shading Language Cookbook, Second Edition – With Version 4, the language has been further refined to provide programmers with greater power and flexibility, with new stages such as tessellation and compute. OpenGL Shading Language 4 Cookbook is a practical guide that takes you from the fundamentals of programming with modern GLSL and OpenGL, through to advanced techniques.

OpenGL Data Visualization Cookbook - This easy-to-follow, comprehensive Cookbook shows readers how to create a variety of real-time, interactive data visualization tools. Each topic is explained in a step-by-step format. A range of hot topics is included, including stereoscopic 3D rendering and data visualization on mobile/wearable platforms. By the end of this guide, you will be equipped with the essential skills to develop a wide range of impressive OpenGL-based applications for your unique data visualization needs.

This Learning Path combines some of the best that Packt has to offer in one complete, curated package. It includes content from the following Packt products, OpenGL Development Cookbook by Muhammad Mobeen Movania, OpenGL 4.0 Shading Language Cookbook, Second Edition by David Wolff, OpenGL Data Visualization Cookbook by Raymond C. H. Lo, William C. Y. Lo

Table of Contents

Chapter 1: Introduction to Modern OpenGL
Introduction
Setting up the OpenGL v3.3 core profile on Visual Studio 2010 using the GLEW and freeglut libraries
Designing a GLSL shader class
Rendering a simple colored triangle using shaders
Doing a ripple mesh deformer using the vertex shader
Dynamically subdividing a plane using the geometry shader
Dynamically subdividing a plane using the geometry shader with instanced rendering
Drawing a 2D image in a window using the fragment shader and the SOIL image loading library
Chapter 2: 3D Viewing and Object Picking
Introduction
Implementing a vector-based camera with FPS style input support
Implementing the free camera
Implementing the target camera
Implementing view frustum culling
Implementing object picking using the depth buffer
Implementing object picking using color
Implementing object picking using scene intersection queries
Chapter 3: Offscreen Rendering and Environment Mapping
Introduction
Implementing the twirl filter using the fragment shader
Rendering a skybox using static cube mapping
Implementing a mirror with render-to-texture using FBO
Rendering a reflective object using dynamic cube mapping
Implementing area filtering (sharpening/blurring/embossing) on an image using convolution
Implementing the glow effect
Chapter 4: Lights and Shadows
Introduction
Implementing per-vertex and per-fragment point lighting
Implementing per-fragment directional light
Implementing per-fragment point light with attenuation
Implementing per-fragment spot light
Implementing shadow mapping with FBO
Implemeting shadow mapping with percentage closer filtering (PCF)
Implementing variance shadow mapping
Chapter 5: Mesh Model Formats and Particle Systems
Introduction
Implementing terrains using the height map
Implementing 3ds model loading using separate buffers
Implementing OBJ model loading using interleaved buffers
Implementing EZMesh model loading
Implementing simple particle system
Chapter 6: GPU-based Alpha Blending and Global Illumination
Introduction
Implementing order-independent transparency using front-to-back peeling
Implementing order-independent transparency using dual depth peeling
Implementing screen space ambient occlusion (SSAO)
Implementing global illumination using spherical harmonics lighting
Implementing GPU-based ray tracing
Implementing GPU-based path tracing
Chapter 7: GPU-based Volume Rendering Techniques
Introduction
Implementing volume rendering using 3D texture slicing
Implementing volume rendering using single-pass GPU ray casting
Implementing pseudo-isosurface rendering in single-pass GPU ray casting
Implementing volume rendering using splatting
Implementing transfer function for volume classification
Implementing polygonal isosurface extraction using the Marching Tetrahedra algorithm
Implementing volumetric lighting using the half-angle slicing
Chapter 8: Skeletal and Physically-based Simulation on the GPU
Introduction
Implementing skeletal animation using matrix palette skinning
Implementing skeletal animation using dual quaternion skinning
Modeling cloth using transform feedback
Implementing collision detection and response on a transform feedback-based cloth model
Implementing a particle system using transform feedback
Chapter 9: Getting Started with GLSL
Introduction
Using a function loader to access the latest OpenGL functionality
Using GLM for mathematics
Determining the GLSL and OpenGL version
Compiling a shader
Linking a shader program
Sending data to a shader using vertex attributes and vertex buffer objects
Getting a list of active vertex input attributes and locations
Sending data to a shader using uniform variables
Getting a list of active uniform variables
Using uniform blocks and uniform buffer objects
Getting debug messages
Building a C++ shader program class
Chapter 10: The Basics of GLSL Shaders
Introduction
Implementing diffuse, per-vertex shading with a single point light source
Implementing per-vertex ambient, diffuse, and specular (ADS) shading
Using functions in shaders
Implementing two-sided shading
Implementing flat shading
Using subroutines to select shader functionality
Discarding fragments to create a perforated look
Chapter 11: Lighting, Shading, and Optimization
Introduction
Shading with multiple positional lights
Shading with a directional light source
Using per-fragment shading for improved realism
Using the halfway vector for improved performance
Simulating a spotlight
Creating a cartoon shading effect
Simulating fog
Configuring the depth test
Chapter 12: Using Textures
Introduction
Applying a 2D texture
Applying multiple textures
Using alpha maps to discard pixels
Using normal maps
Simulating reflection with cube maps
Simulating refraction with cube maps
Applying a projected texture
Rendering to a texture
Using sampler objects
Chapter 13: Image Processing and Screen Space Techniques
Introduction
Applying an edge detection filter
Applying a Gaussian blur filter
Implementing HDR lighting with tone mapping
Creating a bloom effect
Using gamma correction to improve image quality
Using multisample anti-aliasing
Using deferred shading
Implementing order-independent transparency
Chapter 14: Using Geometry and Tessellation Shaders
Introduction
Point sprites with the geometry shader
Drawing a wireframe on top of a shaded mesh
Drawing silhouette lines using the geometry shader
Tessellating a curve
Tessellating a 2D quad
Tessellating a 3D surface
Tessellating based on depth
Chapter 15: Shadows
Introduction
Rendering shadows with shadow maps
Anti-aliasing shadow edges with PCF
Creating soft shadow edges with random sampling
Creating shadows using shadow volumes and the geometry shader
Chapter 16: Using Noise in Shaders
Introduction
Creating a noise texture using GLM
Creating a seamless noise texture
Creating a cloud-like effect
Creating a wood-grain effect
Creating a disintegration effect
Creating a paint-spatter effect
Creating a night-vision effect
Chapter 17: Particle Systems and Animation
Introduction
Animating a surface with vertex displacement
Creating a particle fountain
Creating a particle system using transform feedback
Creating a particle system using instanced particles
Simulating fire with particles
Simulating smoke with particles
Chapter 18: Using Compute Shaders
Introduction
Implementing a particle simulation with the compute shader
Using the compute shader for cloth simulation
Implementing an edge detection filter with the compute shader
Creating a fractal texture using the compute shader
Chapter 19: Getting Started with OpenGL
Introduction
Setting up a Windows-based development platform
Setting up a Mac-based development platform
Setting up a Linux-based development platform
Installing the GLFW library in Windows
Installing the GLFW library in Mac OS X and Linux
Creating your first OpenGL application with GLFW
Compiling and running your first OpenGL application in Windows
Compiling and running your first OpenGL application in Mac OS X or Linux
Chapter 20: OpenGL Primitives and 2D Data Visualization
Introduction
OpenGL primitives
Creating a 2D plot using primitives
Real-time visualization of time series
2D visualization of 3D/4D datasets
Chapter 21: Interactive 3D Data Visualization
Introduction
Setting up a virtual camera for 3D rendering
Creating a 3D plot with perspective rendering
Creating an interactive environment with GLFW
Rendering a volumetric dataset – MCML simulation
Chapter 22: Rendering 2D Images and Videos with Texture Mapping
Introduction
Getting started with modern OpenGL (3.2 or higher)
Setting up the GLEW, GLM, SOIL, and OpenCV libraries in Windows
Setting up the GLEW, GLM, SOIL, and OpenCV libraries in Mac OS X/Linux
Creating your first vertex and fragment shader using GLSL
Rendering 2D images with texture mapping
Real-time video rendering with filters
Chapter 23: Rendering of Point Cloud Data for 3D Range-sensing Cameras
Introduction
Getting started with the Microsoft Kinect (PrimeSense) 3D range-sensing camera
Capturing raw data from depth-sensing cameras
OpenGL point cloud rendering with texture mapping and overlays
Chapter 24: Rendering Stereoscopic 3D Models using OpenGL
Introduction
Installing the Open Asset Import Library (Assimp)
Loading the first 3D model in the Wavefront Object (.obj) format
Rendering 3D models with points, lines, and triangles
Stereoscopic 3D rendering
Chapter 25: An Introduction to Real-time Graphics Rendering on a Mobile Platform using OpenGL ES 3.0
Introduction
Setting up the Android SDK
Setting up the Android Native Development Kit (NDK)
Developing a basic framework to integrate the Android NDK
Creating your first Android application with OpenGL ES 3.0
Chapter 26: Interactive Real-time Data Visualization on Mobile Devices
Introduction
Visualizing real-time data from built-in Inertial Measurement Units (IMUs)
Part I – handling multi-touch interface and motion sensor inputs
Part II – interactive, real-time data visualization with mobile GPUs
Chapter 27: Augmented Reality-based Visualization on Mobile or Wearable Platforms
Introduction
Getting started I: Setting up OpenCV on Android
Getting started II: Accessing the camera live feed using OpenCV
Displaying real-time video using texture mapping
Augmented reality-based data visualization over real-world scenes

What You Will Learn

  • Off-screen rendering and environment mapping techniques to render mirrors
  • Shadow mapping techniques, including variance shadow mapping
  • Implement a particle system using shaders
  • Utilize noise in shaders
  • Make use of compute shaders for physics, animation, and general computing
  • Create interactive applications using GLFW to handle user inputs and the Android Sensor framework to detect gestures and motions on mobile devices
  • Use OpenGL primitives to plot 2-D datasets (such as time series) dynamically
  • Render complex 3D volumetric datasets with techniques such as data slicers and multiple viewpoint projection

Authors

Table of Contents

Chapter 1: Introduction to Modern OpenGL
Introduction
Setting up the OpenGL v3.3 core profile on Visual Studio 2010 using the GLEW and freeglut libraries
Designing a GLSL shader class
Rendering a simple colored triangle using shaders
Doing a ripple mesh deformer using the vertex shader
Dynamically subdividing a plane using the geometry shader
Dynamically subdividing a plane using the geometry shader with instanced rendering
Drawing a 2D image in a window using the fragment shader and the SOIL image loading library
Chapter 2: 3D Viewing and Object Picking
Introduction
Implementing a vector-based camera with FPS style input support
Implementing the free camera
Implementing the target camera
Implementing view frustum culling
Implementing object picking using the depth buffer
Implementing object picking using color
Implementing object picking using scene intersection queries
Chapter 3: Offscreen Rendering and Environment Mapping
Introduction
Implementing the twirl filter using the fragment shader
Rendering a skybox using static cube mapping
Implementing a mirror with render-to-texture using FBO
Rendering a reflective object using dynamic cube mapping
Implementing area filtering (sharpening/blurring/embossing) on an image using convolution
Implementing the glow effect
Chapter 4: Lights and Shadows
Introduction
Implementing per-vertex and per-fragment point lighting
Implementing per-fragment directional light
Implementing per-fragment point light with attenuation
Implementing per-fragment spot light
Implementing shadow mapping with FBO
Implemeting shadow mapping with percentage closer filtering (PCF)
Implementing variance shadow mapping
Chapter 5: Mesh Model Formats and Particle Systems
Introduction
Implementing terrains using the height map
Implementing 3ds model loading using separate buffers
Implementing OBJ model loading using interleaved buffers
Implementing EZMesh model loading
Implementing simple particle system
Chapter 6: GPU-based Alpha Blending and Global Illumination
Introduction
Implementing order-independent transparency using front-to-back peeling
Implementing order-independent transparency using dual depth peeling
Implementing screen space ambient occlusion (SSAO)
Implementing global illumination using spherical harmonics lighting
Implementing GPU-based ray tracing
Implementing GPU-based path tracing
Chapter 7: GPU-based Volume Rendering Techniques
Introduction
Implementing volume rendering using 3D texture slicing
Implementing volume rendering using single-pass GPU ray casting
Implementing pseudo-isosurface rendering in single-pass GPU ray casting
Implementing volume rendering using splatting
Implementing transfer function for volume classification
Implementing polygonal isosurface extraction using the Marching Tetrahedra algorithm
Implementing volumetric lighting using the half-angle slicing
Chapter 8: Skeletal and Physically-based Simulation on the GPU
Introduction
Implementing skeletal animation using matrix palette skinning
Implementing skeletal animation using dual quaternion skinning
Modeling cloth using transform feedback
Implementing collision detection and response on a transform feedback-based cloth model
Implementing a particle system using transform feedback
Chapter 9: Getting Started with GLSL
Introduction
Using a function loader to access the latest OpenGL functionality
Using GLM for mathematics
Determining the GLSL and OpenGL version
Compiling a shader
Linking a shader program
Sending data to a shader using vertex attributes and vertex buffer objects
Getting a list of active vertex input attributes and locations
Sending data to a shader using uniform variables
Getting a list of active uniform variables
Using uniform blocks and uniform buffer objects
Getting debug messages
Building a C++ shader program class
Chapter 10: The Basics of GLSL Shaders
Introduction
Implementing diffuse, per-vertex shading with a single point light source
Implementing per-vertex ambient, diffuse, and specular (ADS) shading
Using functions in shaders
Implementing two-sided shading
Implementing flat shading
Using subroutines to select shader functionality
Discarding fragments to create a perforated look
Chapter 11: Lighting, Shading, and Optimization
Introduction
Shading with multiple positional lights
Shading with a directional light source
Using per-fragment shading for improved realism
Using the halfway vector for improved performance
Simulating a spotlight
Creating a cartoon shading effect
Simulating fog
Configuring the depth test
Chapter 12: Using Textures
Introduction
Applying a 2D texture
Applying multiple textures
Using alpha maps to discard pixels
Using normal maps
Simulating reflection with cube maps
Simulating refraction with cube maps
Applying a projected texture
Rendering to a texture
Using sampler objects
Chapter 13: Image Processing and Screen Space Techniques
Introduction
Applying an edge detection filter
Applying a Gaussian blur filter
Implementing HDR lighting with tone mapping
Creating a bloom effect
Using gamma correction to improve image quality
Using multisample anti-aliasing
Using deferred shading
Implementing order-independent transparency
Chapter 14: Using Geometry and Tessellation Shaders
Introduction
Point sprites with the geometry shader
Drawing a wireframe on top of a shaded mesh
Drawing silhouette lines using the geometry shader
Tessellating a curve
Tessellating a 2D quad
Tessellating a 3D surface
Tessellating based on depth
Chapter 15: Shadows
Introduction
Rendering shadows with shadow maps
Anti-aliasing shadow edges with PCF
Creating soft shadow edges with random sampling
Creating shadows using shadow volumes and the geometry shader
Chapter 16: Using Noise in Shaders
Introduction
Creating a noise texture using GLM
Creating a seamless noise texture
Creating a cloud-like effect
Creating a wood-grain effect
Creating a disintegration effect
Creating a paint-spatter effect
Creating a night-vision effect
Chapter 17: Particle Systems and Animation
Introduction
Animating a surface with vertex displacement
Creating a particle fountain
Creating a particle system using transform feedback
Creating a particle system using instanced particles
Simulating fire with particles
Simulating smoke with particles
Chapter 18: Using Compute Shaders
Introduction
Implementing a particle simulation with the compute shader
Using the compute shader for cloth simulation
Implementing an edge detection filter with the compute shader
Creating a fractal texture using the compute shader
Chapter 19: Getting Started with OpenGL
Introduction
Setting up a Windows-based development platform
Setting up a Mac-based development platform
Setting up a Linux-based development platform
Installing the GLFW library in Windows
Installing the GLFW library in Mac OS X and Linux
Creating your first OpenGL application with GLFW
Compiling and running your first OpenGL application in Windows
Compiling and running your first OpenGL application in Mac OS X or Linux
Chapter 20: OpenGL Primitives and 2D Data Visualization
Introduction
OpenGL primitives
Creating a 2D plot using primitives
Real-time visualization of time series
2D visualization of 3D/4D datasets
Chapter 21: Interactive 3D Data Visualization
Introduction
Setting up a virtual camera for 3D rendering
Creating a 3D plot with perspective rendering
Creating an interactive environment with GLFW
Rendering a volumetric dataset – MCML simulation
Chapter 22: Rendering 2D Images and Videos with Texture Mapping
Introduction
Getting started with modern OpenGL (3.2 or higher)
Setting up the GLEW, GLM, SOIL, and OpenCV libraries in Windows
Setting up the GLEW, GLM, SOIL, and OpenCV libraries in Mac OS X/Linux
Creating your first vertex and fragment shader using GLSL
Rendering 2D images with texture mapping
Real-time video rendering with filters
Chapter 23: Rendering of Point Cloud Data for 3D Range-sensing Cameras
Introduction
Getting started with the Microsoft Kinect (PrimeSense) 3D range-sensing camera
Capturing raw data from depth-sensing cameras
OpenGL point cloud rendering with texture mapping and overlays
Chapter 24: Rendering Stereoscopic 3D Models using OpenGL
Introduction
Installing the Open Asset Import Library (Assimp)
Loading the first 3D model in the Wavefront Object (.obj) format
Rendering 3D models with points, lines, and triangles
Stereoscopic 3D rendering
Chapter 25: An Introduction to Real-time Graphics Rendering on a Mobile Platform using OpenGL ES 3.0
Introduction
Setting up the Android SDK
Setting up the Android Native Development Kit (NDK)
Developing a basic framework to integrate the Android NDK
Creating your first Android application with OpenGL ES 3.0
Chapter 26: Interactive Real-time Data Visualization on Mobile Devices
Introduction
Visualizing real-time data from built-in Inertial Measurement Units (IMUs)
Part I – handling multi-touch interface and motion sensor inputs
Part II – interactive, real-time data visualization with mobile GPUs
Chapter 27: Augmented Reality-based Visualization on Mobile or Wearable Platforms
Introduction
Getting started I: Setting up OpenCV on Android
Getting started II: Accessing the camera live feed using OpenCV
Displaying real-time video using texture mapping
Augmented reality-based data visualization over real-world scenes

Book Details

ISBN 139781788296724
Paperback982 pages
Read More

Read More Reviews

Recommended for You

OpenGL ES 3.0 Cookbook Book Cover
OpenGL ES 3.0 Cookbook
$ 39.99
$ 28.00
OpenGL Development Cookbook Book Cover
OpenGL Development Cookbook
$ 29.99
$ 21.00
OpenGL 4.0 Shading Language Cookbook Book Cover
OpenGL 4.0 Shading Language Cookbook
$ 29.99
$ 21.00
OpenCL Programming by Example Book Cover
OpenCL Programming by Example
$ 32.99
$ 23.10
Go: Design Patterns for Real-World Projects Book Cover
Go: Design Patterns for Real-World Projects
$ 71.99
$ 50.40
Introduction to JVM Languages – Clojure, Kotlin, and Groovy [Video] Book Cover
Introduction to JVM Languages – Clojure, Kotlin, and Groovy [Video]
$ 124.99
$ 106.25