# How to correctly use vtkPixelBufferObject

**URL:** https://discourse.vtk.org/t/how-to-correctly-use-vtkpixelbufferobject/2609
**Category:** Support
**Created:** [February 13, 2020, 3:22pm UTC](https://discourse.vtk.org/t/how-to-correctly-use-vtkpixelbufferobject/2609 "2020-02-13T15:22:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Seun](https://discourse.vtk.org/user_avatar/discourse.vtk.org/seun/32/767_2.png) [@Seun](https://discourse.vtk.org/u/Seun)
#### Post date: [February 13, 2020, 3:22pm UTC](https://discourse.vtk.org/t/how-to-correctly-use-vtkpixelbufferobject/2609/1 "2020-02-13T15:22:04Z")

</div>

Hi everyone,  
I have recently been looking into using vtkPixelBufferObject to perform basic PBO,

- bind
- capture data
- update
- unbind

here’s what I’ve done thus far (if I’m correct)

- a render window to be set as its context

- I explicitly set the object’s size to match the total bytes required for the operations (this being the width x height) - not sure if its necessary to do this as I would assume since the object is bound to the window it ought to implicitly capture its dimension

- a call to Allocate with the parameter total bytes as mentioned above and vtkPixelBufferObject::PACKED\_BUFFER
