[Iup-users] glcanvas callbacks

Merick Merick_TeVaran at comcast.net
Fri Dec 7 23:41:00 GMT+3 2007


I'm working on a program that uses an IupGLCanvas. I've got my code to 
draw the scene setup in a redraw function which is assigned to the 
action callback with IupSetCallback. I've also made a menu option that 
will load an image into an ogl texture, at the same time as it loads the 
image it also sets a global flag to tell redraw function that it can now 
run the code to actually draw the image. At first I thought that I was 
loading the image wrong because it wasn't being drawn, but after some 
testing I realized that the redraw function was only being called once 
when the program started, and because of that although the image was 
being loaded correctly the window wasn't being updated. I also found 
that the function would be called when the window is resized. Is there a 
way to make the action cb run continuously without needing to resize the 
window, or otherwise needing any type of user input?



More information about the iup-users mailing list