Jump to content
  • Advertisement
Sign in to follow this  

OpenGL Texture Arbitrary Shapes

This topic is 3529 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I'm using SDL+OpenGL but I don't really consider this question specific to either APIs. so I'm hoping this is the right place. Right now I'm drawing something along the lines of: (whipped up in paint). Free Image Hosting at www.ImageShack.us I store the scanlines for each region since I use them for hit testing, and since primitive reuse ftw(or ftl?), the way I'm drawing is basically iterating through the scanlines ala
for a in scanline
    glVertex2d(scanline[a].l, scanline[a].y)
    glVertex2d(scanline[a].r, scanline[a].y)

What I'd like to be able to do is texture an entire shape, say terrain features, or whatever, something along the lines of Free Image Hosting at www.ImageShack.us My questions are: 1.) Is texturing in such a manner possible using this method? a.) If yes, any ideas on how? b.) If no, any other methods?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!