Saturday, 8 January 2011

Developer Journal 33


Should I copy the contents of the window to memory or the contents of a view port to memory?

How is the performance of the simulation if I copy the contents of the window on each frame?

Is performance better if I capture the contents less often?

Performance seems quite quick even when I copy the contents of the window into memory each frame.

Each agent can have a pointer to a view port. I can copy the contents of OGRE:Viewport into OGRE::PixelBox and then put OGRE::PixelBox into OGRE::Image. I can then use OGRE::Image to access pixel values. The downside is that this will introduce some OGRE code into my own code. I can abstract this away later.

Another cool thing is that I can save OGRE::Image to a file to check that my robots are receiving the right visual information.

I still need to assign an OGRE::Viewport to each robot.

I'd love to make viewports re-sizable on the fly as I create more viewports but its easier to fix the sizes for now.

Strangely, when I create a viewport by pressing a button to call my new function, with a viewport width or height of less than 1, I get a blank screen.

No comments:

Post a Comment