NAME glXInitThreadsSUN - multi-threading support C SPECIFICATION int glXInitThreadsSUN( void ) DESCRIPTION The glXInitThreadsSUN function initializes GL support for concurrent rendering threads. This function must first be called before glXCreateContext in a multi-threaded GL pro- gram, and it must complete before any other GL call is made. This function returns a nonzero status if initialization was successful; otherwise, it returns zero. On systems that do not support threads, this function always returns zero. It is only necessary to call this function if multiple rendering threads might use GL concurrently. If all calls to GL functions are protected by some other access mechanism (for example, a mutual exclusion lock in a toolkit or through explicit client programming), GL thread initializa- tion is not required. It is recommended that single- threaded rendering programs not call this function. This function is only client side so the extension string can be retrieved using glXGetClientString. Typical usage: #ifdef GLX_SUN_init_threads if ( strstr ( glXGetClientString (dpy, GLX_EXTENSIONS ), "GLX_SUN_init_threads" ) ) { if ( ! glXInitThreadsSUN ( ) ) { printf ("Unable to init GL "); printf ("for multithreaded rendering\n"); } } #endif NOTES XInitThreads must be called before glXInitThreadsSUN. glXQueryExtensionsString does not show a string for this function since this function is client side only. glXInitThreadsSUN is part of the GLX_SUN_init_threads exten- sion, not part of the core GL command set. If GLX_SUN_init_threads is included in the string returned by glXGetClientString, when called with argument GLX_EXTENSIONS, extension glXInitThreadsSUN is supported by the connection. SEE ALSO glXGetClientString, glXQueryExtensionsString, glXMakeCurrent, XInitThreads
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |