   Hardware support for Matrices?
  OpenGL does its matrix math on my video card all the timeit'd be nice if my physics code could benefit from hardware acceleration toorather than use my clunky matrix structs on my cpuanyone know how to set this up?   
  Matrix math on CPU is very fast due to 3DNow!/SSE instructions set so don't worry about it - it's comparable in speed to GPU.But you can do some physics calculation on GPU - but obly if you don't need feedback to CPU - then use vertex haders   ;  Well, I suppose you could goglPushMatrix();glLoadIdentity();And then use glLoadMatrix() and glMultMatrix() to perform operations with your own matrices. Then you could read the results back with glGetIntegerv();But I don't think you want to do that. Reading back the matrix from OpenGL entails a performance hit, and you really wouldn't be gaining much. I'd just do your matrix calculations in software.   ;Quote:Original quote by jykWell, I suppose you could goglPushMatrix();glLoadIdentity();And then use glLoadMatrix() and glMultMatrix() to perform operations with your own matrices. Then you could read the results back with glGetIntegerv();But I don't think you want to do that. Reading back the matrix from OpenGL entails a performance hit, and you really wouldn't be gaining much. I'd just do your matrix calculations in software.This would *DEFINATELY* be a bad idea.  Not only would you not gain much, you would be taking a backwards swandive into a concrete river.;Quote:This would *DEFINATELY* be a bad idea.I hope you realize I was *not* recommending it :-)   ;  i havent heard of 3DNow!/SSEis there some special library i should be using to take advantage of that?   ;Quote:Original post by joanusdmentiayou would be taking a backwards swandive into a concrete river.Haha, thats a great saying. I'm gonna have to remember that one. [grin]   ;Quote:Original post by haphazardlynamedOpenGL does its matrix math on my video card all the timeit'd be nice if my physics code could benefit from hardware acceleration toorather than use my clunky matrix structs on my cpuanyone know how to set this up?Some sort of vector processing unit should do the job. Look at some of the more advanced features of the P3/Athlon chips like SSE. I think there's some articles in GameDev about it. Remember to provide a fallback for chips without!You'll need to know assembler, but a good compiler might take advantage of the extra features anyway.   ;Quote:Original post by jykWell, I suppose you could goglPushMatrix();glLoadIdentity();And then use glLoadMatrix() and glMultMatrix() to perform operations with your own matrices. Then you could read the results back with glGetIntegerv();I doubt functions like glMultMatrix that operate directly on the modelview or projection matrices are actually performed on the card, rather I'd expect them to be performed on the CPU and the result sent to the card.   ;  "I doubt functions like glMultMatrix that operate directly on the modelview or projection matrices are actually performed on the card, rather I'd expect them to be performed on the CPU and the result sent to the card."Yeah, I'm sure you're right about that.   