OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.3 (8th Edition)

OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.3 (8th Edition)

Dave Shreiner

Language: English

Pages: 984

ISBN: 0321773039

Format: PDF / Kindle (mobi) / ePub


Includes Complete Coverage of the OpenGL® Shading Language!

 

Today’s OpenGL software interface enables programmers to produce extraordinarily high-quality computer-generated images and interactive applications using 2D and 3D objects, color images, and programmable shaders.

 

OpenGL® Programming Guide: The Official Guide to Learning OpenGL®, Version 4.3, Eighth Edition, has been almost completely rewritten and provides definitive, comprehensive information on OpenGL and the OpenGL Shading Language. This edition of the best-selling “Red Book” describes the features through OpenGL version 4.3. It also includes updated information and techniques formerly covered in OpenGL® Shading Language (the “Orange Book”).

 

For the first time, this guide completely integrates shader techniques, alongside classic, functioncentric techniques. Extensive new text and code are presented, demonstrating the latest in OpenGL programming techniques.

 

OpenGL® Programming Guide, Eighth Edition, provides clear explanations of OpenGL functionality and techniques, including processing geometric objects with vertex, tessellation, and geometry shaders using geometric transformations and viewing matrices; working with pixels and texture maps through fragment shaders; and advanced data techniques using framebuffer objects and compute shaders.

 

New OpenGL features covered in this edition include

  • Best practices and sample code for taking full advantage of shaders and the entire shading pipeline (including geometry and tessellation shaders)
  • Integration of general computation into the rendering pipeline via compute shaders
  • Techniques for binding multiple shader programs at once during application execution
  • Latest GLSL features for doing advanced shading techniques
  • Additional new techniques for optimizing graphics program performance

Algorithmic Game Theory

Software Architecture: A Comprehensive Framework and Guide for Practitioners

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

........................................................................................2 Your First Look at an OpenGL Program........................................................3 OpenGL Syntax . ...........................................................................................8 OpenGL’s Rendering Pipeline. ................................................................... 10 Preparing to Send Data to OpenGL . ...................................................... 11 Sending Data to

........................................................................... 170 Dithering .................................................................................................. 171 Logical Operations . ................................................................................. 171 Occlusion Query . ..................................................................................... 173 Conditional Rendering .

238 Transform Feedback . ............................................................................... 239 Transform Feedback Objects ................................................................ 239 Transform Feedback Buffers. ................................................................ 241 Configuring Transform Feedback Varyings . ........................................ 244 Starting and Stopping Transform Feedback . ....................................... 250 Transform Feedback

vertex data efficiently. OpenGL Graphics Primitives OpenGL includes support for many primitive types. Eventually they all get rendered as one of three types---points, lines, or triangles. Line and triangle types can be combined together to form strips, loops (for lines), and fans (for triangles). Points, lines, and triangles are the native primitive types supported by most graphics hardware.1 Other primitive types are supported by OpenGL, including patches, which are used as inputs to the

Without primitive restart, we need to call two draw commands glDrawElements(GL_TRIANGLE_STRIP, 8, GL_UNSIGNED_SHORT, NULL); glDrawElements(GL_TRIANGLE_STRIP, 8, GL_UNSIGNED_SHORT, (const GLvoid *)(9 * sizeof(GLushort))); #endif Note: OpenGL will restart primitives whenever it comes across the current restart index in the element array buffer. Therefore, it’s a good idea to set the restart index to a value that will not be used in your code. The default restart index is zero, which is very likely

Download sample

Download