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

Newegg Daily Deals

Reply
 
Thread Tools
Old 10-27-03, 06:46 PM   #1
spartus4
Registered User
 
Join Date: Oct 2003
Posts: 5
Default Tearing in OpenGL??

I was wondering if there was some way to prevent opengl images from tearing? I see it in opengl screensavers and sometimes in games when things are moving really fast.
spartus4 is offline   Reply With Quote
Old 10-31-03, 04:27 AM   #2
LordMorgul
Electrical Engineer
 
LordMorgul's Avatar
 
Join Date: Dec 2002
Location: San Luis Obispo, CA
Posts: 872
Default Depends..

Depends heavily on the hardware you've got, and the options its using.
Tearing can be caused by lots of variables, like hardware going bad (too much overclocking?), bottlenecks in the system (reduce resolution and texture depths), pushing the card too hard with FSAA or Aniso texture filtering, Triple / Double buffering (which doesn't have time to complete)... lots of things, and I've probably missed many and added some that don't belong.

Adjust settings around, check every available combination, reduce the workload of the card in any way possible.

It certainly helps if the card is using AGP, the faster the better, and you have plenty of available system RAM at the time.

/me doesn't know technical 'code' level reason a tear occurs, so don't take any of that and go act on it.. test
__________________
"..the triumph of evil is for good men to do nothing." (Edmond Burke)
nVIDIA video driver RPMs for Fedora :: see yum repo at livna.org.
LordMorgul is offline   Reply With Quote
Old 11-01-03, 04:40 AM   #3
Soul-Crusher
Leadtek 6800GT
 
Join Date: Aug 2002
Location: Albuquerque, NM, USA
Posts: 195
Send a message via ICQ to Soul-Crusher Send a message via AIM to Soul-Crusher Send a message via Yahoo to Soul-Crusher
Default Re: Tearing in OpenGL??

Quote:
Originally posted by spartus4
I was wondering if there was some way to prevent opengl images from tearing? I see it in opengl screensavers and sometimes in games when things are moving really fast.
The easiest solution is probably to cap your framerate so that it does not exceed your monitor's refresh rate.

Or maybe that's another visual defect I'm thinking of.
__________________
"Floating in a dream-like state, I am the emporer of a parallel universe." --Arch Enemy
My xorg.conf file
Soul-Crusher is offline   Reply With Quote
Old 11-01-03, 09:43 AM   #4
TheOneKEA
Fifteen-K Saiyan Bastard
 
TheOneKEA's Avatar
 
Join Date: Aug 2002
Location: Somewhere in England, waiting for ROTK and drooling over the A64 3000+
Posts: 417
Send a message via ICQ to TheOneKEA Send a message via AIM to TheOneKEA Send a message via Yahoo to TheOneKEA
Default

No, you're right. Tearing is a result of the RAMDAC sending a new frame to the monitor before it finishes rendering the current frame. This means that the monitor starts rendering part of the new frame with part of the old frame, leading to a "tearing" effect.

You can usually fix this by locking your FPS to the refresh rate of your monitor. For most peeps this is 75Hz or higher.
__________________
/me \/\/@|\|t5 $$$$$ F0r @|\| u65r 3|33t G@/\/\1|\|G r1G

SCREW THE ADS! http://adblock.mozdev.org/
Proud user of teh Fox of Fire - Mozilla Firefox 0.8

Registered Linux User #289618
TheOneKEA is offline   Reply With Quote
Old 11-01-03, 11:44 AM   #5
spartus4
Registered User
 
Join Date: Oct 2003
Posts: 5
Default Re: Re: Tearing in OpenGL??

Quote:
Originally posted by Soul-Crusher
The easiest solution is probably to cap your framerate so that it does not exceed your monitor's refresh rate.

Or maybe that's another visual defect I'm thinking of.
How do I cap my frame rate. I have a Geforce FX 5900 with an analog flat panel. Everything is stock and the card has never been over clocked. I don't get the tearing in windoze.
spartus4 is offline   Reply With Quote
Old 11-01-03, 12:45 PM   #6
TheOneKEA
Fifteen-K Saiyan Bastard
 
TheOneKEA's Avatar
 
Join Date: Aug 2002
Location: Somewhere in England, waiting for ROTK and drooling over the A64 3000+
Posts: 417
Send a message via ICQ to TheOneKEA Send a message via AIM to TheOneKEA Send a message via Yahoo to TheOneKEA
Default

Edit your .bashrc file (or /etc/bashrc as root) and add this line:

export __GL_SYNC_TO_VBLANK=1

This will tell the OpenGL libraries to use vsync when they render stuff via the NVIDIA drivers and the X server.
__________________
/me \/\/@|\|t5 $$$$$ F0r @|\| u65r 3|33t G@/\/\1|\|G r1G

SCREW THE ADS! http://adblock.mozdev.org/
Proud user of teh Fox of Fire - Mozilla Firefox 0.8

Registered Linux User #289618
TheOneKEA is offline   Reply With Quote
Old 05-25-04, 10:59 AM   #7
evanjfraser
Registered User
 
Join Date: May 2004
Posts: 12
Default Re: Tearing in OpenGL??

This is a very useful fix. I was getting tearing while using some flipbook tools (eg framecycler) even though the playback rate was only 24fps. This fixes it nicely!

Cheers, Evan.
evanjfraser 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
OpenGL apps crashing in NVIDIA driver when switching desktop dinosaur NVIDIA Linux 0 06-01-12 07:09 PM
Major WineX prob... I think it has to do with the vidcard... Linewbie NVIDIA Linux 20 10-09-02 09:58 PM
Option "NvAGP" "0" causes crash w/ OpenGL. mujtaba NVIDIA Linux 5 08-25-02 12:16 PM
Slow OpenGL on 7.3 kl899 NVIDIA Linux 1 08-04-02 07:58 PM

All times are GMT -5. The time now is 08:03 PM.


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