From: <eli...@us...> - 2009-04-24 20:35:35
|
Revision: 3203 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3203&view=rev Author: elias_naur Date: 2009-04-24 20:35:33 +0000 (Fri, 24 Apr 2009) Log Message: ----------- Linux: made legacy context code conditional Modified Paths: -------------- trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxContextImplementation.c Modified: trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxContextImplementation.c =================================================================== --- trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxContextImplementation.c 2009-04-24 20:30:30 UTC (rev 3202) +++ trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxContextImplementation.c 2009-04-24 20:35:33 UTC (rev 3203) @@ -76,17 +76,17 @@ GLXFBConfig *config = getFBConfigFromPeerInfo(env, peer_info); if (config == NULL) return; - int render_type; - if (lwjgl_glXGetFBConfigAttrib(peer_info->display, *config, GLX_RENDER_TYPE, &render_type) != 0) { - throwException(env, "Could not get GLX_RENDER_TYPE attribute"); - return; - } - int context_render_type = (render_type & GLX_RGBA_FLOAT_BIT) != 0 ? GLX_RGBA_FLOAT_TYPE : GLX_RGBA_TYPE; GLXContext context; if (attribs) { const int *attrib_list = (const int *)(*env)->GetDirectBufferAddress(env, attribs); context = lwjgl_glXCreateContextAttribsARB(peer_info->display, *config, shared_context, True, attrib_list); } else { + int render_type; + if (lwjgl_glXGetFBConfigAttrib(peer_info->display, *config, GLX_RENDER_TYPE, &render_type) != 0) { + throwException(env, "Could not get GLX_RENDER_TYPE attribute"); + return; + } + int context_render_type = (render_type & GLX_RGBA_FLOAT_BIT) != 0 ? GLX_RGBA_FLOAT_TYPE : GLX_RGBA_TYPE; context = lwjgl_glXCreateNewContext(peer_info->display, *config, context_render_type, shared_context, True); } XFree(config); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |