[GLUT QUESTION]

[GLUT QUESTION]

Post by Pincon Brun » Wed, 17 Nov 1999 04:00:00



Hi all,

  I am new to OpenGL with GLUT programming (via the
 Fortran 90 interface) so my question is perhaps a
 naive one.

   I have wrote a program which draw some surfaces
 triangulations (and I am very happy to leave avs !).

   Now I want to use it in a bigger program (which do
 some transformations on meshes) simply by transform it
 in a subroutine but I have a problem
 with glutMainLoop() : if I have understood the only
 manner to quit the glut control is by the exit function
(stop in Fortran) but in this way the complete program
 will exit (not only glut). So the only way that I have
 found to deal with this restriction is to write a file
 (with the mesh that I want display) then call my graphic
 program via the system function (which is not Fortran
 standard but easily usable via an interface). Another
 possibility is to structure my bigger program around
 glut but it seems not logical.

   Perhaps I have not understood the glutMainLoop() function
 and there is a possibility to quit the glut control more
 gracefully than to exit the complete program. Perhaps the
 C exit function have some possibilities that the stop
 Fortran haven't (yes exit may return a value and not stop).  

   Thanks for any hint.
  Bruno

  ---------------------------------------------------
  Bruno Pin?on   IECN / ESIAL / UHP (Nancy 1)
                 tl   : 03 83 91 26 80

 
 
 

1. GLUT questions

Hi,

It seems that GLUT is always initiated like this:

int main(int argc, char **argv)
{
  glutInit(&argc, argv);
  glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
  glutCreateWindow("window name");
  glutDisplayFunc(display);
  ......

My questions are:

(1) Can I put the above four initiating lines in a subroutine? If yes,
how do I pass the parameters (&argc, argv)?

(2) What kind of options can I put in the command line for this
initiation process (glutInit) to be effective?

Many thanks,
Gang Chen

2. Motion capture files needed

3. GLUT question

4. open gl display problems with amd k6-2

5. OpenGL and GLUT question

6. cad file presentation.

7. CodeWarrior and OpenGL: GLUT question

8. Student Intrested in Buying 3ds

9. more GLUT questions

10. BC++&GLUT question

11. a simple glut question.....

12. GLUT question

13. newbie GLUT question