fix saving image via right click menu in state inspector
add simple support to export buffers to disk.
cmake: Avoid target_compile_definitions.

So that it can be build with cmake 2.8.10.
Merge pull request #283 from urkle/export_buffer

add simple support to export buffers to disk.
Merge pull request #282 from urkle/fix_image_save

fix saving image via right click menu in state inspector