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 5 of 5

Thread: successive display of multiple items 3D with views

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2012
    Posts
    8

    successive display of multiple items 3D with views

    hello I'm working on a project opengl. spot to do is to display a set of 3D objects in the form of successive views
    (6 views for each object, for example). For extremely I happened to do the following:
    - Run the program
    - Enter the name of items
    -wait for the visualization views and calculations required
    -> Repeat these steps for the other items (almost 900 objects!)
    So I thought to pass along the names of objects in tabular form in the program
    * Unfortunately I could not do!
    * I await your ideas for this?

    the code used is long enough! it contains :
    - ReadOffFile: read the object from the file and stores its data in a mesh structure
    - Redraw: function that displays the object and make calculations
    - Idle: triggers the display successively views
    - Main: main function
    - Other functions as usual init mainloop ...

    Code :
    int 
    main(int argc, char **argv)
    { 
      // Initialize GLUT 
       GLUTInit(&argc, argv);
       // Parse program arguments
      if (!ParseArgs(argc, argv)) exit(1);  
        // Read file
      mesh = ReadOffFile(filenamme);
      if (!mesh) exit(1); 
      // Run GLUT interface
      GLUTMainLoop();  
    	system("pause"); 
      // Return success 
      return 0;
    }

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,117
    Can you explain a little more. Is you program meant to display one object from several views or multiple objects each from several views? The code you have supplied seems to only display one object.

  3. #3
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,211
    Quote Originally Posted by M77ATTAR View Post
    * Unfortunately I could not do!
    * I await your ideas for this?
    Why could you not do this?

    It's not clear what you're trying to accomplish, much less what problem(s) you had in doing it.

  4. #4
    Junior Member Newbie
    Join Date
    Nov 2012
    Posts
    8
    yes, my current code displays a single object, but thanks to the idle function it displays multiple views. I want that my program displays all the objects in a successive course for each object must display a succession of views. ie: the program reads an array of about 900 object and returns an array of 900 * 16 (16 views for each object)

  5. #5
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,117
    Is each object in its own file? It so, you just need to parse a text file that has the filenames. If they are all in one file you need to parse that file and split the objects into separate meshes. How you parse this file will depend completely on the structure of the file. (Neither are opengl problems)

Tags for this Thread

Posting Permissions

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