|
Mathias 'cylab' Henze
|
 |
« on: 10. March 2007, 03:04:28 pm » |
|
Maybe I was just to blind to see, but is there a possibility to toggle vsync in the Xith3D API? I would have expected to have a render option in Canvas3D, but it seems there is nothing there.
|
|
|
|
|
Logged
|
|
|
|
Marvin Fröhlich
Xith Lord
Administrator
Guru
   
Offline
Posts: 4381
May the 4th, be with you...
|
 |
« Reply #1 on: 10. March 2007, 07:16:30 pm » |
|
Maybe I was just to blind to see, but is there a possibility to toggle vsync in the Xith3D API? I would have expected to have a render option in Canvas3D, but it seems there is nothing there.
No, there's no option. It was just supposed, that the current setting is the right one for anybody  . For which OpenGLLayer do you want to toggle? And do you expect performance advantages from it, or do you just want to try? Marvin
|
|
|
|
|
Logged
|
|
|
|
|
Mathias 'cylab' Henze
|
 |
« Reply #2 on: 11. March 2007, 12:53:27 am » |
|
I just wanted to test the performance of the terrain. I don't really need that option, but there might be request for it by others (mainly to provide the option to the user in an options dialog of a game)
|
|
|
|
|
Logged
|
|
|
|
Marvin Fröhlich
Xith Lord
Administrator
Guru
   
Offline
Posts: 4381
May the 4th, be with you...
|
 |
« Reply #3 on: 11. March 2007, 02:16:06 am » |
|
I just wanted to test the performance of the terrain. I don't really need that option, but there might be request for it by others (mainly to provide the option to the user in an options dialog of a game)
Well, I could add it to the canvas creation options (cannot be switched at canvas lifetime), but I can tell you, that the performance is terrible with this option other than it is now. I tested it some time ago. Marvin
|
|
|
|
|
Logged
|
|
|
|
|
'n ddrylliog
|
 |
« Reply #4 on: 12. March 2007, 04:14:41 pm » |
|
I just wanted to test the performance of the terrain. I don't really need that option, but there might be request for it by others (mainly to provide the option to the user in an options dialog of a game)
Well, I could add it to the canvas creation options (cannot be switched at canvas lifetime), but I can tell you, that the performance is terrible with this option other than it is now. I tested it some time ago. Graphics Card are not an exact science. Please consider extensive testing.
|
|
|
|
|
Logged
|
|
|
|
Marvin Fröhlich
Xith Lord
Administrator
Guru
   
Offline
Posts: 4381
May the 4th, be with you...
|
 |
« Reply #5 on: 12. March 2007, 07:39:03 pm » |
|
Graphics Card are not an exact science. Please consider extensive testing.
Hehe. If you by me some alternative cards  . Or what did you mean? Marvin
|
|
|
|
|
Logged
|
|
|
|
|
'n ddrylliog
|
 |
« Reply #6 on: 13. March 2007, 08:32:00 am » |
|
Graphics Card are not an exact science. Please consider extensive testing.
Hehe. If you by me some alternative cards  . Or what did you mean? I meant it could perform differently on other graphic cards. Mine for example  (ol' crappy desktopish cardà). At least the default state of the V-Sync should be documented and I think a render option is to be provided (as cylab said, it is "expected").
|
|
|
|
|
Logged
|
|
|
|
|
Mathias 'cylab' Henze
|
 |
« Reply #7 on: 13. March 2007, 09:56:25 am » |
|
It would be interesting to find out, what causes the strange performance behaviour, if vsync is disabled. From a logical point of view, rendering should be as fast as possible without vsync and driving CPU load to 100%. But this is not true for xith.
For example I have two machines to test on: a PentiumM@1,8Ghz with a ATI X700 graphics subsystem and a Core 2 Duo 6600@2,8GHz with a Geforce 7960@580MHz. So if I turn off vsync, both machines run the terrain test at 140 fps, the laptop with 30% CPU load and the Core2 Duo with ~8%.
I can't really tell what's going on here, I would have expected something completely different (e.g. 400fps and 100% CPU laod). Maybe there are some blocking synchronized methods in there or something in JOGL? How's vswync behaviour with LWJGL?
I testet this with the JOGL_AWT renderer on windows XP.
|
|
|
|
|
Logged
|
|
|
|
Marvin Fröhlich
Xith Lord
Administrator
Guru
   
Offline
Posts: 4381
May the 4th, be with you...
|
 |
« Reply #8 on: 13. March 2007, 11:32:57 am » |
|
I will provide this option at canvas creation level. Then you can test.
Marvin
|
|
|
|
|
Logged
|
|
|
|
|
'n ddrylliog
|
 |
« Reply #9 on: 13. March 2007, 06:32:41 pm » |
|
Yeah strange. With VSync disabled I get better performances.
|
|
|
|
|
Logged
|
|
|
|
Marvin Fröhlich
Xith Lord
Administrator
Guru
   
Offline
Posts: 4381
May the 4th, be with you...
|
 |
« Reply #10 on: 22. March 2007, 08:13:48 pm » |
|
I'm currently implementing the vsync switch. And I realized, that I mixed this feature with "double-buffered". That's why I said, that the performance is terrible. Of course the performance is better with vsync disabled. And it whould be possible to switch at runtime. But I can't find a way to toggle vsync for JOGL. Could anyone point me to the right class/method?
Marvin
|
|
|
|
|
Logged
|
|
|
|
Marvin Fröhlich
Xith Lord
Administrator
Guru
   
Offline
Posts: 4381
May the 4th, be with you...
|
 |
« Reply #11 on: 23. March 2007, 01:15:19 am » |
|
OK, found the way to switch vsync for JOGL. It's done on GL level there and the method is called setSwapInterval(). The vsync switch is now fully supported. Simply pass an additional parameter to one of the Canvas3DFactory methods or the CanvasConstructionInfo constructors. I'm very anxious of your test results. I myself got NO difference between enabled/disabled. Enjoy  Marvin
|
|
|
|
|
Logged
|
|
|
|
|