Drawing big image with ofCam. Optimization possible/necessary?


#1

Hi all,

In a project I am building a virtual telescope. I load a (quite big) static image, draw it to 0/0/0 and move a ofCamera orthogonal to this image. x/y movement simulates turn/tilt, z movement simulates zoom. This all works well, tested on hardware prototype:

DSCN2793_kl

The image is of course big. The bigger it gets, the slower the App runs. This seems logical - still while always draw the whole image (image.draw(0,0)) I of course always show a fraction of it because of the camera.
Now to my question: Do ofCamera/GL/Graphic card already do the best optimizations or will it be of benefit to maybe

  • split the image in let’s say 12 tiles and only draw the ones I actually see
  • use ofxOpenCv’s drawROI() or something silimar

In short: do you have any general ideas on optimization?

Thank you for any hints!
oe


#2

Hi there!

I don’t know about the OF implementation, but doing your tilling system seems to be a good approach.

Depending on the size and ammount of images, maybe also dynamic loading.

And I would use ofTextures with mip-maps to improve the quality.