   Verts for Collision
  Hey all,I'm working on putting Collision into my engine, but I need transformed verts to do the collision with.My first instinct is to get teh Modelview matrix and transform my temp verts by the modelview matrix since that puts them in Camera Space and do some collision based on that.Is this a good way or am I missing something about OpenGL that may not be so obvious.Thanks guys,Jinroh   
  Usually for 3D games, vertices are transformed to world space and then collision is performed. Some objects are not moveable and are already in world space so vertices for these need not be processed. This saves CPU time.It is also a good idea, depending on your platform, to use certain CPU features like SSE. It might be a good idea to run it in another thread.That's what certain physics engines do, such as ODE, Bullet, Newton, PhysX, Havoc. Note that I'm not sure if all of those can do SSE and multithreading. Read their respective manual. I have used ODE and Newton and prefer Newton.Quote:Is this a good way or am I missing something about OpenGL that may not be so obvious.There is a certain feature called feedback transform. I assume certain physics libraries like PhysX can use it to do all their calculations on the GPU.   ;  Well the thing is I already have the collision code, well coded, I coded it in the software version of my engine. I'm just porting it over to OpenGL and need those World/Cam coords.OpenGL doesn't just give them to me so I was wondering if there was an easy way to get to them other than manually transforming them based on the ModelView Matrix myself. Which seems redundant, but possibly necessary. I'll take a look at the feedback transform and see what I can do. ^_^Thanks V-Man.Edit: Well it looks like the feedback transform uses an extension which I don't like.I figured it out. ^_^ Thanks for the help guys.[Edited by - Jinroh on May 28, 2010 10:59:52 PM];  Well, OpenGL is for rendering however, it is possible to do physics using the GPU. CUDA and OpenCL is about running ordinary code on the GPU. You can use them to run your physics code on the GPU. Some libraries like PhysX do exactly that. I believe Havoc does it as well now.   