PDA

View Full Version : Drawing 2D rectangle w/ unique fill



Papaya King
04-18-2005, 06:23 AM
Howdy Folks,

I'm somewhat new to OpenGL, so apologies if this is just downright simple. I need to draw a 2D rectangle that is filled with diagonal lines. The kicker is that the diagonal lines must alternate color: red, white, red, white, etc.

Now, I could certainly draw this using a brute force method but I was hoping there might be a more efficient way: perhaps defining a texture for the red and white lines or even a stipple mask? Can anyone tell me if either of those is a good idea? Or, any other good ideas to solve this problem efficiently?

Thanks much.

dorbie
04-18-2005, 07:27 AM
Why would you post this to the advanced forum?

Please go and repost it to the beginners section.