diff --git a/Demos/ParticlesOpenCL/AMD/CMakeLists.txt b/Demos/ParticlesOpenCL/AMD/CMakeLists.txt index 582fc6fd7..727006017 100644 --- a/Demos/ParticlesOpenCL/AMD/CMakeLists.txt +++ b/Demos/ParticlesOpenCL/AMD/CMakeLists.txt @@ -6,6 +6,8 @@ ${BULLET_PHYSICS_SOURCE_DIR}/Demos/SharedOpenCL ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL ) +ADD_DEFINITIONS(-DUSE_AMD_OPENCL) + IF (INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) INCLUDE_DIRECTORIES( $ENV{==ATISTREAMSDKROOT=}/include ) IF (CMAKE_CL_64) diff --git a/Demos/ParticlesOpenCL/shaders.cpp b/Demos/ParticlesOpenCL/shaders.cpp index 644aa8147..eea1f8ade 100644 --- a/Demos/ParticlesOpenCL/shaders.cpp +++ b/Demos/ParticlesOpenCL/shaders.cpp @@ -14,8 +14,14 @@ void main() float dist = length(posEye); gl_PointSize = pointRadius * (pointScale / dist); // gl_PointSize = 4.0; - - gl_TexCoord[0] = gl_MultiTexCoord0; +//hack around latest AMD graphics cards having troubles with point sprite rendering +//the problem is still unresolved on the 5870 card, and results in a black screen +//see also http://forums.amd.com/devforum/messageview.cfm?catid=392&threadid=129431 +#ifdef USE_AMD_OPENCL + gl_TexCoord = gl_MultiTexCoord0; +#else + gl_TexCoord[0] = gl_MultiTexCoord0; +#endif gl_Position = gl_ModelViewProjectionMatrix * vec4(gl_Vertex.xyz, 1.0); gl_FrontColor = gl_Color;