IFXDevice

IFXDevice is the interface used to associate a rendering layer with a device that contains a viewport and a list of views within that viewport. IFXDevice inherits IFXUnknown and is supported by CIFXDevice.

When to Use

The IFXDevice interface is used to associate or retrieve an IFXRenderLayer interface, and to obtain information about the size and location of the viewport.

Interface Methods

Description

GetColorBuffer

Gets the destination color buffer

GetOffset

Gets the coordinates of the bottom left corner of the viewport for the device

GetSize

Gets the dimensions of the viewport for the device

Initialize

Associates the device with a specific IFXRenderLayer interface

Render

Causes all the views for the device to render

SetFirstView

Assigns an IFXView interface as the first view in the device's linked list of views

SetOutputDevice

Assigns the output device

SetSize

Assigns the dimensions of the viewport for the device

SetSubWindow

Macintosh only. Assigns the dimensions of the viewport (subwindow) of the device

SetOffset

Assigns the coordinates of the bottom-left corner of the viewport

GetTempo

Gets the tempo rate

SetTempo

Sets the tempo rate

GetTargetFramerate

Gets target frame rate

SetTargetFramerate

Sets target frame rate

GetUseTargetFramerate

Gets use target frame rate

SetUseTargetFramerate

Sets use target frame rate

GetFirstView

Gets an IFXView interface as the first view in the device's linked list of views


IFXDevice::GetColorBuffer(void* pDestinationBuffer)

This method gets the pointer to the destination buffer.

Parameters:

pDestinationBuffer

A pointer to the color destination buffer

Return Values


IFXDevice::GetOffset(F32* pLeft, F32* pBottom)

Retrieves the 2-D device coordinates of the viewport for this device. The origin of the device coordinate system is the bottom-left corner of the device. The Y-axis points up, and the X-axis points right.

Parameters:

pLeft

A pointer for the X-coordinate of the bottom-left corner of the viewport

pBottom

A pointer for the Y-coordinate of the bottom-left corner of the viewport

Return Values


IFXDevice::GetSize(F32* pWidth, F32* pHeight)

Retrieves the 2-D device viewport dimensions.

Parameters:

pWidth

A pointer for the width of the viewport

pHeight

A pointer for the height of the viewport

Return Values


IFXDevice::Initialize(IFXRenderLayer* pRenderLayer)

Associates the device with an IFXRenderLayer interface, and makes a few initial calls to the render layer.

Parameters:

pRenderLayer

A pointer to an IFXRenderLayer interface

Return Values

Comments:

Release() should be called on the interface pointer if it will not be used directly by the calling function after handing it to the device.


IFXDevice::Render()

Causes all of the views associated with the device to render.

Parameters:

None

Return Values


IFXDevice::SetFirstView(IFXView* pView)

Assigns an IFXView interface to the device as the first view in the linked-list of views for the device.

Parameters:

pView

A pointer to an IFXView interface, which will be used as the first view in the device's chain of views

Return Values

Comments:

The argument (pView) can be a NULL interface pointer.


IFXDevice::SetOutputDevice(void* pvOutputDevice)

This method assigns an output device.

Parameters:

pvOutputDevice

A pointer to an output device

Return Values


IFXDevice::SetSize(F32 Width, F32 Height)

This method assigns the dimensions of the viewport for the device.

Parameters:

Width

A floating point value which is the width of the viewport

Height

A floating point value which is the height of the viewport

Return Values


IFXDevice::SetSubWindow(U32 x, U32 y, U32 w, U32 h, BOOL bTransparent)

This method assigns both the dimensions of the viewport and the offset, as it applies to the bottom-left corner of the viewport.

Parameters:

x

The X-coordinate of the bottom-left corner of the viewport, in device coordinates

y

The Y-coordinate of the bottom-left corner of the viewport, in device coordinates

w

The width of the viewport, in device coordinates

h

The height of the viewport, in device coordinates

bTransparent

Confirms the transparent state of the window

Return Values


IFXDevice::SetOffset(F32 Left, F32 Bottom)

[Macintosh version:IFXDevice::SetOffset(int Left, int Bottom)]

Assigns the location of the device's viewport by means of the (X,Y) coordinates of the bottom-left corner.

Parameters:

Left

The X-coordinate of the bottom-left corner of the viewport, in device coordinates

Bottom

The Y-coordinate of the bottom-left corner of the viewport, in device coordinates

Return Values


IFXDevice::GetTempo(F32 *pfTempo)

This method gets the tempo rate.

Parameters:

pfTempo

A pointer to the tempo rate

Return Values


IFXDevice::SetTempo(F32 fTempo)

This method sets the tempo rate.

Parameters:

fTempo

The tempo rate

Return Values


IFXDevice::GetTargetFramerate(F32 *pfTargetFramerate)

This method gets the target frame rate.

Parameters:

pfTargetFramerate

A pointer to the frame rate

Return Values


IFXDevice::SetTargetFramerate(F32 fTargetFramerate)

This method sets the target frame rate.

Parameters:

fTargetFramerate

The frame rate assigned

Return Values


IFXDevice::GetUseTargetFramerate(U32 *puUseTargetFramerate)

This method gets the use target frame rate.

Parameters:

puUseTargetFramerate

A pointer to the use target frame rate

Return Values


IFXDevice::SetUseTargetFramerate(U32 uUseTargetFramerate)

This method sets the use target frame rate.

Parameters:

uUseTargetFramerate

The use target frame rate assigned

Return Values


IFXDevice::GetFirstView(IFXView* ppView)

Gets an IFXView interface for the device as the first view in the linked-list of views for the device.

Parameters:

ppView

A pointer to an IFXView interface, which will be used as the first view in the device's chain of views

Return Values

§See asterisked (*) statement at Legal Information © 2001 Intel Corporation.