MaxGUI with Opengl
BlitzMax Forums/OpenGL Module/MaxGUI with Opengl
| ||
I have a working app with MaxGUI and OpenGL but there are some problems I'm hoping someone can shed some light on. I am not getting an update in the OpenGl canvas whenever I am moving a slider or press a button in MaxGUI. Is there a way to get my OpenGl canvas to update and iteract with MaxGUI in realtime.. so they will both update values with each other? |
| ||
You should be able to post an event when you want the viewport/canvas to update, something along the lines of this:PostEvent(CreateEvent(EVENT_GADGETPAINT,mycanvas))If you stick that after you have gotten the values you need from sliders and such, it should force the canvas to be redrawn. |
| ||
hmm... didn't work.. |
| ||
Unfortunately sliders are modal in Windows so you need to use event hooks to have your program react to slider events (a standard eventloop will hang until the user releases the button). See the file in tutorials section of the help called MaxGUI overview for a better explanation. |
| ||
Ahh.. it worked... event hooks made it work.. yeah.. |