Skip to main content
gamedev.net
🔒 Locked

Texturing a line

Started by daniel_i_l 3 replies 750+ views
Original Post
daniel_i_l
daniel_i_l
for bullets in my game I'm using little lines with thickness of about two. Is there any way I could put a picture of a bullet on them? Thanks.
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the internet, we know this is not true." -- Professor Robert Silensky
Morpheus011
Morpheus011
you could, but it probably won't look right. Why not just use textured quads? Easy to implement, and it's probably your best bet.
zedzeek
zedzeek
GL_LINES as well as GL_POINT will be tetxured with current texture + current texturecoord (if texturing is enabled etc)
though as Morpheus011 saiz youre prolly best off with a strechted quad


RuneLancer
RuneLancer
Regardless, doesn't a line use the bounded texture as a 1D texture when rendered?

Use a quad. Fussing over the performance of sending two more vertices to the graphic card per bullet would be ridiculous unless you literally have millions of bullets at once. ;)
medevilenemy
medevilenemy
It wont really matter what method you use if the rendering will only be a couple of pixels wide. I do, however agree that you should use a textured quad. It really isnt all that difficult to set up and they look pretty good.
There was a saying we had in college: Those who walk into the engineering building are never quite the same when they walk out.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.