I am looking at the Textured Box demo https://cvs.khronos.org/svn/repos/regis … itBox.html listed on http://khronos.org/webgl/wiki/Demo_Repository
I’d like to add a white square without texture to this demo so it will have 1 textured object (the original demo) and 1 object without texture.
The demo has the following code to texture the cube
<script id="fshader" type="x-shader/x-fragment">
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D sampler2d;
varying float v_Dot;
varying vec2 v_texCoord;
void main()
{
vec2 texCoord = vec2(v_texCoord.s, 1.0 - v_texCoord.t);
vec4 color = texture2D(sampler2d, texCoord);
color += vec4(0.1, 0.1, 0.1, 1);
gl_FragColor = vec4(color.xyz * v_Dot, color.a);
}
</script>
What do I need to do to draw the white square without texture?
Thanks in advance for your help.