MakeButton and DoubleBuffer Displays

Discuss OpenGL® programming with the GL Galore plugin here

MakeButton and DoubleBuffer Displays

Postby TheMartian » Thu Jul 09, 2015 10:51 pm

Hi

Is it correct, that if I have a DoubleBuffer display I cannot use MakeButton() to create zones for mouseevents? The regular eventhandler responds to mouse events (if set up to do so). But if I include a MakeButton statement, I am told that - 'A BGPIC needs to be active when calling button functions'.

In other words with a DoubleBuffer Display, as it is required by GLGALORE, i should read the mouse coordinates from regular mouse events and 'decode' my zones in the code?

regards
Jesper
User avatar
TheMartian
 
Posts: 54
Joined: Sun Feb 28, 2010 1:51 pm

Re: MakeButton and DoubleBuffer Displays

Postby jalih » Sat Jul 11, 2015 12:58 pm

TheMartian wrote:Is it correct, that if I have a DoubleBuffer display I cannot use MakeButton() to create zones for mouseevents? The regular eventhandler responds to mouse events (if set up to do so). But if I include a MakeButton statement, I am told that - 'A BGPIC needs to be active when calling button functions'.

Try using MakeButton() calls before calling BeginDoubleBuffer() and it should work fine.
jalih
 
Posts: 244
Joined: Fri Jun 18, 2010 8:08 pm
Location: Finland

Re: MakeButton and DoubleBuffer Displays

Postby airsoftsoftwair » Sat Jul 11, 2015 4:59 pm

This is actually a bug. I've fixed it now. Simply do as jalih says and create the button before starting double-buffer mode to workaround the issue.
User avatar
airsoftsoftwair
 
Posts: 2233
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: MakeButton and DoubleBuffer Displays

Postby TheMartian » Sat Jul 11, 2015 10:05 pm

Hi

Yes, executing the MakeButton() statement before setting up a DoubleBuffer works for me too. thanks. Since I experiment with multiple displays I just have to be careful that I have activated the right display for my MakeButton() statements.. :)

regards
Jesper
User avatar
TheMartian
 
Posts: 54
Joined: Sun Feb 28, 2010 1:51 pm


Return to GL Galore

Who is online

Users browsing this forum: No registered users and 1 guest

cron