MakeButton and DoubleBuffer Displays

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

MakeButton and DoubleBuffer Displays

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

jalih
Posts: 245
Joined: Fri Jun 18, 2010 8:08 pm
Location: Finland

Re: MakeButton and DoubleBuffer Displays

Post by 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.

User avatar
airsoftsoftwair
Posts: 2572
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany
Contact:

Re: MakeButton and DoubleBuffer Displays

Post by 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
TheMartian
Posts: 54
Joined: Sun Feb 28, 2010 1:51 pm

Re: MakeButton and DoubleBuffer Displays

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

Post Reply