View previous topic :: View next topic |
Author |
Message |
eldar
Joined: 14 Jun 2008 Posts: 101 Location: Ufa, Russia
|
Posted: Thu Oct 23, 2008 6:26 pm Post subject: Slowdowns in openGL visualizing. |
|
|
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 |
|
|
kaarna
Joined: 03 Apr 2006 Posts: 92 Location: Finland
|
Posted: Sun Oct 26, 2008 8:27 am Post subject: |
|
|
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 |
|
|
eldar
Joined: 14 Jun 2008 Posts: 101 Location: Ufa, Russia
|
Posted: Wed Oct 29, 2008 1:28 pm Post subject: |
|
|
The worst thing is that it's hard to identify what causes the problem - gtk itself or gtkD. |
|
Back to top |
|
|
eldar
Joined: 14 Jun 2008 Posts: 101 Location: Ufa, Russia
|
Posted: Wed Nov 05, 2008 7:45 am Post subject: |
|
|
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 |
|
|
|