# FBO rendering problems in Cinder 0.9.1 on Raspberry Pi 2

**URL:** <https://discourse.libcinder.org/t/fbo-rendering-problems-in-cinder-0-9-1-on-raspberry-pi-2/765>\
**Category:** Using Cinder\
**Created:** [July 11, 2017, 6:39am UTC](https://discourse.libcinder.org/t/fbo-rendering-problems-in-cinder-0-9-1-on-raspberry-pi-2/765 "2017-07-11T06:39:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Callum](https://avatars.discourse-cdn.com/v4/letter/c/5f8ce5/32.png) [@Callum](https://discourse.libcinder.org/u/Callum)\
**Post date:** [July 11, 2017, 6:39am UTC](https://discourse.libcinder.org/t/fbo-rendering-problems-in-cinder-0-9-1-on-raspberry-pi-2/765/1 "2017-07-11T06:39:41Z")

</div>

Hi,

I’m having problems where the FBO is not rendered in my app on Raspberry Pi 2.  
Trying the `samples/_opengl/FboBasic/` sample, I see a grey background with a white square, rather than the rotating cubes that should appear.  
This sample works correctly on the pi with an older version of Cinder (#1bc47a0) from April 2016.

Here is what I have tried:  
I have compiled cinder and the FboBasic sample by following the instructions here, including the `-DCINDER_TARGET_GL=es2-rpi` flag:  
[https://www.libcinder.org/docs/guides/linux-notes/rpi2.html](https://www.libcinder.org/docs/guides/linux-notes/rpi2.html)

I have also tried the experimental OpenGL desktop driver using the `raspi-config` tool, with an increased memory-split of 128mb and 512mb. After changing these settings I made sure to reboot and recompile both Cinder and the FboBasic sample app.  
This resulted in a fatal error on startup:

`graphics_get_display_size failed, returned: -1`

This error was observed with both Cinder 0.9.1 and the older working (#1bc47a0) version.  
`/opt/vc/src/hello_pi/hello_triangle` also failed to start with the error:

`* failed to add service - already in use?`

From this I determined that experimental OpenGL was not the way to go.  
I referred to this thread discussing this error:  
[https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=12581](https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=12581)

Running with Cinder 0.9.1 I get:

```auto
gl_es_load entered...
Extension: GL_OES_compressed_ETC1_RGB8_texture
Extension: GL_OES_compressed_paletted_texture
Extension: GL_OES_texture_npot
Extension: GL_OES_depth24
Extension: GL_OES_vertex_half_float
Extension: GL_OES_EGL_image
Extension: GL_OES_EGL_image_external
Extension: GL_EXT_discard_framebuffer
Extension: GL_OES_rgb8_rgba8
Extension: GL_OES_depth32
Extension: GL_OES_mapbuffer
Extension: GL_EXT_texture_format_BGRA8888
Extension: GL_APPLE_rgb_422
Extension: GL_EXT_debug_marker
gl_es_2_0_ext_load: SUCCESSFUL! | 9 procs loaded
gl_es_load: SUCCESSFUL
|warning| static void cinder::gl::TextureBase::getInternalFormatInfo(GLint, GLenum *, GLenum *, bool *, bool *, bool *)[435] Unknown internalFormat:GL_DEPTH_COMPONENT24
|warning| static void cinder::gl::TextureBase::getInternalFormatInfo(GLint, GLenum *, GLenum *, bool *, bool *, bool *)[435] Unknown internalFormat:GL_DEPTH_COMPONENT24
Mouse and keyboard input successfully initialized

```

The difference compared to the output under the older version of cinder is in these two warnings:

```auto
|warning| static void cinder::gl::TextureBase::getInternalFormatInfo(GLint, GLenum *, GLenum *, bool *, bool *, bool *)[435] Unknown internalFormat:GL_DEPTH_COMPONENT24
|warning| static void cinder::gl::TextureBase::getInternalFormatInfo(GLint, GLenum *, GLenum *, bool *, bool *, bool *)[435] Unknown internalFormat:GL_DEPTH_COMPONENT24

```

From looking at the cinder code, it seems to be related to the `CINDER_GL_ES_2` symbol.  
I tried compiling with `CINDER_GL_ES_2=1` but there was no change.

I made sure to run

```auto
sudo apt-get update
sudo apt-get dist-upgrade
sudo rpi-update

```

I’m using a Raspberry Pi 2, running Raspbian GNU/Linux 8 (jessie) also known as Pixel.  
Running `uname -a` gives:

```auto
Linux raspberrypi 4.9.36-v7+ #1015 SMP Thu Jul 6 16:14:20 BST 2017 armv7l GNU/Linux

```

Commands are run from a terminal in the desktop environment (after running `startx`).

Any help would be much appreciated.  
Callum.

---

<div class="post-metadata">

**Author:** ![petros](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/petros/32/26_2.png) [@petros](https://discourse.libcinder.org/u/petros)\
**Post date:** [July 11, 2017, 7:26am UTC](https://discourse.libcinder.org/t/fbo-rendering-problems-in-cinder-0-9-1-on-raspberry-pi-2/765/2 "2017-07-11T07:26:42Z")

</div>

Hey,

try this PR [https://github.com/cinder/Cinder/pull/1871](https://github.com/cinder/Cinder/pull/1871). Should fix the issue for you.

Cheers,  
Petros

---

<div class="post-metadata">

**Author:** ![Callum](https://avatars.discourse-cdn.com/v4/letter/c/5f8ce5/32.png) [@Callum](https://discourse.libcinder.org/u/Callum)\
**Post date:** [July 11, 2017, 11:54pm UTC](https://discourse.libcinder.org/t/fbo-rendering-problems-in-cinder-0-9-1-on-raspberry-pi-2/765/3 "2017-07-11T23:54:15Z")

</div>

That fixes it, all resolved thanks!
