diff --git a/code/CMakeModules/CheckDepends.cmake b/code/CMakeModules/CheckDepends.cmake index e9a186354..9ebf977c8 100644 --- a/code/CMakeModules/CheckDepends.cmake +++ b/code/CMakeModules/CheckDepends.cmake @@ -124,4 +124,4 @@ MACRO(LINK_DEPENDS LIBRARIES MYLIBRARY OTHERLIBRARY SYMBOL) SET(${LIBRARIES} ${${LIBRARIES}} ${${OTHERLIBRARY}}) SET(${OTHERLIBRARY}_LINKED TRUE) ENDIF(MUST_LINK) - NDMACRO(LINK_DEPENDS) +ENDMACRO(LINK_DEPENDS) diff --git a/code/CMakeModules/FindLibwww.cmake b/code/CMakeModules/FindLibwww.cmake index aa76955e1..b739e6c2f 100644 --- a/code/CMakeModules/FindLibwww.cmake +++ b/code/CMakeModules/FindLibwww.cmake @@ -136,9 +136,11 @@ LINK_WWW_LIBRARY(LIBWWWAPP_LIBRARY LIBWWWZIP_LIBRARY HTZLib_inflate) # libwwwxml can be linked to xmlparse or expat LINK_WWW_LIBRARY(LIBWWWXML_LIBRARY LIBXMLPARSE_LIBRARY XML_ParserCreate) -IF(NOT LIBXMLPARSE_LIBRARY_LINKED) +IF(LIBXMLPARSE_LIBRARY_LINKED) + LINK_WWW_LIBRARY(LIBXMLPARSE_LIBRARY EXPAT_LIBRARY XmlInitEncoding) +ELSE(LIBXMLPARSE_LIBRARY_LINKED) LINK_WWW_LIBRARY(LIBWWWXML_LIBRARY EXPAT_LIBRARY XML_ParserCreate) -ENDIF(NOT LIBXMLPARSE_LIBRARY_LINKED) +ENDIF(LIBXMLPARSE_LIBRARY_LINKED) LINK_WWW_LIBRARY(LIBWWWHTTP_LIBRARY LIBMD5_LIBRARY MD5Init) LINK_WWW_LIBRARY(LIBWWWAPP_LIBRARY LIBREGEX_LIBRARY regexec) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp index 6b9edacf3..f13d33c7b 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp @@ -445,7 +445,7 @@ PFNWGLGETEXTENSIONSSTRINGARBPROC nwglGetExtensionsStringARB; #elif defined(NL_OS_UNIX) // Swap control extensions -PFNGLXSWAPINTERVALEXTPROC nglXSwapIntervalEXT; +NEL_PFNGLXSWAPINTERVALEXTPROC nglXSwapIntervalEXT; PFNGLXSWAPINTERVALSGIPROC nglXSwapIntervalSGI; @@ -1429,7 +1429,7 @@ static bool setupGLXEXTSwapControl(const char *glext) CHECK_EXT("GLX_EXT_swap_control"); #if defined(NL_OS_UNIX) && !defined(NL_OS_MAC) - CHECK_ADDRESS(PFNGLXSWAPINTERVALEXTPROC, glXSwapIntervalEXT); + CHECK_ADDRESS(NEL_PFNGLXSWAPINTERVALEXTPROC, glXSwapIntervalEXT); #endif return true; diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_extension.h b/code/nel/src/3d/driver/opengl/driver_opengl_extension.h index 43fb3bc08..a899049b6 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension.h @@ -698,7 +698,7 @@ extern PFNWGLGETEXTENSIONSSTRINGARBPROC nwglGetExtensionsStringARB; // Swap control extensions //=========================== -extern PFNGLXSWAPINTERVALEXTPROC nglXSwapIntervalEXT; +extern NEL_PFNGLXSWAPINTERVALEXTPROC nglXSwapIntervalEXT; extern PFNGLXSWAPINTERVALSGIPROC nglXSwapIntervalSGI; diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h b/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h index e5ab60c8c..3347f7177 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h @@ -376,6 +376,27 @@ typedef GLvoid (APIENTRY * NEL_PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, G typedef GLvoid (APIENTRY * NEL_PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert); #endif +#if defined(NL_OS_MAC) + +// Mac GL extensions + +#elif defined(NL_OS_UNIX) + +// GLX extensions +#ifndef NL_GLX_EXT_swap_control +#define NL_GLX_EXT_swap_control 1 + +#ifndef GLX_EXT_swap_control +#define GLX_SWAP_INTERVAL_EXT 0x20F1 +#define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2 +#endif + +typedef GLint (APIENTRY * NEL_PFNGLXSWAPINTERVALEXTPROC) (Display *dpy, GLXDrawable drawable, GLint interval); + +#endif // NL_GLX_EXT_swap_control + +#endif // NL_OS_MAC + #ifdef __cplusplus } #endif