From: John A. S. <ast...@cr...> - 2011-08-20 16:50:09
|
Hi all; I'm coming out from my cave; I have OpenCL doing some Collisions against meshes. It only took me about 3x as long to do this as expected- openCL looks very like "C" but it's not. Anyway, I'll check it in, and, after some book keeping, it will be active for some development builds. Notes off the top of my head: 1) it needs the Vertex Buffer Objects, which entails enabling: #define SHADERS_2011 and recompiling; 2) some parameters are not yet passed in (avatar radius, double-sided or clockwise triangles) but will be done shortly; the OpenCL code should handle all this correctly when parameters active; 3) Doug added lots of neat stuff for Walk mode; right now this works only for fly and examine modes; now that I know what's going on, converting Dougs' other methods for real walking will be relatively easy. 4) right now, the OpenCL "kernel" is not compiled into the CollisionGPU file; it was easier to write it as a text file and have it loaded; no need to recompile while developing this; (it is on SourceForge for backup purposes, btw) 5) oh - the OpenCL compile is time intensive; I'll move the compile up into the initialization process of FreeWRL, not when it's needed, because one can smash through geometry in the time it takes to compile. 6) and, this is avatar-triangle collision; I have left the quick "boundingBox" tests to the cpu; they work fairly fast; it's the avatar against triangles in large meshes that took lots of processing time. Whew!!! JohnS. |