2d overlay problem

I have a textured quad in my scene that covers the window. I want to be able to “draw” on this quad with the mouse. However, whenever I try to, nothing changes. What to do? All I’m doing is I have an array of unsigned bytes to represent the texture, and I’m making changes to the array on mouse down.

What you’re trying to do is not as easy as manipulating bytes according to a moving mouse…

I think the following code will be very helpfull: (little 3D painting prog)

(from: http://www.gdmag.com/code.htm )

[This message has been edited by richardve (edited 08-07-2001).]

Ah. Similar to Artisan in Maya… but not exactly what I’m looking to do. I have a textured, 2d quad setup in ortho to cover the window. So basically, I want a 2d paint program implemented in OpenGL. Can I not just change the bitmap and have it update on the next redraw?

[This message has been edited by gtada (edited 08-07-2001).]

yes keep a copy of your texture data somewhere + replace the old texture with the new (changed one) with glTexSubImage2d(…)

Originally posted by richardve:
(little 3D painting prog)

Oops, excuse me… I did not read the topic titel very well…