FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

openGL

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
lena



Joined: 19 Dec 2004
Posts: 11

PostPosted: Sun Dec 19, 2004 10:51 am    Post subject: openGL Reply with quote

How to use openGL with DFL ?

lena
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Sun Dec 19, 2004 12:29 pm    Post subject: Reply with quote

Try this http://www.dprogramming.com/dflopengl.zip
Back to top
View user's profile Send private message
lena



Joined: 19 Dec 2004
Posts: 11

PostPosted: Sun Dec 19, 2004 4:16 pm    Post subject: Reply with quote

Could you create onIdle handler for form ( or control ), which
get called from message loop, when there are no messages ?
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Sun Dec 19, 2004 4:29 pm    Post subject: Reply with quote

There is one, Application.idle ~= &myIdle;
Back to top
View user's profile Send private message
lena



Joined: 19 Dec 2004
Posts: 11

PostPosted: Sun Dec 19, 2004 5:14 pm    Post subject: Reply with quote

I did that in first place, but my simulation runs only if I
press key or move mouse over form. It looks like Application.idle
gets triggered only by not being idle.
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Mon Dec 20, 2004 4:37 am    Post subject: Reply with quote

Application.idle is fired when all the messages in the queue have been processed and it's about to wait for more. What you want is something that will loop while it's idle? Maybe a timer will work. The timers have lowest priority and only get called when there are no other messages in the queue.
Back to top
View user's profile Send private message
lena



Joined: 19 Dec 2004
Posts: 11

PostPosted: Mon Dec 20, 2004 7:47 am    Post subject: Reply with quote

What I want is something that will loop while it's idle. Wink
So, what can you do about it ? (Timer works, of course, but it is slow! )
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Mon Dec 20, 2004 10:28 am    Post subject: Reply with quote

lena wrote:
What I want is something that will loop while it's idle.

I've added an extra optional parameter to Application.run() in today's snapshot ( http://www.dprogramming.com/dfl/snapshots/ ), it's a delegate that gets called while there are no messages in the queue.
Code:

void whileIdle()
{
   // Idle stuff...
}

Application.run(new MainForm, &whileIdle);

- Chris
Back to top
View user's profile Send private message
lena



Joined: 19 Dec 2004
Posts: 11

PostPosted: Mon Dec 20, 2004 3:25 pm    Post subject: Reply with quote

Excellent ! Thank you.
What about some more documentation and examples ?
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Mon Dec 20, 2004 7:20 pm    Post subject: Reply with quote

lena wrote:
What about some more documentation and examples ?

I have yet to get my documentation generator to output better HTML files with some of my comments.
What kind of examples do you want? I don't know a thing about OpenGL...
Back to top
View user's profile Send private message
lena



Joined: 19 Dec 2004
Posts: 11

PostPosted: Tue Dec 21, 2004 1:35 am    Post subject: Reply with quote

I didn't mean OpenGL exampels. Just some general exampels ( tutorials )
for newbies to get the feel for the framework.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group