diff --git a/code/nel/include/nel/misc/types_nl.h b/code/nel/include/nel/misc/types_nl.h index d27fc4b48..f1ed871fc 100644 --- a/code/nel/include/nel/misc/types_nl.h +++ b/code/nel/include/nel/misc/types_nl.h @@ -364,6 +364,10 @@ typedef unsigned int uint; // at least 32bits (depend of processor) #include inline void *aligned_malloc(size_t size, size_t alignment) { return _aligned_malloc(size, alignment); } inline void aligned_free(void *ptr) { _aligned_free(ptr); } +#elif defined(NL_OS_MAC) +// under Mac OS X, malloc is already aligned for SSE and Altivec (16 bytes alignment) +inline void *aligned_malloc(size_t size, size_t alignment) { return malloc(size); } +inline void aligned_free(void *ptr) { free(ptr); } #else #include inline void *aligned_malloc(size_t size, size_t alignment) { return memalign(alignment, size); } 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 aee3e74bb..1a660f9c7 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp @@ -450,14 +450,14 @@ PFNGLGETOCCLUSIONQUERYIVNVPROC nglGetOcclusionQueryivNV; PFNGLGETOCCLUSIONQUERYUIVNVPROC nglGetOcclusionQueryuivNV; // ARB_occlusion_query -PFNGLGENQUERIESPROC nglGenQueriesARB; -PFNGLDELETEQUERIESPROC nglDeleteQueriesARB; -PFNGLISQUERYPROC nglIsQueryARB; -PFNGLBEGINQUERYPROC nglBeginQueryARB; -PFNGLENDQUERYPROC nglEndQueryARB; -PFNGLGETQUERYIVPROC nglGetQueryivARB; -PFNGLGETQUERYOBJECTIVPROC nglGetQueryObjectivARB; -PFNGLGETQUERYOBJECTUIVPROC nglGetQueryObjectuivARB; +PFNGLGENQUERIESARBPROC nglGenQueriesARB; +PFNGLDELETEQUERIESARBPROC nglDeleteQueriesARB; +PFNGLISQUERYARBPROC nglIsQueryARB; +PFNGLBEGINQUERYARBPROC nglBeginQueryARB; +PFNGLENDQUERYARBPROC nglEndQueryARB; +PFNGLGETQUERYIVARBPROC nglGetQueryivARB; +PFNGLGETQUERYOBJECTIVARBPROC nglGetQueryObjectivARB; +PFNGLGETQUERYOBJECTUIVARBPROC nglGetQueryObjectuivARB; // GL_EXT_framebuffer_object PFNGLISRENDERBUFFEREXTPROC nglIsRenderbufferEXT; @@ -1397,14 +1397,14 @@ static bool setupARBOcclusionQuery(const char *glext) CHECK_EXT("ARB_occlusion_query"); #ifndef USE_OPENGLES - CHECK_ADDRESS(PFNGLGENQUERIESPROC, glGenQueriesARB); - CHECK_ADDRESS(PFNGLDELETEQUERIESPROC, glDeleteQueriesARB); - CHECK_ADDRESS(PFNGLISQUERYPROC, glIsQueryARB); - CHECK_ADDRESS(PFNGLBEGINQUERYPROC, glBeginQueryARB); - CHECK_ADDRESS(PFNGLENDQUERYPROC, glEndQueryARB); - CHECK_ADDRESS(PFNGLGETQUERYIVPROC, glGetQueryivARB); - CHECK_ADDRESS(PFNGLGETQUERYOBJECTIVPROC, glGetQueryObjectivARB); - CHECK_ADDRESS(PFNGLGETQUERYOBJECTUIVPROC, glGetQueryObjectuivARB); + CHECK_ADDRESS(PFNGLGENQUERIESARBPROC, glGenQueriesARB); + CHECK_ADDRESS(PFNGLDELETEQUERIESARBPROC, glDeleteQueriesARB); + CHECK_ADDRESS(PFNGLISQUERYARBPROC, glIsQueryARB); + CHECK_ADDRESS(PFNGLBEGINQUERYARBPROC, glBeginQueryARB); + CHECK_ADDRESS(PFNGLENDQUERYARBPROC, glEndQueryARB); + CHECK_ADDRESS(PFNGLGETQUERYIVARBPROC, glGetQueryivARB); + CHECK_ADDRESS(PFNGLGETQUERYOBJECTIVARBPROC, glGetQueryObjectivARB); + CHECK_ADDRESS(PFNGLGETQUERYOBJECTUIVARBPROC, glGetQueryObjectuivARB); #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 dba5facfb..868a0eaf4 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension.h @@ -744,14 +744,14 @@ extern PFNGLGETOCCLUSIONQUERYUIVNVPROC nglGetOcclusionQueryuivNV; // ARB_occlusion_query //================================== -extern PFNGLGENQUERIESPROC nglGenQueriesARB; -extern PFNGLDELETEQUERIESPROC nglDeleteQueriesARB; -extern PFNGLISQUERYPROC nglIsQueryARB; -extern PFNGLBEGINQUERYPROC nglBeginQueryARB; -extern PFNGLENDQUERYPROC nglEndQueryARB; -extern PFNGLGETQUERYIVPROC nglGetQueryivARB; -extern PFNGLGETQUERYOBJECTIVPROC nglGetQueryObjectivARB; -extern PFNGLGETQUERYOBJECTUIVPROC nglGetQueryObjectuivARB; +extern PFNGLGENQUERIESARBPROC nglGenQueriesARB; +extern PFNGLDELETEQUERIESARBPROC nglDeleteQueriesARB; +extern PFNGLISQUERYARBPROC nglIsQueryARB; +extern PFNGLBEGINQUERYARBPROC nglBeginQueryARB; +extern PFNGLENDQUERYARBPROC nglEndQueryARB; +extern PFNGLGETQUERYIVARBPROC nglGetQueryivARB; +extern PFNGLGETQUERYOBJECTIVARBPROC nglGetQueryObjectivARB; +extern PFNGLGETQUERYOBJECTUIVARBPROC nglGetQueryObjectuivARB; #ifdef NL_OS_WINDOWS