Chapter 4. Shaders and Programs
In Chapter 2, “Hello, Triangle: An OpenGL ES 2.0 Example,” we introduced you to a simple program that draws a single triangle. In that example, we created two shader objects (one for the vertex shader and one for the fragment shader) and a single program object to render the triangle. Shader objects and program objects are fundamental concepts in working with shaders in OpenGL ES 2.0. In this chapter, we introduce you to the full details on how to create shaders, compile them, and link them together into a program object. The details of writing vertex and fragment shaders come later in the book. For now, we focus on:
- Shader and program object overview.
- Creating and compiling a shader.
- Creating and linking a program. ...
Get OpenGL® ES 2.0 Programming Guide 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.