mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 15:14:35 +00:00
* Adjustment: Initial CMake reworking.
This commit is contained in:
parent
516163fd5d
commit
d7cdf54661
5394 changed files with 2615532 additions and 8711 deletions
41
Engine/lib/bullet/test/clew/clewTest.cpp
Normal file
41
Engine/lib/bullet/test/clew/clewTest.cpp
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
// clewTest.cpp : Defines the entry point for the console application.
|
||||
//
|
||||
|
||||
#include "clew.h"
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int result = -1;
|
||||
|
||||
#ifdef _WIN32
|
||||
const char* cl = "OpenCL.dll";
|
||||
#elif defined __APPLE__
|
||||
const char* cl = "/System/Library/Frameworks/OpenCL.framework/Versions/Current/OpenCL";
|
||||
#else//presumable Linux?
|
||||
//linux (tested on Ubuntu 12.10 with Catalyst 13.4 beta drivers, not that there is no symbolic link from libOpenCL.so
|
||||
const char* cl = "libOpenCL.so.1";
|
||||
result = clewInit(cl);
|
||||
if (result != CLEW_SUCCESS)
|
||||
{
|
||||
cl = "libOpenCL.so";
|
||||
} else
|
||||
{
|
||||
clewExit();
|
||||
}
|
||||
#endif
|
||||
result = clewInit(cl);
|
||||
if (result!=CLEW_SUCCESS)
|
||||
printf("clewInit failed with error code %d\n",result);
|
||||
else
|
||||
{
|
||||
printf("clewInit succesfull using %s\n",cl);
|
||||
|
||||
//some test and then
|
||||
clewExit();
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue