1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<LINK rel="stylesheet" type="text/css" href="../../../CSS/revolution.css"> 9<LINK rel="stylesheet" type="text/css" href="../../../CSS/revolution.css"> 10<title>frb-zcopy</title> 11</head> 12 13<body> 14 15<h1 align="left">frb-zcopy</h1> 16 17 18 19<h2>Description</h2> 20 21<P><font face="Courier New">frb-zcopy</font> is an example of texture copying from the depth buffer. Z texturing is a powerful feature that attaches depth information to billboards or 2D sprites in order to generate 3D-like effects. If using texture copying from both the frame buffer and the depth buffer, generating images and Z textures at runtime is possible. This program uses a two-pass rendering scheme. On the first pass, it creates both image and depth textures by drawing 3D objects. Therefore, the scene resulting from the second pass becomes more 3D-like, although everything is drawn using a billboard.</P> 22<h2>Coverage</h2> 23<TABLE border="1" cellpadding="3" cellspacing="0.1" width="640"> 24 <tr> 25<TD bgcolor="#C0C0C0" width="30%"><em><strong>Function</strong></em></TD> 26<TD bgcolor="#C0C0C0" width="25%"><em><strong>Parameters</strong></em></TD> 27<TD bgcolor="#C0C0C0" width="45%"><em><strong>Description</strong></em></TD> 28 </tr> 29 <tr> 30<TD width="30%"><a href="../../../gx/Framebuffer/GXSetTexCopySrc.html"><code>GXSetTexCopySrc</code></a></TD> 31<TD width="25%"><em><font face="Courier New"><strong>top / left / width / height</strong></font></em></TD> 32<TD width="45%">Fixed.</TD> 33 </tr> 34 <tr> 35<TD rowspan="3" width="30%"><a href="../../../gx/Framebuffer/GXSetTexCopyDst.html"><code>GXSetTexCopyDst</code></a></TD> 36<TD width="25%"><em><font face="Courier New"><strong>Width and height</strong></font></em></TD> 37<TD width="45%">Fixed.</TD> 38 </tr> 39 <tr> 40<TD width="25%"><em><font face="Courier New"><strong>Format</strong></font></em></TD> 41<TD width="45%"><font face="Courier New">GX_TF_RGBA8</font><strong> / <font face="Courier New">GX_TF_Z24X8</font>.</TD> 42 </tr> 43 <tr> 44<TD width="25%"><em><font face="Courier New"><strong>Mipmap filter</strong></font></em></TD> 45<TD width="45%"><font face="Courier New">GX_FALSE</font></TD> 46 </tr> 47 <tr> 48<TD rowspan="2" width="30%"><a href="../../../gx/Framebuffer/GXCopyTex.html"><code>GXCopyTex</code></a></TD> 49<TD width="25%"><em><font face="Courier New"><strong>Image pointer</strong></font></em></TD> 50<TD width="45%">Appropriate value.</TD> 51 </tr> 52 <tr> 53<TD width="25%"><em><font face="Courier New"><strong>Clear operation</strong></font></em></TD> 54<TD width="45%"><font face="Courier New">GX_TRUE</font></TD> 55 </tr> 56 <tr> 57<TD rowspan="2" width="30%"><a href="../../../gx/Framebuffer/GXSetCopyClear.html"><code>GXSetCopyClear</code></a></TD> 58<TD width="25%"><em><font face="Courier New"><strong>Color</strong></font></em></TD> 59<TD width="45%">Only one color.</TD> 60 </tr> 61 <tr> 62<TD width="25%"><em><font face="Courier New"><strong>Z value</strong></font></em></TD> 63<TD width="45%">Always 0xFFFFFF.</TD> 64 </tr> 65 <tr> 66<TD rowspan="5" width="30%"><a href="../../../gx/Texture/GXInitTexObj.html"><code>GXInitTexObj</code></a></TD> 67<TD width="25%"><em><font face="Courier New"><strong>Image pointer</strong></font></em></TD> 68<TD width="45%">Appropriate value.</TD> 69 </tr> 70 <tr> 71<TD width="25%"><em><font face="Courier New"><strong>Width and height</strong></font></em></TD> 72<TD width="45%">Fixed.</TD> 73 </tr> 74 <tr> 75<TD width="25%"><em><font face="Courier New"><strong>Format</strong></font></em></TD> 76<TD width="45%"><font face="Courier New">GX_TF_RGBA8</font> / <font face="Courier New">GX_TF_Z24X8</font>.</TD> 77 </tr> 78 <tr> 79<TD width="25%"><em><font face="Courier New"><strong>Wrap mode (s, t).</strong></font></em></TD> 80<TD width="45%"><font face="Courier New">GX_REPEAT</font></TD> 81 </tr> 82 <tr> 83<TD width="25%"><em><font face="Courier New"><strong>Mipmap</strong></font></em></TD> 84<TD width="45%">Always <CODE>GX_FALSE</CODE>.</TD> 85 </tr> 86 <tr> 87<TD width="30%"><a href="../../../gx/Texture/GXLoadTexObj.html"><code>GXLoadTexObj</code></a></TD> 88<TD width="25%"><em><font face="Courier New"><strong>Destination texture name.</strong></font></em></TD> 89<TD width="45%"><font face="Courier New">GX_TEXMAP0</font> / <font face="Courier New">GX_TEXMAP1</font>.</TD> 90 </tr> 91 <tr> 92<TD width="30%"><a href="../../../gx/Texture/GXInvalidateTexAll.html"><code>GXInvalidateTexAll</code></a></TD> 93<TD width="25%">None.</TD> 94 <TD width="45%"></TD> 95 </tr> 96 <tr> 97<TD rowspan="3" width="30%"><code><a href="../../../gx/Tev/GXSetZTexture.html">GXSetZTexture</a></code></TD> 98<TD width="25%"><em><strong><font face="Courier New">operation</font></strong></em></TD> 99<TD width="45%">Always <font face="Courier New">GX_ZT_ADD</font>.</TD> 100 </tr> 101 <tr> 102<TD width="25%"><em><strong><font face="Courier New">Format</font></strong></em></TD> 103<TD width="45%"><font face="Courier New">GX_TF_Z24X8</font></TD> 104 </tr> 105 <tr> 106<TD width="25%"><em><strong><font face="Courier New">bias</font></strong></em></TD> 107<TD width="45%">Fixed.</TD> 108 </tr> 109 <tr> 110<TD width="30%"><a href="../../../gx/Management/GXSetDrawSync.html"><code>GXSetDrawSync</code></a></TD> 111<TD width="25%"><em><strong><font face="Courier New">token number</font></strong></em></TD> 112<TD width="45%">Counts up in every frame.</TD> 113 </tr> 114 <tr> 115<TD width="30%"><a href="../../../gx/Management/GXReadDrawSync.html"><code>GXReadDrawSync</code></a></TD> 116<TD width="25%">None.</TD> 117 <TD width="45%"></TD> 118 </tr> 119</TABLE> 120<h2>Operation Method</h2> 121 122<P>START exits the test.</P> 123<P>The Control stick moves camera position.</P> 124<h2>Snapshot</h2> 125 126<P><IMG src="./images/frb-zcopy.jpg" alt="frb-zcopy.jpg (10907 bytes)" WIDTH="640" HEIGHT="480"></p> 127 128<h2>Required Data Files</h2> 129 130<p>None.</p> 131<H2>Revision History</H2> 132<P>2006/03/01 Initial version.</P> 133<hr> 134<P>CONFIDENTIAL</p> 135</BODY> 136</HTML>