📄 compositingmode.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Thu Nov 27 13:54:34 EET 2003 -->
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<TITLE>
CompositingMode (Mobile 3D Graphics API (M3G))
</TITLE>
<META NAME="keywords" CONTENT="javax.microedition.m3g.CompositingMode,CompositingMode class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="CompositingMode (Mobile 3D Graphics API (M3G))";
}
</SCRIPT>
<BODY BGCOLOR="white" onload="asd();">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/CompositingMode.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<EM><B>Nov 19, 2003</B></EM></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../javax/microedition/m3g/Camera.html"><B>PREV CLASS</B></A>
<A HREF="../../../javax/microedition/m3g/Fog.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="CompositingMode.html" TARGET="_top"><B>NO FRAMES</B></A>
<SCRIPT> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT><A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A></NOSCRIPT></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.microedition.m3g</FONT>
<BR>
Class CompositingMode</H2>
<PRE>
java.lang.Object
|
+--<A HREF="../../../javax/microedition/m3g/Object3D.html">javax.microedition.m3g.Object3D</A>
|
+--<B>javax.microedition.m3g.CompositingMode</B>
</PRE>
<HR>
<DL>
<DT>public class <B>CompositingMode</B><DT>extends <A HREF="../../../javax/microedition/m3g/Object3D.html">Object3D</A></DL>
<P>
<p>An Appearance component encapsulating per-pixel compositing attributes.</p><p><i>Depth offset</i> is added to the depth (Z) value of a pixel prior todepth test and depth write. The offset is constant across a polygon. Depthoffset is used to prevent <i>Z fighting</i>, which makes coplanar polygonsintersect each other on the screen due to the limited resolution of the depthbuffer. Depth offset allows, for example, white lines on a highway or scorchmarks on a wall (<i>decals</i> in general) to be implemented with polygonsinstead of textures. Depth offset has no effect if depth buffering isdisabled.</p><p><i>Blending</i> combines the incoming fragment's R, G, B, and A valueswith the R, G, B, and A values stored in the frame buffer at the incomingfragment's location. The table below defines the available blending modes,in terms of the source color C<sub>s</sub> = (R<sub>s</sub>, G<sub>s</sub>,B<sub>s</sub>, A<sub>s</sub>) and the destination color C<sub>d</sub> =(R<sub>d</sub>, G<sub>d</sub>, B<sub>d</sub>, A<sub>d</sub>). The sourcecolor is the incoming fragment's color value, while the destination coloris the pre-existing color value in the frame buffer. The correspondingOpenGL source and destination blend functions are included in the tablefor reference.</p><table border="true" cellpadding="3" align="center"><tr bgcolor="#c0c0c0"><th>Mode</th><th>Definition</th><th>OpenGL src blend func</th><th>OpenGL dst blend func</th></tr><tr><td><code>REPLACE</code></td><td>C<sub>d</sub> = C<sub>s</sub></td><td><code>ONE</code></td><td><code>ZERO</code></td></tr><tr><td><code>ALPHA_ADD</code></td><td>C<sub>d</sub> = C<sub>s</sub> A<sub>s</sub> + C<sub>d</sub></td><td><code>SRC_ALPHA</code></td><td><code>ONE</code></td></tr><tr><td><code>ALPHA</code></td><td>C<sub>d</sub> = C<sub>s</sub> A<sub>s</sub> + C<sub>d</sub> (1 - A<sub>s</sub>)</td><td><code>SRC_ALPHA</code></td><td><code>ONE_MINUS_SRC_ALPHA</code></td></tr><tr><td><code>MODULATE</code></td><td>C<sub>d</sub> = C<sub>s</sub> C<sub>d</sub></td><td><code>DST_COLOR</code></td><td><code>ZERO</code></td></tr><tr><td><code>MODULATE_X2</code></td><td>C<sub>d</sub> = 2 C<sub>s</sub> C<sub>d</sub></td><td><code>DST_COLOR</code></td><td><code>SRC_COLOR</code></td></tr></table><h3>Implementation guidelines</h3><p>Depth offset is computed according to section 3.5.5 in the OpenGL 1.3specification. Per-fragment operations are done according to sections 4.1and 4.2, with the following exceptions:</p><ul><li>The alpha test function is always <code>GEQUAL</code>;</li><li>Stencil testing and the stencil buffer are not supported;</li><li>The depth test function is always <code>LEQUAL</code>;</li><li>The blend equation is always <code>FUNC_ADD</code>;</li><li>Blend function combinations are limited to the ones listed above;</li><li>The constant blend color is not supported;</li><li>Logical operations are not supported;</li><li>Individual masking of R, G and B is not supported;</li><li>The accumulation buffer is not supported.</li></ul><p>Multisampling is not supported explicitly, but implementations may use itinternally to implement full-scene antialiasing. The full-scene antialiasinghint can be enabled or disabled in Graphics3D. Similarly, the dithering hintin Graphics3D may be implemented using the per-fragment dithering feature ofOpenGL.</p>
<P>
<P>
<DL>
<DT><B>See Also:</B><DD><a href="../../../file-format.html#CompositingMode">Binary format</a></DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/m3g/CompositingMode.html#ALPHA">ALPHA</A></B></CODE>
<BR>
Selects the alpha blend mode. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/m3g/CompositingMode.html#ALPHA_ADD">ALPHA_ADD</A></B></CODE>
<BR>
Selects the additive blend mode. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/m3g/CompositingMode.html#MODULATE">MODULATE</A></B></CODE>
<BR>
Selects the basic modulating blending mode; source pixels are multiplied with the destination pixels.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/m3g/CompositingMode.html#MODULATE_X2">MODULATE_X2</A></B></CODE>
<BR>
Selects the brighter modulating blending mode. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/m3g/CompositingMode.html#REPLACE">REPLACE</A></B></CODE>
<BR>
Selects the replace mode. </TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../javax/microedition/m3g/CompositingMode.html#CompositingMode()">CompositingMode</A></B>()</CODE>
<BR>
Constructs a CompositingMode object with default values. </TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/m3g/CompositingMode.html#getAlphaThreshold()">getAlphaThreshold</A></B>()</CODE>
<BR>
Retrieves the current alpha testing threshold.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/m3g/CompositingMode.html#getBlending()">getBlending</A></B>()</CODE>
<BR>
Retrieves the current frame buffer blending mode.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -