Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: matrix C library

  1. #1
    Junior Member Regular Contributor
    Join Date
    Feb 2004
    Location
    Magdeburg, Germany
    Posts
    120

    matrix C library

    Hello

    Is there a matrix 4x4 C library. I need a one with a C interface. Only this little library not a complete framework. Something like the intel SIMD 4x4 Matrix class for C not C++.

    tnx

    Marco

  2. #2
    Advanced Member Frequent Contributor plasmonster's Avatar
    Join Date
    Mar 2004
    Posts
    750

    Re: matrix C library

    Intel has heaps of SSE/SSE2 matrix code in C, with sprinkles of assembly tossed in for good measure.

  3. #3
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,421

    Re: matrix C library

    I have my own library that is also public.
    It contains some functions for matrix multiplications, tranforming vertices, the usual matrix operations

    glhUnProjectf
    glhProjectf
    glhInvertMatrixfv_2
    glhQuickInvertMatrixfv_2
    glhMultiplyMatrixByMatrix4by4f_2
    glhMultiplyMatrixByVector4by4f_SSE_Aligned_1
    The entire Block 12 in the header file...

    www.geocities.com/vmelkon/glhlibrary.html
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •