icetGet(3)

πŸ’« NAME πŸ’«

icetGet β€” get an IceT state parameter ✨

Okay bestie, this is the icetGet(3) page from the IceT Reference and we are going to have a time with it. Buckle up, we're in part 1 of 2 πŸ’–


πŸ“œ Synopsis πŸ“œ

#include <IceT.h>

void icetGetDoublev(   IceTEnum       pname,
                       IceTDouble *   params  );

void icetGetFloatv(   IceTEnum      pname,
                      IceTFloat *   params  );

void icetGetIntegerv(   IceTEnum    pname,
                        IceTInt *   params  );

void icetGetBooleanv(   IceTEnum        pname,
                        IceTBoolean *   params  );

void icetGetEnumv(   IceTEnum     pname,
                     IceTEnum *   params  );

void icetGetBitFieldv(   IceTEnum         pname,
                         IceTBitField *   params  );

void icetGetPointerv(   IceTEnum      pname,
                        IceTVoid **   params  );

πŸ¦‹ Description πŸ¦‹

So here's the vibe: just like OpenGL, IceT runs on a big ol' state machine. And also just like OpenGL, you can pull those state parameters back out again β€” that's literally what the icetGet functions are for πŸ’…

Every one of these functions takes a symbolic constant, pname, which is the lil name tag for the state parameter you wanna retrieve. And they each also take an array, params, which gets filled up with the values sitting in pname. πŸŽ€

⚠️ Bestie, listen: it is the calling application's responsibility to make sure params is big enough to hold all the data. IceT is not checking that for you. Size it right or perish πŸ’€

✨ State Parameters ✨

Okay so here's the whole list of what's actually valid for pname, plus what each one even means. No skipping, we're doing all of them 🫢

ICET_BACKGROUND_COLOR

The color that IceT is currently assuming is the background color. It's an RGBA value stored as four floating point values. This one gets set to whichever of these happened:

  • the last value you passed to icetDrawFrame or icetCompositeImage,
  • the OpenGL background color, if icetGLDrawFrame was called,
  • or black, for color blending.

(And don't stress β€” the correct background color gets restored later. It's giving responsible πŸ’…)

ICET_BACKGROUND_COLOR_WORD

Literally the same as ICET_BACKGROUND_COLOR, except each component is stored as 8-bit RGBA values and packed into a 4-byte integer. The whole point? Speed. You can rapidly fill the background of color buffers with it. Slay πŸƒβ€β™€οΈπŸ’¨

ICET_BLEND_TIME

The total time, in seconds, spent doing color blending of images during the last call to icetDrawFrame, icetCompositeImage, or icetGLDrawFrame. Stored as a double. And plot twist β€” an alias for this value is ICET_COMPARE_TIME πŸ‘―

ICET_BUFFER_READ_TIME

The total time, in seconds, spent copying buffer data and reading from OpenGL buffers during the last call to icetDrawFrame, icetCompositeImage, or icetGLDrawFrame. Stored as a double.

ICET_BUFFER_WRITE_TIME

The total time, in seconds, spent writing to OpenGL buffers during the last call to icetGLDrawFrame. It's always set to 0.0 after a call to icetDrawFrame or icetCompositeImage. Stored as a double.

ICET_BYTES_SENT

The total number of bytes sent by the calling process for transferring image data during the last call to icetDrawFrame, icetCompositeImage, or icetGLDrawFrame. Stored as an integer.

ICET_COLLECT_TIME

The total time spent collecting image fragments to display processes during the last call to icetDrawFrame, icetCompositeImage, or icetGLDrawFrame. Gathering the girlies, essentially πŸ’

ICET_COLOR_FORMAT

The color format of images to be created by the rendering subsystem and composited by IceT. Use icetSetColorFormat to set the color format. And use icetImageGetColorFormat to safely get the color format for a particular image πŸ‘‘

ICET_COMPARE_TIME

The total time, in seconds, spent performing Z comparisons of images during the last call to icetDrawFrame, icetCompositeImage, or icetGLDrawFrame. Stored as a double. An alias for this value is ICET_BLEND_TIME πŸ‘―

ICET_COMPOSITE_MODE

The composite mode set by icetCompositeMode. A single entry, stored as an IceTEnum.

ICET_COMPOSITE_ORDER

The order in which images are to be composited, if ICET_ORDERED_COMPOSITE is enabled and the current strategy supports ordered compositing. This parameter contains ICET_NUM_PROCESSES entries, and its value gets set with icetCompositeOrder.

Here's the tea: if the element at index i in the array is set to j, then there are i images "on top" of the image generated by process j. Stacking, but make it math πŸ₯ž

ICET_COMPOSITE_TIME

The total time, in seconds, spent compositing during the last call to icetDrawFrame, icetCompositeImage, or icetGLDrawFrame. It's equal to ICET_TOTAL_DRAW_TIME - ICET_RENDER_TIME - ICET_BUFFER_READ_TIME - ICET_BUFFER_WRITE_TIME. Stored as a double.

ICET_COMPRESS_TIME

