Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Trapezoids and textures
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trapezoids and textures



Is there any way to get around this rendering artifact in GL?
When I draw a quad that is a trapezoid and place a texture on it the
texture gets minified in strange ways.
Apparently the GL pipeline is breaking up the trapezoid into triangles
and then reapplying the texture.
This looks really bad. Is this there a way around this?
here is what it looks like....
http://viz.tamu.edu/students/mistrot/GL/trapezoid_artifact.jpg

Here is how I am drawing the Quad
when topright or topleft are less <-1 and >1 respectively you get the
artifact....
parallelograms don't seem to have this problem.

glBindTexture(GL_TEXTURE_2D, texName[0]);
glBegin(GL_QUADS);
glTexCoord2f(0.0, 0.0); glVertex3f(-1.0, -1.0, 0.0);
glTexCoord2f(0.0, 1.0); glVertex3f(topleft, 01.0, 0.0);
glTexCoord2f(1.0, 1.0); glVertex3f(topright, 01.0, 0.0);
glTexCoord2f(1.0, 0.0); glVertex3f(1.0, -1.0, 0.0);
glEnd();
_______________________________________________
mac-opengl mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/mac-opengl
Do not post admin requests to the list. They will be ignored.



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.