PDA

View Full Version : gluttimerfunc / fortran / recursive subroutine



PODallaire
09-05-2004, 07:04 AM
Hi,

I'm using the gluttimerfunc to update my graph and I have some problems using it in a recursive subroutine.

PROGRAM MAIN
...
USE timer_update
...
CALL gluttimerfunc(2000_glcuint,timer,0_glcint)
...
END PROGRAM MAIN

MODULE timer_update
IMPLICIT NONE
CONTAINS
RECURSIVE SUBROUTINE timer(selection)
USE opengl_gl
USE opengl_glut
INTEGER(glcint), INTENT(IN OUT) :: selection
CALL update_graph ! Subroutine for updating ...
CALL gluttimerfunc(2000_glcuint,timer,0_glcint)
END SUBROUTINE timer
END MODULE timer_update

When the timer is called in the subroutine, the program just crashes !

Is someone have an idea on that ?

Thanks !

PODallaire

09-05-2004, 03:24 PM
what was your OpenGL question again?

i have to admit my fortran is a bit rusty ;) heck, i didnt know you could use glut with fortran ... incredible!

09-05-2004, 03:26 PM
you might try digging around in this forum:
http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=forum;f=10

09-10-2004, 02:52 AM
i stumbled on this and thought it might be useful to someone using fortran. its from the glut win32 distribution readme-win32.txt.



FORTRAN NOTES:
Bill Mitchell has put considerable effort into getting GLUT to work with different compilers for
Fortran 90. He indicates that you should copy the f90glut.h file to your $(MSDevDir)\..\..\VC98\include\GL directory. Then, just build GLUT as usual. The Fortran 90 interface, f90gl, can be obtained at http://math.nist.gov/f90gl and contains installation instructions and usage examples.