The total time, in seconds, spent compressing image data using active pixel encoding during the last call to icetDrawFrame, icetCompositeImage, or icetGLDrawFrame. Stored as a double.

ICET_DATA_REPLICATION_GROUP

An array of process ids. There are ICET_DATA_REPLICATION_GROUP_SIZE entries in the array. IceT assumes that all processes in the list will create the exact same image with their draw functions (set with icetDrawCallback or icetGLDrawCallback). And yes, the local process id (ICET_RANK) will be part of this list. Same picture, besties πŸ–ΌοΈβœ¨

ICET_DATA_REPLICATION_GROUP_SIZE

The length of the ICET_DATA_REPLICATION_GROUP array. That's it, that's the whole job πŸ“

ICET_DEPTH_FORMAT

The depth format of images to be created by the rendering subsystem and composited by IceT. Use icetSetDepthFormat to set the depth format. Use icetImageGetDepthFormat to safely get the depth format for a particular image πŸ‘‘

ICET_DIAGNOSTIC_LEVEL

The diagnostics flags set with icetDiagnostics. πŸ”

ICET_DISPLAY_NODES

An array of process ranks. The size of the array is equal to the number of tiles (ICET_NUM_TILES). The i-th entry is the rank of the process that is displaying the tile described by the i-th entry in ICET_TILE_VIEWPORTS. Who's showing what, basically 🎬

ICET_DRAW_FUNCTION

A pointer to the drawing callback function, as set by icetDrawCallback. πŸ–ŒοΈ

ICET_FRAME_COUNT

The number of times icetDrawFrame, icetCompositeImage, or icetGLDrawFrame has been called for the current context. Keeping count, periodt πŸ”’

ICET_GEOMETRY_BOUNDS

An array of vertices whose convex hull bounds the drawn geometry. Set with icetBoundingVertices or icetBoundingBox. Each vertex has three coordinates and they're tightly packed in the array. The size of the array is 3 * ICET_NUM_BOUNDING_VERTS. πŸ“¦

ICET_GLOBAL_VIEWPORT

Defines a viewport in an infinite logical display that covers all tile viewports (the ones listed in ICET_TILE_VIEWPORTS). Just like an OpenGL viewport, it's given as the integer four-tuple <x, y, width, height>. The x and y get placed at the leftmost and lowest position of all the tiles, and width and height are just big enough for the viewport to cover all the tiles. Everything in frame, nothing left out 🌈

ICET_INTERLACE_TIME

The total time, in seconds, spent copying pixels to interlace images for better load balancing during the last call to icetDrawFrame, icetCompositeImage, or icetGLDrawFrame. Stored as a double.

ICET_MAGIC_K

The target k value used when compositing with the radix-k single image strategy. ✨πŸͺ„

ICET_MAX_IMAGE_SPLIT

The target number of maximum image splits to be performed by compositing strategies. βœ‚οΈ

ICET_NUM_BOUNDING_VERTS

The number of bounding vertices listed in the ICET_GEOMETRY_BOUNDS parameter.

ICET_NUM_TILES

The number of tiles in the defined display. Basically equal to the number of times icetAddTile was called after the last icetResetTiles. 🧩

ICET_NUM_PROCESSES

The number of processes in the parallel job, as given by the IceTCommunicator object associated with the current context. πŸ‘―β€β™€οΈπŸ‘―β€β™€οΈπŸ‘―β€β™€οΈ

ICET_PHYSICAL_RENDER_HEIGHT

The height of the images generated by the rendering system. This gets set to the OpenGL viewport height by icetGLDrawFrame, or otherwise explicitly by setting it with icetPhysicalRenderSize, or otherwise implicitly to the largest tile height specified with icetAddTile. πŸ“

ICET_PHYSICAL_RENDER_WIDTH

The width of the images generated by the rendering system. This gets set to the OpenGL viewport width by icetGLDrawFrame, or otherwise explicitly by setting it with icetPhysicalRenderSize, or otherwise implicitly to the largest tile width specified with icetAddTile. πŸ“

ICET_PROCESS_ORDERS

Basically, the inverse of ICET_COMPOSITE_ORDER. This parameter contains ICET_NUM_PROCESSES entries. If the element at index i in the array is set to j, then there are j images "on top" of the image generated by process i. Same info, flipped, iconic πŸͺž

ICET_RANK

The rank of the process, as given by the IceTCommunicator object associated with the current context. 🏷️

ICET_RENDER_TIME

The total time, in seconds, spent in the drawing callback during the last call to icetDrawFrame or icetGLDrawFrame. It's always set to 0.0 after a call to icetCompositeImage. Stored as a double.

ICET_SINGLE_IMAGE_STRATEGY

The single image sub-strategy set with icetSingleImageStrategy. Use icetGetSingleImageStrategyName to get a user-readable name for the single image strategy. πŸ‘€

ICET_STRATEGY

The strategy set with icetStrategy. Use icetGetStrategyName to get a user-readable name for the strategy. πŸ‘‘

ICET_STRATEGY_SUPPORTS_ORDERING

