frb-copy

Description

This program tests texture copying from the frame buffer. There is a capture window on the screen; the image inside the window is copied into the texture buffer. The copied texture is mapped on a panel by the next frame. The size of the capture window and the texture format can both be changed. Two options for the texture copy API (mipmap filter and clear) can be also controlled.

Coverage

Functions Parameters Description
GXSetTexCopySrc Top / left / width / height Various values.
GXSetTexCopyDst Width and height Various values.
Format GX_TF_I4, GX_TF_I8, GX_TF_IA4, GX_TF_IA8, GX_TF_RGB565, GX_TF_RGB5A3, GX_TF_RGBA8, GX_TF_A8.
Mipmap filter GX_TRUE / GX_FALSE
GXCopyTex Image pointer Appropriate value.
Clear operation GX_TRUE / GX_FALSE
GXSetCopyClear Color Only one color.
Z value Always 0xFFFFFF.
GXInitTexObj Image pointer Appropriate value.
Width and height Various values.
Format GX_TF_I4, GX_TF_I8, GX_TF_IA4, GX_TF_IA8, GX_TF_RGB565, GX_TF_RGB5A3, GX_TF_RGBA8, GX_TF_A8.
Wrap mode (s, t) GX_CLAMP, GX_REPEAT.
Mipmap Always GX_FALSE.
GXLoadTexObj Destination texture name Always GX_TEXMAP0.
GXGetTexBufferSize Width and height Various values.
Format GX_TF_I4, GX_TF_I8, GX_TF_IA4, GX_TF_IA8, GX_TF_RGB565, GX_TF_RGB5A3, GX_TF_RGBA8, GX_TF_A8.
Mipmap Always GX_FALSE.
Max LOD N/A
GXInvalidateTexAll (No parameter)
GXSetTevOp TEV stage ID Always GX_TEVSTAGE0.
Operation mode GX_PASSCLR, GX_DECAL, GX_REPLACE.

Using the Demo

PAUSE exits the test.

The Control Stick moves the capture window.

A Button changes the texture format.

C stick changes the size of the window.

L and R Buttons move the camera.

Y button turns the mipmap (box) filter option ON/OFF.

X Button turns the clear frame buffer option ON/OFF.

B button changes the texture format for copying.

Snapshot

RGB565 format, mipmap filter=OFF, clear option=OFF.

frb-copy-0.jpg (52768 bytes)

I4 format, mipmap filter=OFF, clear option=OFF.

frb-copy-3.jpg (50045 bytes)

A8 format, mipmap filter=OFF, clear option=OFF.

frb-copy-7.jpg (46597 bytes)

RGBA8 format, mipmap filter=ON, clear option=OFF.

frb-copy-9.jpg (46004 bytes)

IA8 format, mipmap filter=OFF, clear option=ON

frb-copy-20.jpg (52513 bytes)

Required Data Files

None.

Revision History

2006/03/01 Initial version.


CONFIDENTIAL