Drawing 2D rectangle w/ unique fill

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.

Why would you post this to the advanced forum?

Please go and repost it to the beginners section.