[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Vertical refresh and tearing...
From: |
Ivan Vučica |
Subject: |
Re: Vertical refresh and tearing... |
Date: |
Tue, 04 Mar 2014 18:44:32 +0000 |
In theory, yes; depending on the X server, X driver and the implementation of the compositing window manager, possibly no.
If you are using OpenGL, see:
Quoting the GLX-specific part:
> Use the GLX_EXT_swap_control extension to control swap interval. Check the GLX-specific extensions string
> via glXQueryExtensionsString() to verify that the extension is actually present.
>
> The extension provides glXSwapIntervalEXT(), which also directly specifies the swap interval.
> glXSwapIntervalEXT(1) is used to enable vsync; glXSwapIntervalEXT(0) to disable vsync.
> In Linux, things are much simpler. If GLX_SGI_swap_control is present in the string returned
> by glGetString(GL_EXTENSIONS), then you can use glXSwapIntervalSGI(0) to disable vsync
> or you can use glXSwapIntervalSGI(1) to enable vsync (aka vertical synchronization).
> NSOpenGLCPSwapInterval
>
> Sets or gets the swap interval. The swap interval is represented as one long. If the swap
> interval is set to 0 (the default), the flushBuffer method executes as soon as possible, without
> regard to the vertical refresh rate of the monitor. If the swap interval is set to 1, the buffers
> are swapped only during the vertical retrace of the monitor. Available in Mac OS X v10.0 and later.
>
> Declared in NSOpenGL.h.
@@ -562,15 +562,19 @@ gst_gl_window_send_message (GstGLWindow * window, GstGLWindowCB callback,
*/
NS_DURING {
if (glContext) {
- long swapInterval = 1;
- [[glView openGLContext] setValues:(const GLint *)&swapInterval forParameter:NSOpenGLCPSwapInterval];
+#ifdef GNUSTEP
+ const long swapInterval = 1;
+#else
+ const GLint swapInterval = 1;
+#endif
+ [[glView openGLContext] setValues:&swapInterval forParameter:NSOpenGLCPSwapInterval];
}
} NS_HANDLER {
- g_debug ("your back-end does not implement NSOpenglContext::setValues");
+ g_debug ("your back-end does not implement NSOpenglContext::setValues\n");
}
NS_ENDHANDLER
Good luck!
Can't you as an application choose if you want to render synchronized with vertical refresh or not?
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
秘密保持について:この電子メールは、名宛人に送信したものであり、秘匿特権の対象となる情報を含んでいます。
もし、名宛人以外の方が受信された場合、このメールの破棄、およびこのメールに関する一切の開示、
複写、配布、その他の利用、または記載内容に基づくいかなる行動もされないようお願い申し上げます。
---
CONFIDENTIALITY NOTE: The information in this email is confidential
and intended solely for the addressee.
Disclosure, copying, distribution or any other action of use of this
email by person other than intended recipient, is prohibited.
If you are not the intended recipient and have received this email in
error, please destroy the original message._______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
- Re: Vertical refresh and tearing...,
Ivan Vučica <=