Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 05-07-09, 12:39 PM   #1
mocharhw
Registered User
 
Join Date: May 2008
Posts: 113
Default SDLMAME OpenGL vsync problem

These are my current specs:
7600GS card
177.xx nvidia driver
Ubuntu Intrepid
LCD flat panel on DVI output
Analog television on S-Video output
Twinview, one giant spanning screen mode
Composite disabled in xorg.conf

I seem to have a problem with obtaining tear-less video in SDLMAME. It doesn't matter what sync options I select or deselect in the nvidia-settings utility. All of my SDLMAME games have a moving tear line in them. This is more pronounced on side-scrolling games of course. It happens in windowed and fullscreen modes.

I don't have problems with other OpenGL apps such as games or MythTV in windowed mode using OpenGL rendering. These programs sync very smooth without tearing.

I've put in a question to the SDLMAME fourm about this, but received no response. There doesn't seem to be much complaining about it from other SDLMAME users, so I have to assume either I'm the only one having the problem or everyone else just accepts it as normal.

Is this a problem with my use of an older nvidia driver? Would I see any difference by upgrading my card or driver? Does it have something to do with Twinview? I don't understand what the difference is between SDLMAME's OpenGL rendering and MythTV's rendering or (put your favorite Linux game here) rendering.

For example, many SDLMAME roms run at NTSC frame rates yet for some reason I have a tear line in them. I also see the same tear line from games that don't run at tight NTSC frame rates, like 54 Hz or whatever. MythTV's output is NTSC of course, and it is smooth even on my LCD flat panel which does not adhere to NTSC timing either. According to the nvidia-settings util my LCD runs at 60.042 Hz or something like that.

So what are the differences, and is there any way to get smooth video out of SDLMAME?

Thanks.
mocharhw is offline   Reply With Quote
Old 05-12-09, 12:03 AM   #2
mocharhw
Registered User
 
Join Date: May 2008
Posts: 113
Default Re: SDLMAME OpenGL vsync problem

I figured it out on my own. In case anyone gives a crap, the culprit is nvidia's Twinview. When you run Twinview with 2 different monitors that have different vertical scan frequencies, it's impossible to vsync when an application is spanned across both screens. This is explained in the nvidia README file.

I was running SDLMAME in fullscreen mode, and although there was no image on the second monitor, it was still spanning to it somehow because I would see the second monitor go blank while running a game. This is what gave me the clue about what was happening. This is probably not SDLMAME's fault, but again a problem with Twinview or possibly Xorg trying to use the entire area since X just sees both monitors as one huge screen.

Anyways, the answer if anyone cares (if you use Twinview) is to run SDLMAME in windowed mode, maximized of course, and select the waitvsync option. And of course don't forget to select the vsync options in the nvidia control panel.
mocharhw is offline   Reply With Quote
Old 05-12-09, 01:08 AM   #3
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: SDLMAME OpenGL vsync problem

You can control which display device it syncs to by using the __GL_SYNC_DISPLAY_DEVICE environment variable.
AaronP is offline   Reply With Quote
Old 05-12-09, 10:41 AM   #4
mocharhw
Registered User
 
Join Date: May 2008
Posts: 113
Default Re: SDLMAME OpenGL vsync problem

Quote:
Originally Posted by AaronP View Post
You can control which display device it syncs to by using the __GL_SYNC_DISPLAY_DEVICE environment variable.
Yes, agreed. However, there is something different about SDLMAME (or perhaps it's X or Twinview), when SDLMAME is run in "fullscreen", the game window shows up on the primary monitor as expected, but the second monitor goes black. This indicates to me that for some reason SDLMAME "fullscreen" mode is spanning both (all) screens, even though the game image is only shown on the primary display. This is exactly why __GL_SYNC_DISPLAY_DEVICE does not work when SDLMAME is in fullscreen mode. You are forced to run windowed in order to make SDLMAME stay on the primary screen, and thus sync to it.
mocharhw is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenGL book Airstrip1 Software Development 2 08-12-12 08:55 AM
Major WineX prob... I think it has to do with the vidcard... Linewbie NVIDIA Linux 20 10-09-02 09:58 PM
Problem when compiling with SDL on Nvidia/Nforce... superconti NVIDIA Linux 3 09-13-02 12:25 AM
Multiple OpenGL applications and NVidia gbrauer NVIDIA Linux 7 09-01-02 04:47 PM
Nvidia Go on laptop, black border within XFree86 problem raxip NVIDIA Linux 3 07-31-02 10:58 AM

All times are GMT -5. The time now is 08:39 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.