Hello everyone !
I am developping a 3D application with OpenGL ES by adapting
some OpenGL code to OpenGL ES.
Since these two functions doesn’t exist on ES, i tried to
recode them but in vain…
Here’s how it goes :
OpenGL code :
glBegin(GL_TRIANGLES);
glNormal3fv(some_normal);
for (int i = 0; i < 3; ++i)
{
glNormal3fv(another_normal);
glVertex3fv(some_mesh);
}
glEnd();…
Here’s my code :
I tried to do like this (assuming the necessited states are active…)
void my_glnormal3fv(float *v)
{
glNormal3f(v[0], v[1], v[2]);
}
void my_glvertex3fv(float *v)
{
glVertexPointer(3, GL_FLOAT, 0, v);
glDrawArrays(GL_TRIANGLE, 0, 3);
}
I get odd drawing (but almost the same as the original code,
but some vertices are just not good)
Do you have a better solution ?
Thanks in advance.
PS : Sorry for the bad english, i’m french