Is true if and only if the current strategy supports ordered compositing. Simple as that πŸ’…

ICET_TILE_DISPLAYED

The index of the tile the local process is displaying. This index will correspond to the tile entry in the ICET_DISPLAY_NODES and ICET_TILE_VIEWPORTS arrays. If set to 0 <= i < ICET_NUM_PROCESSES, then the i-th entry of ICET_DISPLAY_NODES is equal to ICET_RANK. And if the local process isn't displaying any tile at all, then ICET_TILE_DISPLAYED is set to -1. Not me, not my tile πŸ™ˆ

ICET_TILE_MAX_HEIGHT

The maximum height of any tile. πŸ“

ICET_TILE_MAX_WIDTH

The maximum width of any tile. πŸ“

  • ICET_TILE_VIEWPORTS β€” okay so this is a whole list of viewports, in the logical global display, and it's what defines the tiles. Each viewport is a four-tuple $<x, y, width, height>$ that says where a tile sits and how big it is, in pixels β€” literally the same way a viewport gets defined in OpenGL. The array size is $4 * ICET_NUM_TILES$. And the ordering? It matches the order the tiles were defined with icetAddTile. No cap. πŸ’…
  • ICET_TOTAL_DRAW_TIME β€” the time spent in that last call to icetDrawFrame, icetCompositeImage, or icetGLDrawFrame. Bestie, that includes everything: render, read back, compress, and composite the images. Stored as a double. ⏱️
  • ICET_VALID_PIXELS_NUM β€” paired with ICET_VALID_PIXELS_OFFSET, this hands you the range of valid pixels for the last image that came back from icetDrawFrame, icetCompositeImage, or icetGLDrawFrame. So with the pixel arrays you got from icetImageGetColor and icetImageGetDepth, the valid pixels start at the pixel indexed by ICET_VALID_PIXELS_OFFSET and keep going for ICET_VALID_PIXELS_NUM. Which tile those pixels belong to? That's captured in the ICET_VALID_PIXELS_TILE state variable. If that last call to icetDrawFrame, icetCompositeImage, or icetGLDrawFrame didn't return pixels for the local process, ICET_VALID_PIXELS_NUM gets set to 0.
Heads up: this state variable is only useful when ICET_COLLECT_IMAGES is off. If it's on, you can assume all display processes contain all pixels in the image (ICET_VALID_PIXELS_NUM is the number of pixels in the image), and all the other processes have no pixel data. 🫢
  • ICET_VALID_PIXELS_OFFSET β€” same situation, paired with ICET_VALID_PIXELS_NUM, giving the range of valid pixels for the last image returned from icetDrawFrame, icetCompositeImage, or icetGLDrawFrame. Given the pixel arrays from icetImageGetColor and icetImageGetDepth, the valid pixels start at the pixel indexed by ICET_VALID_PIXELS_OFFSET and continue for ICET_VALID_PIXELS_NUM. The tile those pixels belong to is captured in ICET_VALID_PIXELS_TILE.
Again, this one is only useful when ICET_COLLECT_IMAGES is off. If it's on, it can be assumed that all display processes contain all pixels in the image (ICET_VALID_PIXELS_OFFSET is 0), and all other processes have no pixel data. ✨
  • ICET_VALID_PIXELS_TILE β€” tells you which tile the last image returned from icetDrawFrame, icetCompositeImage, or icetGLDrawFrame contains pixels for. Every process has its own value, iykyk. If that last call didn't return pixels for the local process, this state variable is set to -1. If ICET_COLLECT_IMAGES is off, that's when this one actually matters β€” if it's on, you can assume all display processes have valid pixels for their respective display tiles, and all the other processes have no pixel data. πŸŽ€

Oh and also, real quick β€” if you're using the OpenGL layer (i.e., you called icetGLInitialize), these variables, defined in IceTGL.h, are available too. πŸ‘‘

  • ICET_GL_DRAW_FUNCTION β€” a pointer to the OpenGL drawing callback function, as set by icetGLDrawCallback. πŸ–οΈ
  • ICET_GL_READ_BUFFER β€” the OpenGL buffer to read from (and write to). Set with icetGLSetReadBuffer. 🌈

πŸ’€ Errors

  • ICET_BAD_CAST β€” the state parameter you asked for is a type that cannot be cast to the output type. Rude, but valid.
  • ICET_INVALID_ENUM β€” pname is not a valid state parameter. Not me passing garbage... πŸ™ˆ

😌 Warnings

None. Absolutely nothing to worry about here, bestie. ✨


πŸ› Bugs

None known. Iconic behaviour, honestly. πŸ’…


πŸ“ Notes

Not every state variable is documented here. There's a set of parameters used internally by IceT, or that are more appropriately retrieved with other functions such as icetIsEnabled. So if you're out here looking for something that isn't listed, that's why. πŸ¦‹


Copyright (C)2003 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


That's the whole page, periodt. This was the IceT Reference, dated February 10, 2015, for icetGet(3) β€” go read the state variables and slay your rendering pipeline, bestie. πŸ«ΆπŸ’–