Nekochan Net

Official Chat Channel: #nekochan // irc.nekochan.net
It is currently Sun Nov 23, 2014 12:18 am

All times are UTC - 8 hours [ DST ]


Forum rules


Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.



Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: OpenGL sync
Unread postPosted: Mon Aug 16, 2010 4:37 am 
Offline

Joined: Tue Apr 25, 2006 10:23 am
Posts: 23
Dear All, I am still a naive to SGI and OpenGL programming, therefore, I would like to have your advice.
When I run my OpenGL program (to present .png images on display, or draw a small square with different intensities for display calibration), I noticed some "flicker" appear on the display screen.It is not visible in normal IRIX desktop, so I wonder if there may be a problem in synchronization in my code. (I think) I did not specifically put any command in my program to "sync" or interpret the frame rate of the display.
In main(), I just put something like,
glutInitDidpslayMode(GLUTRGBA| GLUT_DOUBLE| GLUT_DEPTH);
glutInitWindowSize(wx, wy);
glutInitWindowposition(0, 0);
window = glutCreateWindow("")
InitGL(wx, wy);
glutDsiplayFunc(DrawGLScene);
and mouse and keyboard functions....etc

Should I include any other command here? Or, OpenGL or glut can adjust automatically whatever the display setting is?
Many thanks.
Or, I also wonder if the display may be faulty.
(running Fuel with IRIX 6.5.30m.)


Top
 Profile  
 
 Post subject: Re: OpenGL sync
Unread postPosted: Fri Oct 29, 2010 2:07 am 
Offline

Joined: Sun Feb 04, 2007 2:48 pm
Posts: 83
Since nobody else has replied, I thought I'd go ahead and give you a few points in the right direction.

If you are running an Octane(2) with a V6 card, the flickers will likely be present in any and all OpenGL programs (I don''t have a link off hand, but 1280x1024 is only supported @ 96Hz, and the 60 Hz configuration causes flickering). If yours is the only program with this issue, then your program is likely buggy. Since you are using GLUT rather than straight GLX, I would try copying the simplest possible example programs from the Internet and trying to verify their behaviors.


Top
 Profile  
 
 Post subject: Re: OpenGL sync
Unread postPosted: Fri Nov 12, 2010 5:11 am 
Offline
Moderator
Moderator
User avatar

Joined: Fri May 09, 2003 6:10 am
Posts: 2931
Location: Maryland, USA
With OpenGL, you may possibly see "tearing" (a non-sync of the framebuffer update and the display rasterization), which will appear as a brief horizontal split, but no "flicker" with any GLUT app unless there is a hardware problem.

There is some way to also prevent tearing on IRIX as well (or it may do it automatically), but it escapes me right now.


Top
 Profile  
 
 Post subject: Re: OpenGL sync
Unread postPosted: Fri Nov 12, 2010 9:11 am 
Offline

Joined: Tue Apr 25, 2006 10:23 am
Posts: 23
squeen wrote:
There is some way to also prevent tearing on IRIX as well (or it may do it automatically), but it escapes me right now.

Is the "tearing" a kind of moire-ish pattern?
Would you a bit more information about the "some way" on IRIX?
Thank you so much for your help.


Top
 Profile  
 
 Post subject: Re: OpenGL sync
Unread postPosted: Thu Nov 18, 2010 6:39 am 
Offline
Moderator
Moderator
User avatar

Joined: Fri May 09, 2003 6:10 am
Posts: 2931
Location: Maryland, USA
Tearing is when the rastering of the display device (montior) is not in sync with the update of the OpenGL buffer. Double buffering in OpenGL usually helps this problem, but on NVIDIA cards under Linux there is an option to "turn on" VSync. Turning it on forces glxSwapBuffers (for double buffering) to only occur in-between the monitor's refreshes (@ ~60Hz).

What happens is that all display scan lines below the "tear" will have the information (GL primitives) drawn in the position they were at the preceding frame, while the information above the "tear" will be in the current frame position.

What I can't remember is if IRIX OpenGL is always in a VSync-like mode when it double-buffers. I think "yes".

Does that help?


Top
 Profile  
 
 Post subject: Re: OpenGL sync
Unread postPosted: Thu Nov 18, 2010 8:24 am 
Offline
Moderator
Moderator
User avatar

Joined: Tue Nov 25, 2003 1:09 pm
Posts: 799
Location: Europe
squeen wrote:
What I can't remember is if IRIX OpenGL is always in a VSync-like mode when it double-buffers. I think "yes".

I also think VSync is always enabled.

I remember reading something about it on usenet a long time ago -- IIRC, someone asked why the FPS counter never goes above the monitor's refresh rate and the answer from an SGI employee was that it's because vsync is always enabled.


Top
 Profile  
 
 Post subject: Re: OpenGL sync
Unread postPosted: Thu Nov 18, 2010 10:54 am 
Offline

Joined: Tue Apr 25, 2006 10:23 am
Posts: 23
ShadeOfBlue wrote:
squeen wrote:
What I can't remember is if IRIX OpenGL is always in a VSync-like mode when it double-buffers. I think "yes".

I also think VSync is always enabled.

I remember reading something about it on usenet a long time ago -- IIRC, someone asked why the FPS counter never goes above the monitor's refresh rate and the answer from an SGI employee was that it's because vsync is always enabled.


So, could I just clarify whether, if the timing in the program may not match to the refresh rate of display, the IRIX OpenGL automatically adjust the timing not to conflict with the display, that is, wait until the beam scan go through end of the frame?

Even if we want to present an image for 1 s (1000ms), the real presentation will be
a bit shorter or longer, strictly speaking? (16.7ms difference with 60Hz frame rate?)


Top
 Profile  
 
 Post subject: Re: OpenGL sync
Unread postPosted: Sun Nov 21, 2010 7:12 am 
Offline
Moderator
Moderator
User avatar

Joined: Tue Nov 25, 2003 1:09 pm
Posts: 799
Location: Europe
I think so, since drawing is synced to the refresh rate of the monitor.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group