【GLSL Notes】
API of shader:
glCreateShader(), glShaderSource(), glCompileShader(), glGetShadrInfoLog(), glCreateProgram()
API of porgram:
glCreateProgram(), glAttachShader(), glDetashShader(), glLinkProgarm(), glGetProgarmInfoLog(), glUseProgram()
Resource Release:
glDeleteShader(), glDeleteProgram(), glIsProgram(), glIsShader(), glValidateProgram()
【类型限定符】
attribute, varying, uniform
glGetAttribLocation(), glBindAttribLocation(), glGetUniformLocation(), glVertexAttrib(), glVertexAtrribPointer()
【注意要点】
gl_position必须由顶点着色器更新,GL将会对此值进行插值,然后传递给片断着色器。
【OpenGLES】
OpenGL ES 3.0 is new in iOS 7 and adds a number of new features, including:
- Multiple render targets and transform feedback to enable deferred rendering and other graphics algorithms previously only available in desktop OpenGL
- OpenGL Shading Language ES 3.0 and integer textures, buffers and operations to enable general-purpose GPU computing
- New texture, buffer, and attribute formats for optimizing memory footprint and bandwidth