icetGLSetReadBuffer(3)

πŸ’– icetGLSetReadBuffer(3) β€” IceT Reference πŸ’–

okay bestie, listen up, this is the icetGLSetReadBuffer page from the IceT Reference and it's lowkey a tiny function but it's doing a LOT for you, so let's go ✨


πŸŽ€ NAME πŸŽ€

icetGLSetReadBuffer β€” set the OpenGL buffer for images, bestie. that's it. that's the job. πŸ¦‹


🌸 Synopsis 🌸

#include <IceTGL.h>

void icetGLSetReadBuffer(   GLenum   mode  );

like, she's small. she's simple. she's iconic. πŸ’…


✨ Description ✨

so here's the vibe: this function picks which OpenGL buffer IceT is gonna read images from so it can composite them. 🫢

once the draw callback (that's the one you set with icetGLDrawCallback) returns, IceT grabs the rendered image out of the OpenGL buffer that mode told it about. and get this β€” that same buffer is ALSO where fully composited images get written back, but only if the ICET_GL_DISPLAY option is turned on. so yeah, it pulls double duty. main character energy fr fr. πŸ‘‘

mode is an OpenGL value that specifies the buffer. it gets passed straight to glReadBuffer and glDrawBuffer. the 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_AUXi identifiers πŸ’«

the current read buffer that's in use is stored in the ICET_GL_READ_BUFFER state variable, and the default value is GL_BACK. so if you don't say anything, that's where she's looking. no cap. 🌈


πŸ’€ Errors πŸ’€

  • ICET_INVALID_OPERATION β€” bestie, icetGLInitialize has not been called for this IceT context. you gotta init first, that's the rule. 😭
  • ICET_INVALID_ENUM β€” mode is not a known OpenGL buffer identifier. she doesn't recognize that name, sorry. πŸ™ˆ

🌟 Warnings 🌟

None.

(yes really, none. a rare peaceful moment. enjoy it 🧚)


πŸ“ Bugs πŸ“

ok so here's the tea: the check of mode is perfunctory. it just checks mode against a list of known buffers. that's it. it does not check to see if the buffer actually exists, and it does not check for any other buffers that might be defined in an OpenGL extension. so like... don't get too comfy. ⭐


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 πŸ‘‘


and that's the whole page, bestie! this gem is from the IceT Reference, dated August 9, 2010 β€” yeah she's an elder but she still ate, and she's still serving πŸ’…πŸ’–βœ¨