Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problems using GL_C4UB_V3F with glInterleavedArrays



Hello,
 
I'm getting strange behavior when I try to use the following code:
 
glInterleavedArrays(GL_C4UB_V3F, 0, verticesPtr);
glDrawElements(GL_TRIANGLES, indexCount, GL_UNSIGNED_SHORT, indicesPtr);
 
I get a jumbled mess drawn on the screen.  Stepping through my code, I can see that verticesPtr has the correct values that I expect; each vertex's data is represented by 4 unsigned byte values representing RGBA, followed by 3 floats representing xyz.
 
If I follow the call to glInterleavedArrays with the following:
 
glDisableClientState(GL_COLOR_ARRAY);
glColor4ub(255, 0, 0, 255);
 
then I correctly get a red version of my data drawn.  So it seems like the colors in the interleaved array are causing the problem.
 
Furthermore, the exact same code works correctly on WinXP's opengl implementation.
 
Has anyone tried to use this functionality on the Mac before?
 
Thanks,
-Cindy
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.