Results 1 to 6 of 6

Thread: Math API?

  1. #1
    Guest

    Math API?

    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.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,595

    Re: Math API?

    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

  3. #3
    Guest

    Re: Math API?

    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"?

  4. #4
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Nov 2010
    Posts
    2,466

    Re: Math API?

    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

  5. #5
    Guest

    Re: Math API?

    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?

  6. #6
    Guest

    Re: Math API?

    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...

Similar Threads

  1. 3D-Math
    By fobru in forum OpenGL: Advanced Coding
    Replies: 10
    Last Post: 08-06-2003, 03:03 AM
  2. Math help
    By el_flipis in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 05-28-2002, 03:57 AM
  3. math
    By in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 04-10-2002, 05:18 AM
  4. Math help
    By fLIPIS in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 01-01-2002, 07:30 AM
  5. Math
    By in forum OpenGL: Basic Coding
    Replies: 19
    Last Post: 07-14-2001, 08:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean