-
Senior Member
OpenGL Guru
Re: invalid operation after glUseProgram
>>and sizeof(vertexarray)=4. because vertexarray is a pointer.<<
Ok, I was mislead on the array thing because of the new float[] allocation. Would still be fatal under 64-bit where the pointer size is 8 bytes.
-
Re: invalid operation after glUseProgram
Thank you! I traced my program.
float *VertexArray=new float[ 1310]
glBufferData(GL_ARRAY_BUFFER, 5240,VertexArray, GL_STATIC_DRAW);
glDrawArrays(GL_TRIANGLE_FAN,0,655)
Maybe it's not because the length of arrays.
I tried vertex at a time,still,when it came to glEnd ,invalid operation.I'm so confused. Maybe it's because of glcalllist above.
-
Re: invalid operation after glUseProgram
I seemed to understand what's wrong,but I don't know how to solve the problem.I found my codes are in the display list, the display list is an invalid operation ,So whatever I draw would be wrong
-
Re: invalid operation after glUseProgram
Thank you, Relic! Finally find my problem, before drawing something ,I should give the uniforms.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules