ae95ab0c43
A color can be specified to render the geometry of the VBO. For legacy painting glColor is used, for shader a uniform is set. In order to allow rendering without texcoords, it is possible to pass a null pointer as texcoords. Shader added to scene which just renders a colored geometry without texturing.
11 lines
166 B
GLSL
11 lines
166 B
GLSL
#ifdef GL_ES
|
|
precision highp float;
|
|
#endif
|
|
uniform vec4 geometryColor;
|
|
|
|
// not used
|
|
varying vec2 varyingTexCoords;
|
|
|
|
void main() {
|
|
gl_FragColor = geometryColor;
|
|
}
|