Mailing Lists: Apple Mailing Lists

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

Simple GL_QUADS plane will not render in OS X.



Hi,

Thanks for the quick responses to my previous question. I actually have another question already!

Consider the following code excerpt::

----------
glColor3d(1.0, 1.0, 1.0);
glBegin(GL_QUADS);
	glVertex3d(-100.0, -10.0, 100.0);
	glVertex3d(100.0, -10.0, 100.0);
	glVertex3d(100.0, -10.0, -100.0);
	glVertex3d(-100.0, -10.0, -100.0);
glEnd();
----------

This piece of code is intended to draw a white 200x200 plane, 10 units below the origin. Strangely, it quite simply is not drawn on the screen at all, even with the appropriate glTranslate and glRotate calls in place.

However, the same exact code DOES run properly on my friend's Windows machine; the white plane is indeed rendered as it should be. So again, I seem to be encountering a problem where OpenGL is more "strict" in OS X than in Windows. Alas-- I do not know what I am doing wrong!

Even stranger is the fact that a simple call to glutSolidCube() causes a solid white cube to be drawn on the screen, and I am able to translate my modelview appropriately to simulate the camera moving around the cube. So why won't the above GL_QUADS plane render properly in OS X?

Any help would be appreciated. Thanks for reading!

--JT
http://zhaymusic.com/
_______________________________________________
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.