View Full Version : successive display of multiple items 3D with views

12-29-2012, 02:45 PM
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 ...

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
// Return success
return 0;

12-29-2012, 05:15 PM
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.

Dark Photon
12-29-2012, 06:46 PM
* 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.

12-30-2012, 08:19 AM
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)

12-30-2012, 04:55 PM
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)