Appendix C. Shading Language Grammar

This appendix describes the shading language grammar. The shading language grammar is copyrighted by Khronos and is reprinted with permission. The latest OpenGL ES 2.0 specification can be downloaded at www.khronos.org/opengles/2_X/.

The grammar is fed from the output of lexical analysis. The tokens returned from lexical analysis are

image

The following describes the grammar for the OpenGL ES Shading Language in terms of the above tokens.

image

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.