View Full Version : Texture map only part of a polygon
Is there a way to apply a texture map to only part of a polygon? For example, I have some quadrilateral of irregular shape. I want to texture a rectangle onto it in just one place, without distorting the texture at all. I could probably create another quad that's the same size as the texture, and then try to line it up with the original polygon, but it seems like sort of a kluge solution.
04-13-2003, 05:27 PM
There is no way in opengl to texture map only part of a polygon. One alternative is, like you said, to use a seperate polygon for the part you need texture mapped.
04-14-2003, 04:45 AM
I thought I remember someone discussing a way to do this awhile ago.
Anyway, I believe it could be done by using the appropriate texture coordinates with non-repeating textures, and having an alpha around the border to remove with alpha blending or an alpha test.
04-14-2003, 06:46 AM
Yes, me for example, almost three years ago. http://www.opengl.org/discussion_boards/ubb/wink.gif http://www.opengl.org/discussion_boards/ubb/Forum3/HTML/000710.html
I went with the GL_CLAMP option...always seemed like kind of a stupid setting until now.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.