# Accessing the Backbuffer

**URL:** <https://openrndr.discourse.group/t/accessing-the-backbuffer/234>\
**Category:** How to?\
**Created:** [April 24, 2021, 2:29am UTC](https://openrndr.discourse.group/t/accessing-the-backbuffer/234 "2021-04-24T02:29:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![templodespejos](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/templodespejos/32/282_2.png) [@templodespejos](https://openrndr.discourse.group/u/templodespejos)\
**Post date:** [April 24, 2021, 2:29am UTC](https://openrndr.discourse.group/t/accessing-the-backbuffer/234/1 "2021-04-24T02:29:39Z")

</div>

TL;DR: Is something similar to Processing’s load/updatePixels functionality without a structure that requires declaring the default display as PImage/PGraphics available in OPENRNDR?

I wonder this in part because of the line in the guide under Headless Applications that goes like this:

> Headless applications cannot draw on the backbuffer, because there is no backbuffer. In order to draw you need to create a [RenderTarget](https://guide.openrndr.org/advancedDrawing/renderTargets.html) and draw on there.

Reading some source code mainly looking for a way to read pixel color values from the (assumed) backing colorbuffer to which a straight-forward sketch draws (not by user-defined render targets), I stumbled upon a few things:

> interface ProgramRenderTarget

> Driver.instance.activeRenderTarget

I tried with activeRenderTarget but had no luck, for it carried no colorBuffers and throwed an index out of bounds error.

And as to implementing something from the ProgramRenderTarget interface… Well, I’m kind of clueless. I don’t know if a RenderTarget that wraps around the backbuffer is what I need, though it sounds really interesting and I’d really like to know more about it.

Thanks for stopping by.

---

<div class="post-metadata">

**Author:** ![abe](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/abe/32/700_2.png) [@abe](https://openrndr.discourse.group/u/abe)\
**Post date:** [April 24, 2021, 7:22am UTC](https://openrndr.discourse.group/t/accessing-the-backbuffer/234/2 "2021-04-24T07:22:25Z")

</div>

Hi 🙂 What are you trying to do? Change pixels on the screen, draw a shape and access the pixels of the drawing? without creating a colorBuffer?

With a colorBuffer there are examples at [Color buffers - OPENRNDR GUIDE](https://guide.openrndr.org/advancedDrawing/colorbuffers.html#color-buffer-shadows)

Are you running your program headless? (on a server)

---

<div class="post-metadata">

**Author:** ![edwin](https://avatars.discourse-cdn.com/v4/letter/e/73ab20/32.png) [@edwin](https://openrndr.discourse.group/u/edwin)\
**Post date:** [April 24, 2021, 8:55am UTC](https://openrndr.discourse.group/t/accessing-the-backbuffer/234/3 "2021-04-24T08:55:13Z")

</div>

There is currently no way to access the contents of the back buffer directly. Indeed `ProgramRenderTarget` is the closest you can get to it. Since we don’t have anything in place to represent non-texture frame buffer attachments that’s kind of where it ends now.

Curious to hear use cases.
