OpenGL Development Cookbook

OpenGL brings an added dimension to your graphics by utilizing the remarkable power of modern GPUs. This straight-talking cookbook is perfect for intermediate C++ programmers who want to exploit the full potential of OpenGL.

OpenGL Development Cookbook

Cookbook
Muhammad Mobeen Movania

OpenGL brings an added dimension to your graphics by utilizing the remarkable power of modern GPUs. This straight-talking cookbook is perfect for intermediate C++ programmers who want to exploit the full potential of OpenGL.
$29.99
$49.99
RRP $29.99
RRP $49.99
eBook
Print + eBook
$12.99 p/month

Want this title & more? Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.
+ Collection
Free sample

Book Details

ISBN 139781849695046
Paperback326 pages

About This Book

  • Explores current graphics programming techniques including GPU-based methods from the outlook of modern OpenGL 3.3
  • Includes GPU-based volume rendering algorithms
  • Discover how to employ GPU-based path and ray tracing
  • Create 3D mesh formats and skeletal animation with GPU skinning
  • Explore graphics elements including lights and shadows in an easy to understand manner

Who This Book Is For

OpenGL Development Cookbook is geared toward intermediate OpenGL programmers to take you to the next level and create amazing OpenGL graphics in your applications.

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

What You Will Learn

  • Create an OpenGL 3.3 rendering context
  • Get to grips with camera-based viewing and object picking techniques
  • Learn off-screen rendering and environment mapping techniques to render mirrors
  • Discover shadow mapping techniques, including variance shadow mapping
  • Implement a particle system using shaders
  • Learn about GPU-based methods for global illumination using spherical harmonics and SSAO
  • Understand translucent geometry and order independent transparency using dual depth peeling
  • Explore GPU-based volumetric lighting using half angle slicing and physically based simulation on the GPU using transform feedback

In Detail

OpenGL is the leading cross-language, multi-platform API used by masses of modern games and applications in a vast array of different sectors. Developing graphics with OpenGL lets you harness the increasing power of GPUs and really take your visuals to the next level.

OpenGL Development Cookbook is your guide to graphical programming techniques to implement 3D mesh formats and skeletal animation to learn and understand OpenGL.

OpenGL Development Cookbook introduces you to the modern OpenGL. Beginning with vertex-based deformations, common mesh formats, and skeletal animation with GPU skinning, and going on to demonstrate different shader stages in the graphics pipeline. OpenGL Development Cookbook focuses on providing you with practical examples on complex topics, such as variance shadow mapping, GPU-based paths, and ray tracing. By the end you will be familiar with the latest advanced GPU-based volume rendering techniques.

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

Book Details

ISBN 139781849695046
Paperback326 pages
Read More