PDA

View Full Version : Math API?



09-06-2001, 09:49 AM
Just wondering why OpenGL doesn't expose/provide an API for 3D math-related structures and operations such as vectors, matrices, scaling, normalizing, cross-products, etc.

mikael_aronsson
09-06-2001, 10:13 AM
Hi !

I guess it's because OpenGL is a rendering API and not designed to manage geometry at any higher level, this is better done in software anyway as it would be difficult to make any geometry operations outside the rendering pipeline work in an efficient way on OpenGL hardware.

Just a guess though, I have no idea for the exact reason.

Mikael

09-06-2001, 10:18 AM
Originally posted by mikael_aronsson:
Hi !

I guess it's because OpenGL is a rendering API and not designed to manage geometry at any higher level, this is better done in software anyway as it would be difficult to make any geometry operations outside the rendering pipeline work in an efficient way on OpenGL hardware.

Mikael

Surely though, OpenGL implementations must do this sort of math internally. And since OpenGL programs often have to do the same math, why wouldn't OpenGL provide this API?

In any case, is there a popular API out there that provides this sort of functionality? Or do most OpenGL programmers just "roll their own"?

zed
09-06-2001, 07:27 PM
this has been discussed often in these forums
basically its gonna be very slow, quick to do the calculations but slow for the card to give back the results of the calculations to you

09-07-2001, 10:36 AM
Originally posted by zed:
basically its gonna be very slow, quick to do the calculations but slow for the card to give back the results of the calculations to you

Who says the calculations have to be done in hardware by the card? Or is that some sort of stipulation or requirement of the OpenGL spec?

09-07-2001, 12:36 PM
Most people in this forum feel and understand your concern, beginner. I think it is a matter of where the line is drawn. GL is graphics library, so it provides a set of APIs to draw stuff onto the framebuffer. Why should it concern of cross product or determinant which are not required to draw a triangle on the screen?
You may also argue DirectX should be called Direct3D instead... http://www.opengl.org/discussion_boards/ubb/eek.gif