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 ...
Get OpenCL in Action now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.