News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
drawing graphics in murgaLua
Author Message
JohnMurga
Administrator
*******


Posts: 381
Group: Administrators
Joined: Apr 2007
Status: Offline
Reputation: 2
Post: #1
RE: drawing graphics in murgaLua

OK, there are two issues here ...

The circles demo segfaults on Linux because of the fl_color being invoked before make_current() has been done (to set the display window)... This is completely an FLTK issue.

Just like the reason my demo was failing under Linux (due to the font not being set) ... Apparently Linux FLTK doesn't set up as many defaults or cope as well with bad use :-)

More bad news ...

The construct

Code:
while (Fl:event_key() ~= fltk.FL_Escape)  do
    Fl:check()
     w:do_callback()
end

Creates a VERY NASTY busy loop under Linux (again I think this FLTK) ... Putting a wait(1) helps a little but it is pretty nuts ... Under murgaLua 0.5 putting a murgaLua.sleep(50) makes the problem go away (50 milliseconds).

The busy loop is pretty nasty on Windows too, and the murgaLua.sleep fixes it there too ... You can put a socket.sleep(1), but I would advise using a timer callback until 0.5 comes out.

There you go ... Be careful when using the drawing functions under Linux.

Cheers
JohnM

This post was last modified: 06-27-2007 09:51 AM by JohnMurga.

06-27-2007 09:35 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
drawing graphics in murgaLua - widged - 06-05-2007, 11:01 PM
RE: drawing graphics in murgaLua - mikshaw - 06-06-2007, 02:00 AM
RE: drawing graphics in murgaLua - mikshaw - 06-23-2007, 06:00 AM
RE: drawing graphics in murgaLua - mikshaw - 06-23-2007, 12:38 PM
RE: drawing graphics in murgaLua - mikshaw - 06-23-2007, 01:02 PM
RE: drawing graphics in murgaLua - iGame3D - 06-25-2007, 03:29 PM
RE: drawing graphics in murgaLua - iGame3D - 06-25-2007, 08:11 PM
RE: drawing graphics in murgaLua - iGame3D - 06-25-2007, 08:25 PM
RE: drawing graphics in murgaLua - mikshaw - 06-27-2007, 12:21 AM
RE: drawing graphics in murgaLua - JohnMurga - 06-27-2007 09:35 AM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: