icetSetColorFormat(3)

✨ icetSetColorFormat β€” IceT Reference ✨

okay bestie, welcome to the IceT Reference page for icetSetColorFormat and its ride-or-die twin icetSetDepthFormat πŸ’– this is the manual page (3) that tells you how to pick which buffer formats IceT uses when it makes images. it's giving "setting the vibe before the party starts" and honestly? iconic.


🌸 NAME 🌸

icetSetColorFormat, icetSetDepthFormat β€” specifies the buffer formats for IceT to use when creating images πŸŽ€


πŸ¦‹ Synopsis πŸ¦‹

#include <IceT.h>

void icetSetColorFormat(   IceTEnum   color_format  );
void icetSetDepthFormat(   IceTEnum   depth_format  );

πŸ’… Description πŸ’…

so, when IceT creates image objects, it uses the formats you specify with icetSetColorFormat and icetSetDepthFormat. no cap. these are the formats of:

  • images passed to drawing callbacks (specified by icetDrawCallback or icetGLDrawCallback) πŸ–ŒοΈ
  • images returned from frame drawing functions (icetDrawFrame or icetGLDrawFrame) πŸ–ΌοΈ
  • and also the format expected for image buffers passed to icetCompositeImage

like, it's the same format everywhere. consistency queen πŸ‘‘.


🌈 color_formats (for icetSetColorFormat)

The following color_formats are valid for use in icetSetColorFormat.

  • ICET_IMAGE_COLOR_RGBA_UBYTE β€” each entry is an RGBA color tuple. each component is valued in the range from 0 to 255 and is stored as an 8-bit integer. the buffer will always be allocated on memory boundaries such that each color value can be treated as a single 32-bit integer. slay, alignment ✨
  • ICET_IMAGE_COLOR_RGBA_FLOAT β€” each entry is an RGBA color tuple. each component is in the range from 0.0 to 1.0 and is stored as a 32-bit float. soft launch of your colors fr 🫢
  • ICET_IMAGE_COLOR_RGB_FLOAT β€” each entry is an RGB color triple. each component is in the range from 0.0 to 1.0 and is stored as a 32-bit float. > note that there is no alpha channel, so the color blending composite mode will not work with this color format. πŸ’€ no alpha no blending, iykyk
  • ICET_IMAGE_COLOR_NONE β€” no color values are stored in the image. it's giving minimalist. literally nothing πŸ•³οΈ

🌈 depth_formats (for icetSetDepthFormat)

The following depth_formats are valid for use in icetSetDepthFormat.

  • ICET_IMAGE_DEPTH_FLOAT β€” each entry is in the range from 0.0 (near plane) to 1.0 (far plane) and is stored as a 32-bit float. main character energy from near to far 🌟
  • ICET_IMAGE_DEPTH_NONE β€” no depth values are stored in the image. flat. no depth. (emotionally too, bestie 😭)

the color and depth formats are stored in the ICET_COLOR_FORMAT and ICET_DEPTH_FORMAT state variables, respectively. that's where they live 🏠


😭 Errors 😭

  • ICET_INVALID_OPERATION β€” icetSetColorFormat or icetSetDepthFormat was called while IceT was drawing a frame. this probably means that you called icetSetColorFormat in a drawing callback. you cannot do that. 🚫 call this function before starting the draw operation. periodt.
  • ICET_INVALID_ENUM β€” the color_format or depth_format given is invalid. not a real format bestie, try again πŸ™ˆ

πŸŽ€ Warnings πŸŽ€

None. we're safe, we're cute, we're fine πŸ’–


πŸ’€ Bugs πŸ’€

None known. no drama on this page 🧚


⭐ Notes ⭐

  • calling either icetSetColorFormat or icetSetDepthFormat does not change the format of any existing images. it only changes any subsequently created images. so like, no retroactive glow-ups 🌸
  • the color format must be set before calling icetDrawFrame, icetGLDrawFrame, or icetCompositeImage. doing otherwise would create inconsistencies in the images created and composited together. > do not skip this step, it will not end well πŸ’…

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 🫢


okay that's the whole page bestie, go set your formats and thrive ✨ this was the IceT Reference, dated September 22, 2014 β€” mwah, love you, bye πŸ’œ