fixes to make the OpenCL cloth demo run on Apple/GPU

This commit is contained in:
erwin.coumans
2011-03-15 22:24:27 +00:00
parent 3615f6d415
commit 21162f77e3
5 changed files with 31 additions and 15 deletions

View File

@@ -30,7 +30,9 @@ static char* spPlatformVendor =
#endif
#ifndef CL_PLATFORM_MINI_CL
#ifdef _WIN32
#include "CL/cl_gl.h"
#endif //_WIN32
#endif
cl_context btOclCommon::createContextFromType(cl_device_type deviceType, cl_int* pErrNum, void* pGLContext, void* pGLDC )
@@ -88,6 +90,7 @@ cl_context btOclCommon::createContextFromType(cl_device_type deviceType, cl_int*
0
};
#ifndef CL_PLATFORM_MINI_CL
#ifdef _WIN32
// If we have a gl context then enable interop
if( pGLContext )
{
@@ -96,6 +99,7 @@ cl_context btOclCommon::createContextFromType(cl_device_type deviceType, cl_int*
cps[4] = CL_WGL_HDC_KHR;
cps[5] = (cl_context_properties)pGLDC;
}
#endif
#endif //CL_PLATFORM_MINI_CL
/* Use NULL for backward compatibility */