View Full Version : texture mapping onto a line?

04-22-2009, 11:36 AM
hi, i am very new to opengl, but i am trying to put a very abstractly-shaped image (a feather to be exact) onto a line. is it possible to map the center of the feather image to the coordinates of a line and have the parts of the image that dont lie on the line still show up?

is this achievable by using triangles or rectangles instead of a line?

when i try it, it just maps the part of the image that is contained in the lines dimensions, but i would like the entire image to show up without having to define every single vertex in the feather.

thanks a lot guys

04-22-2009, 01:11 PM
no, you have to use triangles or rectangles since you also need to define the width of the thing, including the texturecoordinates.

04-22-2009, 01:52 PM
well using a rectangle wont get me what i want either because it will stretch the feather in weird ways. do i really need to define tons of points in opengl to map corresponding points of the image to?

04-22-2009, 01:53 PM
here is my feather. its going to be repeated a ton of times on the back of a peacock.


04-22-2009, 01:56 PM
with lines:

and with triangles:


04-22-2009, 02:05 PM
Use alpha textures and map it on simple quad or more complicated shape to respect the feather curvature.

04-22-2009, 09:08 PM
alpha textures? like, opacity?

04-23-2009, 04:33 AM