This is an OpenGL ES issue, but I'm fairly sure that the ES versions that offer glVertexAttribPointer are not the same ones that offer glColor. Or, to put it another way, OpenGL ES 2.0 does not have glColor, glVertexPointer, and so forth. They're gone. Similarly, OpenGL ES 1.1 doesn't have glVertexAttribPointer, because it doesn't have shaders (and only shaders can use generic attributes).

You've somehow mixed two different versions of OpenGL ES. You shouldn't do that.

How to draw a rectangular using Opengl

Originally Posted by Alfonse Reinheart

This is an OpenGL ES issue, but I'm fairly sure that the ES versions that offer glVertexAttribPointer are not the same ones that offer glColor. Or, to put it another way, OpenGL ES 2.0 does not have glColor, glVertexPointer, and so forth. They're gone. Similarly, OpenGL ES 1.1 doesn't have glVertexAttribPointer, because it doesn't have shaders (and only shaders can use generic attributes).

You've somehow mixed two different versions of OpenGL ES. You shouldn't do that.

Thanks, So can you help me giving some code how to draw a rectangular using OPENGL1, and also OPENGL2.0. Thanks in Advance. Have a great day.