YassminAbdallah / iphonewavefrontloader

Automatically exported from code.google.com/p/iphonewavefrontloader
0 stars 0 forks source link

glEnableClientState(GL_TEXTURE) causes GL_INVALID_ENUM #8

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set Breakpoint on line 88 of OpenGLWaveFrontmatrial.m
2. Put "error = glGetError();" above and below line 88
3. if after the call to line 88:
   glEnableClientState(GL_TEXTURE);
error will be GL_INVALID_ENUM

What is the expected output? 
error should be 0

What do you see instead?
error is GL_INVALID_ENUM

What version of the product are you using? 
May 13, 2009

On what operating system?
OS X 10.5

Please provide any additional information below.

Line 88 says:

   glEnableClientState(GL_TEXTURE);

but glEnableClientState does not take GL_TEXTURE as a parameter. Should it
be GL_TEXTURE_COORD_ARRAY, or is GL_TEXTURE correct but the call is not?
Maybe the call should be glMatrixMode( GL_TEXTURE );

so, in the section in question we are loading the PVRT file. But we are no
where near putting the texture info into a coordinate array. It looks like
that happens at line 124... 

Original issue reported on code.google.com by rnis...@gmail.com on 15 May 2009 at 5:17

GoogleCodeExporter commented 9 years ago
I'm fairly confident that the parameter should be GL_TEXTURE_COORD_ARRAY, as the
texture array is filled up at line 124.

Original comment by rnis...@gmail.com on 15 May 2009 at 5:24