# Fbo format samples

**URL:** <https://discourse.libcinder.org/t/fbo-format-samples/1178>\
**Category:** Using Cinder\
**Created:** [May 30, 2018, 1:25am UTC](https://discourse.libcinder.org/t/fbo-format-samples/1178 "2018-05-30T01:25:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![colin](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/colin/32/604_2.png) [@colin](https://discourse.libcinder.org/u/colin)\
**Post date:** [May 30, 2018, 1:25am UTC](https://discourse.libcinder.org/t/fbo-format-samples/1178/1 "2018-05-30T01:25:00Z")

</div>

Hello,  
I want to clear texture to Fbo without samples and use format.samples() after.  
Idea is to load image, draw foreground and save image recursively without bad quality !

Is it possible ?

Thanks to share !

C.

---

<div class="post-metadata">

**Author:** ![felixfaire](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/felixfaire/32/168_2.png) [@felixfaire](https://discourse.libcinder.org/u/felixfaire)\
**Post date:** [May 30, 2018, 8:55am UTC](https://discourse.libcinder.org/t/fbo-format-samples/1178/2 "2018-05-30T08:55:59Z")

</div>

Hi Colin.

I’m not sure I understand exactly what you are trying to achieve. The .samples() configuration in the Format specifies how many multisamples to use when _drawing in_ to the Fbo to get smooth lines etc with Multi Sample Anti Aliasing (MSAA).

I think you can only set the samples on the Fbo at creation (using the format object) so trying to clear an Fbo without any MSAA samples and then recreating it with samples doesn’t sound like it will be useful to you.

if you want to save the contents of an fbo to disk you can use something like this (from memory so untested):

```
const auto savePath = getSaveFilePath(); // Remember to add .png or .jpg to the filename
writeImage(savePath, mFbo->getColorTexture()->createSource());

```

Could you elaborate a bit more on what exactly you are trying to do?
