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

Slowdowns in openGL visualizing.

 
Post new topic   Reply to topic     Forum Index -> gtkD
View previous topic :: View next topic  
Author Message
eldar



Joined: 14 Jun 2008
Posts: 101
Location: Ufa, Russia

PostPosted: Thu Oct 23, 2008 6:26 pm    Post subject: Slowdowns in openGL visualizing. Reply with quote

I am doing a 3D visualizer with gtkD. I faced the problem than on large objects with lots of polygons when I rotate them using mouse - the rendering delays comparing to mouse moves(sorry for my bad english). So it's like image doesn't follow to my mouse moves, and after I finish moving it still moves for a while. The more objects I have - the more is a delay. During this application even hangs for a while.
To investigate this I made a small port of Qt to D - just OpenGL widget and required stuff to use. And I got it working! It doesn't have this slowdowns at all. Everything is fast and smooth.
I set up my opengl like in the tutorials from gtkD. I don't know really whether it is an issue of gktD or gtk+ itself. Or I'm doing something wrong. But I dont want to port Qt to D just because of this issue. gtkD suits me very well. What can you advice me?
Back to top
View user's profile Send private message
kaarna



Joined: 03 Apr 2006
Posts: 92
Location: Finland

PostPosted: Sun Oct 26, 2008 8:27 am    Post subject: Reply with quote

I believe my program suffers from similar behaviour with OpenGL.

While I drag my objects (and they don't even have many polygons) they follow the mouse with a delay, and they even sometimes drop frames for half a second (or less).
I've also been watching how much memory my app is using with top, and it's an ever growing number. Whenever I resize my window a lot of memory gets allocated, and it's not freed later. (Of course it could be my own code too, I'm not that good programmer really, so I wouldn't know, and I don't have the time to test it more. I should really do a C or C++ test and compare it to similar gtkD code.)

I'm just guessing, that there might be some connection between leaking memory and the delays, but I don't really know if there is.
I'm just suspecting that not a lot of thought has gone into the way gtkD manages memory, especially with gobjects that have to be freed explicitly in many situations. (Correct me if I'm wrong, and the memory management in gtkD is top of the class...)

If somebody knows about these issues, or memory stuff, it would be great if this kind of issues got fixed.
Back to top
View user's profile Send private message AIM Address MSN Messenger
eldar



Joined: 14 Jun 2008
Posts: 101
Location: Ufa, Russia

PostPosted: Wed Oct 29, 2008 1:28 pm    Post subject: Reply with quote

The worst thing is that it's hard to identify what causes the problem - gtk itself or gtkD.
Back to top
View user's profile Send private message
eldar



Joined: 14 Jun 2008
Posts: 101
Location: Ufa, Russia

PostPosted: Wed Nov 05, 2008 7:45 am    Post subject: Reply with quote

I have an idea - to try DWT - under linux it uses gtk as a backend, so it is a good way to find out if gtk is the cause of the problem.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> gtkD 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