OpenGL Fortran on Windows - Matrix Math

OpenGL Fortran on Windows - Matrix Math

Is there anyone who knows whether matrix calculations could be executed faster using OpenGL routines (e.g.,glMultMatrixf, glRotatef) rather than the intrinsic matmul? We have already checked out Visual Basic and found that even if VB applied DirectX math routines (e.g., D3DXMatrixMultiply), it is still more than twice as slow as optimised Fortran with intrinsic math functions.
An example would be helpful to illustrate any reply. Thanks in advance for any assistance.

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

You don't present enough information to answer. Intel MKL is likely to be the fastest, if your matrix dimensions are appropriate (large enough). CVF 6.6 does an excellent job expanding MATMUL() with small fixed dimensions in line.

In general you are better off using the GL/D3D transform calls. On machines with accelerated graphics, the matrix calculations will be performed on the adapter which should be faster than using the host cpu. Also using 3D routines results in less data that needs to be sent to the adapter. e.g. glRotatef sends 4 floats to the pipe vs glLoadMatrixf with 16 floats.


Leave a Comment

Please sign in to add a comment. Not a member? Join today