GDview_buffers


Synopsis

Defines framebuffer and Z buffer input and output to and from a view


group+OPort GDview_buffers
{
int fb_type;
Mesh_Unif+Dim2+Space2+Node_Data+Vector4 framebuffer;
int zb_type;
Mesh_Unif+Dim2+Space2+Node_Data+Scalar zbuffer;
};

Description

GDview_buffers is the data structure that defines framebuffer and Z buffer input and output to and from a view. The buffers are produced as output during field output by the OutputField module and are consumed as input by the DefaultView module.

Passing the contents of these buffers between views in this manner can be used to:

•      Merge rendering engines . For instance, if you had implemented a volume renderer, but also wanted to render geometry into the same scene, you could run your volume on one scene, output a frame and Z-buffer, and pass these into the buffer inputs on another scene along with normal geometry. The geometry would be rendered into the input frame and Z-buffers on the AVS/Express viewer, integrating the viewer's geometry rendering with your own volume renderer.

•      Chain renderers . For example, on a machine that does not perform texture mapping in hardware, you could render the texture mapped objects using the software renderer, then pass the frame and Z-buffers, along with the non-texture mapped objects in the scene, into a scene set to use the hardware renderer. Note that in order to synchronize the two views the top transforms of the two views would also need to be connected in the network. Such an application allows you to take advantage of hardware performance when transforming non-texture mapped objects, where otherwise everything would have to be software rendered as long as any texture mapped objects existed.

The type of framebuffer is specified by the fb_type subobject.Each renderer supports the canonical format as well as a format specific to the renderer. The canonical format is provided to allow interchange of framebuffer information between renderers. The specific formats are provide to allow optimal speed.

Value

 

Meaning

 

Symbolic constant

 

0

No framebuffer output.

GD_FB_NONE

1

Framebuffer output is in ARGB order. This is the canonical format. This is the SW and PEX format.

GD_FB_ARGB

2

Framebuffer output is in RGBA order. This is the OpenGL format.

GD_FB_RGBA

3

Framebuffer output is in ABGR order. This is the XGL format.

GD_ABGR

 

framebuffer is a field that represents the framebuffer output from a view in the format as specified by the fb_type subobject.

The type of Z buffer is specified by the zb_type subobject.Each renderer supports the canonical format as well as a format specific to the renderer. The canonical format is provided to allow interchange of Z buffer information between renderers. The specific formats are provide to allow optimal speed.

Value

 

Meaning

 

Symbolic constant

 

0

No Z buffer output.

GD_ZB_NONE

1

Z buffer output is unsigned short values in the range 0-65534 with 65534 nearest the viewer. This is the SW format.

GD_ZB_SHORT

2

Z buffer output is float values in the range 0-1 with 1 nearest the viewer. This is the canonical format.

GD_ZB_FLOAT_1NEAR

3

Z buffer output is float values in the range 0-1 with 0 nearest the viewer. This is the OpenGL format.

GD_ZB_0NEAR

4

Z buffer output is int values with 0 nearest the viewer. This is the XGL format.

GD_ZB_INT

 

Z buffer is a field that represents the Z buffer output from a view in the format as specified by the zb_type subobject.

Example

Not available

File

v/gd.v

See also

For more information, see: