Mailing Lists: Apple Mailing Lists

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

Re: Is there a way to get OpenGL to do linear texture-mapping?



No, that doesn't make a difference. I don't think that most modern OpenGL implementations would benefit performance-wise from affine texture-mapping, since it's all in hardware.
Using glTexGen with GL_EYE_LINEAR should probably use linear texture-mapping i guess. I cannot use that, however, since I'm using a vertex shader and can't use the TexGen stuff that way. But it should be possible somehow.. Maybe by manipulating the projection and/or texture matrix?


jonas

On Mar 30, 2005, at 12:16 PM, Dario Accornero wrote:

On 30 Mar 2005, at 10:38, jonas echterhoff wrote:

I'm looking for a way to get OpenGL to draw a texture with linear/affine mapping and not perspective correct. The reason is that i want to render a reflection of a part of my scene. This reflection is rendered to a texture, so it is already perspective correct. If I render this reflection texture using perspective-correct texture mapping it will end up looking distorted.

Assuming this is fixed-function, I'm not sure there's a way to *force* affine mapping, but... have you tried glHint(GL_PERSPECTIVE_CORRECTION_HINT,GL_FASTEST) right after glBindTexture? GL_FASTEST should in theory give you affine mapping, whereas GL_NICEST should always give you perspective mapping, but as you can see it's just a glHint, not a requirement...


HTH,
Dario


_______________________________________________ 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
References: 
 >Is there a way to get OpenGL to do linear texture-mapping? (From: jonas echterhoff <email@hidden>)
 >Re: Is there a way to get OpenGL to do linear texture-mapping? (From: Dario Accornero <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.