MakeButton and DoubleBuffer Displays

Discuss OpenGL® programming with the GL Galore plugin here
Post Reply
User avatar
TheMartian
Posts: 109
Joined: Sun Feb 28, 2010 12:51 pm

MakeButton and DoubleBuffer Displays

Post by TheMartian »

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
jalih
Posts: 276
Joined: Fri Jun 18, 2010 8:08 pm
Location: Finland

Re: MakeButton and DoubleBuffer Displays

Post by jalih »

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.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: MakeButton and DoubleBuffer Displays

Post by airsoftsoftwair »

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
TheMartian
Posts: 109
Joined: Sun Feb 28, 2010 12:51 pm

Re: MakeButton and DoubleBuffer Displays

Post by TheMartian »

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
Post Reply