I’m working on molecular dynamics simulation, with more than 1 000 000 atom objects (C++, integrated with CUDA).
I have defined couple Camera objects (Position, Eye, Perspective, Near plane, Far plane, screen width and height)…
Calculation of 1 step of simulation takes time and after each step i need to capture images from all cameras…
Any ideas how to solve this problem?
I found an example of TGA image capturing, integrated with GLUT.
This works good but only for one camera (another camera can have different screen width/height, perspective… So i need one window for one camera (more glutCreateWindow calls) and i don’t know how to solve stuff about static methods for glutDialsFunc and glutReshapeFunc on more windows)
Is it possible to do it this way:
- Initialize one window
When TakeScreenShots() is called:
2) Draw atoms in the scene
- Resize window to camera width/height
- Setup perspective, near and far plane
- Move camera to position and camera look
- Take screenshot.
- Go to 3 for each camera
Thanks for any ideas and help …