MaxGUI with Opengl

BlitzMax Forums/OpenGL Module/MaxGUI with Opengl

Pao Hang(Posted 2006) [#1]
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?


fredborg(Posted 2006) [#2]
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.


Pao Hang(Posted 2006) [#3]
hmm... didn't work..


skidracer(Posted 2006) [#4]
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.


Pao Hang(Posted 2006) [#5]
Ahh.. it worked... event hooks made it work.. yeah..