In OpenGL ES 1, I have a function like the following for setting up the coordinates of an image:
glTexCoordPointer(2, GL_FLOAT, 0, coordinates);
What is the equivalent to this in OpenGL ES 2.0?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As far as I know, all the fixed-function attributes (like vertex, normal, texcoords, …) have been removed in GLES 2.0. You have to implement your own vertex shader, that accepts the texture coordinates as a custom vertex attribute (whose data is specified by
glVertexAttribPointer, like for every other vertex attribute) and which delegates the texture coordinates to your own fragment shader, that implements the texture access. If this all sounds alien to you, you might want to delve a bit deeper into GLSL shaders.