PDA

View Full Version : OpenGL support for Vector/Matrix Math (similar to directX)



02-09-2004, 11:09 AM
Heya. In DirectX you can just declare some vectors A and B, then add add them by writing:

C = A + B;

Same goes for matrices and just about every operation you could want to apply to them. Does openGL have support like for vector and matrix math operations? Like add, multiply, normalize, invert etc... Is there any GL extensions that provide functionality like:

normalize(vector* dest, vector* src );
cross(vector* dest, vector* srcA, vector* srcB);

chowe6685
02-09-2004, 11:14 AM
not in the way you describe. Opengl can multiply its own internal matrices with glMultMatrix, but you cannot access the result without using glGet which would be very slow. If you need functionality like that you could simple write your own classes