---
name: "icetGLSetReadBuffer"
section: "3"
platform: "linux"
package: "paraview"
version: "5.13.2+dfsg-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/icetGLSetReadBuffer"
---

# icetGLSetReadBuffer(3)

## NAME

**icetGLSetReadBuffer -- set OpenGL buffer for images**

## Synopsis

**#include \<IceTGL.h\>**

| | | |
| --- | --- | --- |
| void **icetGLSetReadBuffer**( | GLenum | *mode* ); |

## Description

**Set the OpenGL buffer from which to read images to composite. After the** **draw callback (specified by icetGLDrawCallback)** **returns, IceT**  **grabs the rendered image from the OpenGL buffer specified by** *mode***.** **This buffer is also used to write back fully composited** **images if the ICET\_GL\_DISPLAY** **option is on.**

*mode* **is an OpenGL value that specifies the buffer. It is passed** **to glReadBuffer** **and glDrawBuffer.** **Accepted values are GL\_FRONT,** **GL\_BACK,** **GL\_LEFT,** **GL\_RIGHT,** **GL\_FRONT\_LEFT,** **GL\_FRONT\_RIGHT,** **GL\_BACK\_LEFT,** **GL\_BACK\_RIGHT,** **and any of the GL\_AUX***i* **identifiers.**

**The current read buffer used is stored in the** **ICET\_GL\_READ\_BUFFER** **state variable. The default value is** **GL\_BACK.**

## Errors

- **ICET\_INVALID\_OPERATION**

   **icetGLInitialize** **has not been called for this IceT context.**

- **ICET\_INVALID\_ENUM**

   *mode* **is not a known OpenGL buffer identifier.**

## Warnings

**None.**

## Bugs

**The check of** *mode* **is perfunctory. It just checks** *mode* **against a list of known buffers. It does not check to see if the buffer** **actually exists or for any other buffers that might be defined in an** **OpenGL extension.**

## Copyright

**Copyright (C)2010 Sandia Corporation**

**Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the** **U.S. Government retains certain rights in this software.**

**This source code is released under the New BSD License.**

## See Also

*icetGLDrawCallback***(3)**
