Book description
Gain proficiency with OpenGL and build compelling graphics for your games and applications
About This Book
Get to grips with a wide range of techniques for implementing shadows using shadow maps, shadow volumes, and more
Explore interactive, real-time visualizations of large 2D and 3D datasets or models, including the use of more advanced techniques such as stereoscopic 3D rendering
Create stunning visuals on the latest platforms including mobile phones and state-of-the-art wearable computing devices
Who This Book Is For
The course is appropriate for anyone who wants to develop the skills and techniques essential for working with OpenGL to develop compelling 2D and 3D graphics.
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
In Detail
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
Style and approach
Full of easy-to-follow hands-on tutorials, this course teaches you to develop a wide range of impressive OpenGL-based applications in a step-by-step format.
Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.
Table of contents
-
OpenGL – Build high performance graphics
- Table of Contents
- OpenGL – Build high performance graphics
- OpenGL – Build high performance graphics
- Credits
- Preface
-
1. Module 1
-
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
-
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
-
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
-
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
- 5. Mesh Model Formats and Particle Systems
-
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
-
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
-
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
-
1. Introduction to Modern OpenGL
-
2. Module 2
-
1. 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
-
2. 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
- 3. Lighting, Shading, and Optimization
- 4. Using Textures
- 5. Image Processing and Screen Space Techniques
- 6. Using Geometry and Tessellation Shaders
- 7. Shadows
- 8. Using Noise in Shaders
- 9. Particle Systems and Animation
- 10. Using Compute Shaders
-
1. Getting Started with GLSL
-
3. Module 3
-
1. 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
- 2. OpenGL Primitives and 2D Data Visualization
- 3. Interactive 3D Data Visualization
-
4. 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
- 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
- A. Bibliography
-
1. Getting Started with OpenGL
- Index
Product information
- Title: OpenGL – Build high performance graphics
- Author(s):
- Release date: May 2017
- Publisher(s): Packt Publishing
- ISBN: 9781788296724
You might also like
book
Advanced Graphics Programming Using OpenGL
Today truly useful and interactive graphics are available on affordable computers. While hardware progress has been …
book
OpenGL Game Development By Example
Design and code your own 2D and 3D games efficiently using OpenGL and C++ About This …
book
OpenGL ES 3.0 Programming Guide, Second Edition
OpenGL® ES™ is the industry's leading software interface and graphics library for rendering sophisticated 3D graphics …
book
Real-Time 3D Rendering with DirectX® and HLSL: A Practical Guide to Graphics Programming
Get Started Quickly with DirectX 3D Programming: No 3D Experience Needed This step-by-step text demystifies modern …