opengles3-book icon indicating copy to clipboard operation
opengles3-book copied to clipboard

error: kindle edition: location: ~1970

Open unsmashable opened this issue 10 years ago • 1 comments

Once you have a program object created, the next step is to attach shaders to it. In OpenGL ES 3.0, each program object needs to have one vertex shader and one fragment shader object attached to it. To attach shaders to a program, you use glAttachShader.

WRONG IMAGE INSERTED HERE Image is for glDetachShader instead for glAttachShader

This function attaches the shader to the given program. Note that a shader can be attached at any point— it does not necessarily need to be compiled or even have source code before being attached to a program. The only requirement is that every program object must have one and only one vertex shader and fragment shader object attached to it. In addition to attaching shaders, you can detach shaders using glDetachShader. Once the shaders have been attached (and the shaders have been successfully compiled), we are finally ready to link the shaders together. Linking a program object is accomplished using glLinkProgram.

Ginsburg, Dan; Purnomo, Budirijanto; Shreiner, Dave; Munshi, Aaftab (2014-02-28). OpenGL ES 3.0 Programming Guide (2nd Edition) (Kindle Locations 1973-1982). Pearson Education. Kindle Edition.

unsmashable avatar Apr 02 '14 04:04 unsmashable

Thanks, I will report this issue to the publisher. This is correct in the print edition so I will notify them of the issue in the Kindle edition so it can be fixed.

danginsburg avatar Apr 02 '14 20:04 danginsburg