Mailing Lists: Apple Mailing Lists

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

Possible glDrawElements Bug



OS 10.3.8, G4 450, 1 Gig, ATI Radeon 8500

If I use this code:

glDrawElements(GL_TRIANGLES,(mdl->ntrig*3),GL_UNSIGNED_INT,mdl- >gl_element_list);

I get funky, changing results. But if I replace the single line with this code:

	unsigned int *el;

	el=mdl->gl_element_list;
	
	glBegin(GL_TRIANGLES);
	
	for (i=0;i!=mdl->ntrig;i++) {
		glArrayElement(*el++);
		glArrayElement(*el++);
		glArrayElement(*el++);
	}
	
	glEnd();

Am I just doing something stupid? If I send the elements one by one, it works right. If I send them in a group, they are corrupted. Is this a known problem?

[>] Brian

_______________________________________________
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.