O'Reilly logo

OpenCL in Action: How to Accelerate Graphics and Computation by Matthew Scarpino

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix B. Real-time rendering with OpenGL

The names resemble each other, but OpenCL and OpenGL serve very different purposes. While OpenCL is used for general computation, OpenGL (Open Graphics Language) is concerned with rendering 3-D graphics. By rendering, I mean that OpenGL accepts a model composed of three-dimensional figures and produces a two-dimensional array of pixels that can be drawn in a window. This rendering executes in a loop, and if the properties of the figures change, the renderer will update the drawing. Figure B.1 provides an example of a static rendering.

Figure B.1. A simple OpenGL rendering

All the pixels in this figure ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required