You are previewing OpenGL Development Cookbook.
O'Reilly logo
OpenGL Development Cookbook

Book Description

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.

  • 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

  • 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.

    Table of Contents

    1. OpenGL Development Cookbook
      1. Table of Contents
      2. OpenGL Development Cookbook
      3. Credits
      4. About the Author
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Downloading the color images of this book
          3. Errata
          4. Piracy
          5. Questions
      8. 1. Introduction to Modern OpenGL
        1. Introduction
        2. Setting up the OpenGL v3.3 core profile on Visual Studio 2010 using the GLEW and freeglut libraries
          1. How to do it...
          2. There's more…
        3. Designing a GLSL shader class
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        4. Rendering a simple colored triangle using shaders
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Doing a ripple mesh deformer using the vertex shader
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more
        6. Dynamically subdividing a plane using the geometry shader
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        7. Dynamically subdividing a plane using the geometry shader with instanced rendering
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        8. Drawing a 2D image in a window using the fragment shader and the SOIL image loading library
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
      9. 2. 3D Viewing and Object Picking
        1. Introduction
        2. Implementing a vector-based camera with FPS style input support
          1. Getting ready
          2. How to do it…
          3. There's more…
          4. See also
        3. Implementing the free camera
          1. Getting ready
          2. How to do it…
          3. There's more…
          4. See also
        4. Implementing the target camera
          1. Getting ready
          2. How to do it…
          3. There's more…
          4. See also
        5. Implementing view frustum culling
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        6. Implementing object picking using the depth buffer
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        7. Implementing object picking using color
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        8. Implementing object picking using scene intersection queries
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
      10. 3. Offscreen Rendering and Environment Mapping
        1. Introduction
        2. Implementing the twirl filter using the fragment shader
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more...
        3. Rendering a skybox using static cube mapping
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        4. Implementing a mirror with render-to-texture using FBO
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Rendering a reflective object using dynamic cube mapping
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        6. Implementing area filtering (sharpening/blurring/embossing) on an image using convolution
          1. Getting ready
          2. How to do it…
          3. How it works...
          4. There's more…
          5. See also
        7. Implementing the glow effect
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
      11. 4. Lights and Shadows
        1. Introduction
        2. Implementing per-vertex and per-fragment point lighting
          1. Getting started
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Implementing per-fragment directional light
          1. Getting started
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Implementing per-fragment point light with attenuation
          1. Getting started
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Implementing per-fragment spot light
          1. Getting started
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        6. Implementing shadow mapping with FBO
          1. Getting started
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        7. Implemeting shadow mapping with percentage closer filtering (PCF)
          1. Getting started
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        8. Implementing variance shadow mapping
          1. Getting started
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
      12. 5. Mesh Model Formats and Particle Systems
        1. Introduction
        2. Implementing terrains using the height map
          1. Getting started
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Implementing 3ds model loading using separate buffers
          1. Getting started
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Implementing OBJ model loading using interleaved buffers
          1. Getting started
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Implementing EZMesh model loading
          1. Getting started
          2. How to do it...
          3. How it works…
          4. There's more…
          5. See also
        6. Implementing simple particle system
          1. Getting started
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
      13. 6. GPU-based Alpha Blending and Global Illumination
        1. Introduction
        2. Implementing order-independent transparency using front-to-back peeling
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Implementing order-independent transparency using dual depth peeling
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Implementing screen space ambient occlusion (SSAO)
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Implementing global illumination using spherical harmonics lighting
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        6. Implementing GPU-based ray tracing
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        7. Implementing GPU-based path tracing
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
      14. 7. GPU-based Volume Rendering Techniques
        1. Introduction
        2. Implementing volume rendering using 3D texture slicing
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Implementing volume rendering using single-pass GPU ray casting
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Implementing pseudo-isosurface rendering in single-pass GPU ray casting
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Implementing volume rendering using splatting
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        6. Implementing transfer function for volume classification
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        7. Implementing polygonal isosurface extraction using the Marching Tetrahedra algorithm
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        8. Implementing volumetric lighting using the half-angle slicing
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
      15. 8. Skeletal and Physically-based Simulation on the GPU
        1. Introduction
        2. Implementing skeletal animation using matrix palette skinning
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Implementing skeletal animation using dual quaternion skinning
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Modeling cloth using transform feedback
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Implementing collision detection and response on a transform feedback-based cloth model
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        6. Implementing a particle system using transform feedback
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
      16. Index