beastapi/beastframebuffer.h File Reference

#include "beastapitypes.h"

File Description

The Beast framebuffer functions.

Enumerations

enum  ILBChannelSelection {
  ILB_CS_R = 0, ILB_CS_G, ILB_CS_B, ILB_CS_A,
  ILB_CS_Z, ILB_CS_RGB, ILB_CS_RGBA, ILB_CS_RGBZ,
  ILB_CS_RGBAZ, ILB_CS_ALL
}
 

Functions

ILBStatus ILBDestroyFramebuffer (ILBFramebufferHandle fb)
 
ILBStatus ILBGetChannelCount (ILBFramebufferHandle fb, int32 *channels)
 
ILBStatus ILBGetChannelName (ILBFramebufferHandle fb, int32 index, ILBStringHandle *name)
 
ILBStatus ILBGetFramebufferPass (ILBFramebufferHandle fb, ILBRenderPassHandle *pass)
 
ILBStatus ILBGetFramebufferTarget (ILBFramebufferHandle fb, ILBTargetHandle *target)
 
ILBStatus ILBGetFramebufferTargetEntity (ILBFramebufferHandle fb, ILBTargetEntityHandle *entity)
 
ILBStatus ILBGetResolution (ILBFramebufferHandle fb, int32 *width, int32 *height)
 
ILBStatus ILBReadRegionHDR (ILBFramebufferHandle fb, int32 minX, int32 minY, int32 maxX, int32 maxY, ILBChannelSelection channels, float *target)
 
ILBStatus ILBReadRegionLDR (ILBFramebufferHandle fb, int32 minX, int32 minY, int32 maxX, int32 maxY, ILBChannelSelection channels, float gamma, unsigned char *target)
 

Enumeration Type Documentation

Default selections of channels when reading out pixel/vertex data.

Enumerator
ILB_CS_R 

Red channel only.

ILB_CS_G 

Green channel only.

ILB_CS_B 

Blue channel only.

ILB_CS_A 

Alpha channel only.

ILB_CS_Z 

Z-channel only.

ILB_CS_RGB 

Red, green and blue channels only.

ILB_CS_RGBA 

Red, green, blue and alpha channels.

ILB_CS_RGBZ 

Red, green, blue and Z channels.

ILB_CS_RGBAZ 

Red, green, blue, alpha and Z channels.

ILB_CS_ALL 

All channels.

Function Documentation

ILBStatus ILBDestroyFramebuffer ( ILBFramebufferHandle  fb)

Destroys and frees all memory related to a framebuffer.

The framebuffer handle will be invalid afterwards.
Note this will happen automatically when the job is destroyed. Use this function to avoid using more temporary memory than necessary when importing results.

Parameters
fbthe framebuffer to erase
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetChannelCount ( ILBFramebufferHandle  fb,
int32 *  channels 
)

Gets the number of channels in the framebuffer.

Parameters
fbthe framebuffer to get the channel count for
channelspointer to the variable to receive the number of channels
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetChannelName ( ILBFramebufferHandle  fb,
int32  index,
ILBStringHandle name 
)

Gets the name for a channel.

Parameters
fbthe framebuffer to get the channel from
indexthe index of the channel to get
namepointer to the string handle to receive the channel name
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetFramebufferPass ( ILBFramebufferHandle  fb,
ILBRenderPassHandle pass 
)

Returns which pass this frame buffer is generated from.

Parameters
fbthe framebuffer to erase
passthe pass which the frame buffer is generated from
Returns
The result of the operation.
ILBStatus ILBGetFramebufferTarget ( ILBFramebufferHandle  fb,
ILBTargetHandle target 
)

Returns which target this frame buffer is generated from.

Parameters
fbthe framebuffer to erase
targetthe target which the frame buffer is generated from
Returns
The result of the operation.
ILBStatus ILBGetFramebufferTargetEntity ( ILBFramebufferHandle  fb,
ILBTargetEntityHandle entity 
)

Returns which target entity this frame buffer is generated from.

Parameters
fbthe framebuffer to erase
entitythe target entity which the frame buffer is generated from
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetResolution ( ILBFramebufferHandle  fb,
int32 *  width,
int32 *  height 
)

Gets the resolution for a framebuffer.

Parameters
fbthe framebuffer to get the resolution of
widthpointer to where the width shall be written
heightpointer to where the height shall be written
Returns
The result of the operation.
+ Examples:
ILBStatus ILBReadRegionHDR ( ILBFramebufferHandle  fb,
int32  minX,
int32  minY,
int32  maxX,
int32  maxY,
ILBChannelSelection  channels,
float *  target 
)

Reads back a region in a framebuffer.

The region is specified as inclusive for the lower part and exclusive for the higher part. I.E to read a 512x512 buffer use 0, 0, 512, 512

Parameters
fbthe framebuffer to read from
minXthe left limit of the region
minYthe lower limit of the region
maxXthe right limit of the region
maxYthe upper limit of the region
channelswhat channels to read out from the buffer
targetthe buffer to write the result to. Must be (maxY - minY) * (maxX - minX) * channelCount floats big
Returns
The result of the operation.
+ Examples:
ILBStatus ILBReadRegionLDR ( ILBFramebufferHandle  fb,
int32  minX,
int32  minY,
int32  maxX,
int32  maxY,
ILBChannelSelection  channels,
float  gamma,
unsigned char *  target 
)

Reads back a region in a framebuffer.

The region is specified as inclusive for the lower part and exclusive for the higher part. I.E to read a 512x512 buffer use 0, 0, 512, 512

Parameters
fbthe framebuffer to read from
minXthe left limit of the region
minYthe lower limit of the region
maxXthe right limit of the region
maxYthe upper limit of the region
channelswhat channels to read out from the buffer
gammathe gamma space to encode the image data in
targetthe buffer to write the result to. Must be (maxY - minY) * (maxX - minX) * channelCount bytes big
Returns
The result of the operation.
+ Examples:

Go to the source code of this file.