Im facing problems in changing this code to openGL ES.
glBegin(GL_QUADS);
{
glColor4fv(c0);
glTexCoord2f(s0, t1); glVertex2i(x, y);
glTexCoord2f(s1, t1); glVertex2i(x + w, y);
glColor4fv(c1);
glTexCoord2f(s1, t0); glVertex2i(x + w, y + h);
glTexCoord2f(s0, t0); glVertex2i(x, y + h);
}
glEnd();
c0,c1(pointers) are passed through function…
This is my code in openGL ES:-
GLfloat ColorVertices[]= {(c0+1),(c0+2),(c0+3),
(c0+1),(c0+2),(c0+3),
(c1+1),(c1+2),(c1+3),
(c1+1),(c1+2),(c1+3)};
glEnableClientState (GL_COLOR_ARRAY);
glEnableClientState (GL_TEXTURE_COORD_ARRAY);
glEnableClientState (GL_VERTEX_ARRAY);
glColorPointer (4,GL_FLOAT,0,ColorVertices);
glTexCoordPointer (2,GL_FLOAT,0,TexVertices2);
glVertexPointer (2,GL_INT,0,QuadVertices2);
glDrawArrays (GL_TRIANGLE_FAN,0,4);
glDisableClientState (GL_COLOR_ARRAY);
glDisableClientState (GL_TEXTURE_COORD_ARRAY);
glDisableClientState (GL_VERTEX_ARRAY);
Plz help its really urgent…