<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Sun Jan 27 20:37:09 CET 2013 -->
<TITLE>
PolygonSpriteBatch (libgdx API)
</TITLE>
<META NAME="date" CONTENT="2013-01-27">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="PolygonSpriteBatch (libgdx API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<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/PolygonSpriteBatch.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-all.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>
libgdx API
<style>
body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold }
.TableHeadingColor { background:#EEEEFF; }
a { text-decoration:none }
a:hover { text-decoration:underline }
a:link, a:visited { color:blue }
table { border:0px }
.TableRowColor td:first-child { border-left:1px solid black }
.TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
hr { border:0px; border-bottom:1px solid #333366; }
</style>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSprite.html" title="class in com.badlogic.gdx.graphics.g2d"><B>PREV CLASS
</B></A>
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/Sprite.html" title="class in com.badlogic.gdx.graphics.g2d"><B>NEXT CLASS
</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html" target="_top"><B>FRAMES
</B></A>
<A HREF="PolygonSpriteBatch.html" target="_top"><B>NO FRAMES
</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><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>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.badlogic.gdx.graphics.g2d
</FONT>
<BR>
Class PolygonSpriteBatch
</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>com.badlogic.gdx.graphics.g2d.PolygonSpriteBatch
</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class
<B>PolygonSpriteBatch
</B><DT>extends java.lang.Object
</DL>
</PRE>
<P>
<p>
A PolyongSpriteBatch is used to draw 2D polygons that reference a texture (region). The class will batch the drawing commands
and optimize them for processing by the GPU.
</p>
THIS STUFF IS WIP
<p>
To draw something with a PolyongSpriteBatch one has to first call the
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#begin()"><CODE>begin()
</CODE></A> method which will
setup appropriate render states. When you are done with drawing you have to call
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#end()"><CODE>end()
</CODE></A> which will
actually draw the things you specified.
</p>
<p>
All drawing commands of the PolyongSpriteBatch operate in screen coordinates. The screen coordinate system has an x-axis
pointing to the right, an y-axis pointing upwards and the origin is in the lower left corner of the screen. You can also
provide your own transformation and projection matrices if you so wish.
</p>
<p>
A PolyongSpriteBatch is managed. In case the OpenGL context is lost all OpenGL resources a PolyongSpriteBatch uses internally
get invalidated. A context is lost when a user switches to another application or receives an incoming call on Android. A
SpritPolyongSpriteBatcheBatch will be automatically reloaded after the OpenGL context is restored.
</p>
<p>
A PolyongSpriteBatch is a pretty heavy object so you should only ever have one in your program.
</p>
<p>
A PolyongSpriteBatch works with OpenGL ES 1.x and 2.0. In the case of a 2.0 context it will use its own custom shader to draw
all provided sprites. You can set your own custom shader via
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#setShader(com.badlogic.gdx.graphics.glutils.ShaderProgram)"><CODE>setShader(ShaderProgram)
</CODE></A>.
</p>
<p>
A PolyongSpriteBatch has to be disposed if it is no longer used.
</p>
<P>
<P>
<DL>
<DT><B>Author:
</B></DT>
<DD>mzechner, Stefan Bachmann
</DD>
</DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary
</B></FONT></TH>
</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="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#maxVerticesInBatch">maxVerticesInBatch
</A></B></CODE>
<BR>
the maximum number of sprites rendered in one batch so far
</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="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#renderCalls">renderCalls
</A></B></CODE>
<BR>
number of render calls since last
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#begin()"><CODE>begin()
</CODE></A></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="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#totalRenderCalls">totalRenderCalls
</A></B></CODE>
<BR>
number of rendering calls ever, will not be reset, unless it's done manually
</TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary
</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#PolygonSpriteBatch()">PolygonSpriteBatch
</A></B>()
</CODE>
<BR>
Constructs a new PolygonSpriteBatch.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#PolygonSpriteBatch(int)">PolygonSpriteBatch
</A></B>(int
size)
</CODE>
<BR>
Constructs a PolygonSpriteBatch with the specified size in vertices and (if GL2) the default shader.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#PolygonSpriteBatch(int, int)">PolygonSpriteBatch
</A></B>(int
size,
int
buffers)
</CODE>
<BR>
Constructs a PolygonSpriteBatch with the specified size and number of buffers and (if GL2) the default shader.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#PolygonSpriteBatch(int, int, com.badlogic.gdx.graphics.glutils.ShaderProgram)">PolygonSpriteBatch
</A></B>(int
size,
int
buffers,
<A HREF="../../../../../com/badlogic/gdx/graphics/glutils/ShaderProgram.html" title="class in com.badlogic.gdx.graphics.glutils">ShaderProgram
</A> defaultShader)
</CODE>
<BR>
Constructs a new PolygonSpriteBatch.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#PolygonSpriteBatch(int, com.badlogic.gdx.graphics.glutils.ShaderProgram)">PolygonSpriteBatch
</A></B>(int
size,
<A HREF="../../../../../com/badlogic/gdx/graphics/glutils/ShaderProgram.html" title="class in com.badlogic.gdx.graphics.glutils">ShaderProgram
</A> defaultShader)
</CODE>
<BR>
Constructs a new PolygonSpriteBatch.
</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary
</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#begin()">begin
</A></B>()
</CODE>
<BR>
Sets up the SpriteBatch for drawing.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<A HREF="../../../../../com/badlogic/gdx/graphics/glutils/ShaderProgram.html" title="class in com.badlogic.gdx.graphics.glutils">ShaderProgram
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#createDefaultShader()">createDefaultShader
</A></B>()
</CODE>
<BR>
Returns a new instance of the default shader used by SpriteBatch for GL2 when no shader is specified.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#disableBlending()">disableBlending
</A></B>()
</CODE>
<BR>
Disables blending for drawing sprites.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#dispose()">dispose
</A></B>()
</CODE>
<BR>
Disposes all resources associated with this SpriteBatch
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#draw(com.badlogic.gdx.graphics.g2d.PolygonRegion, float[], int, int)">draw
</A></B>(
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonRegion.html" title="class in com.badlogic.gdx.graphics.g2d">PolygonRegion
</A> region,
float[]
spriteVertices,
int
offset,
int
length)
</CODE>
<BR>
Draws the polygon region using the given vertices.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#draw(com.badlogic.gdx.graphics.g2d.PolygonRegion, float, float)">draw
</A></B>(
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonRegion.html" title="class in com.badlogic.gdx.graphics.g2d">PolygonRegion
</A> region,
float
x,
float
y)
</CODE>
<BR>
Draws a polygon region with the bottom left corner at x,y having the width and height of the region.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#draw(com.badlogic.gdx.graphics.g2d.PolygonRegion, float, float, float, float)">draw
</A></B>(
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonRegion.html" title="class in com.badlogic.gdx.graphics.g2d">PolygonRegion
</A> region,
float
x,
float
y,
float
width,
float
height)
</CODE>
<BR>
Draws a polygon region with the bottom left corner at x,y and stretching the region to cover the given width and height.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#draw(com.badlogic.gdx.graphics.g2d.PolygonRegion, float, float, float, float, float, float, float, float, float)">draw
</A></B>(
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonRegion.html" title="class in com.badlogic.gdx.graphics.g2d">PolygonRegion
</A> region,
float
x,
float
y,
float
originX,
float
originY,
float
width,
float
height,
float
scaleX,
float
scaleY,
float
rotation)
</CODE>
<BR>
Draws the polygon region with the bottom left corner at x,y and stretching the region to cover the given width and height.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#enableBlending()">enableBlending
</A></B>()
</CODE>
<BR>
Enables blending for sprites
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#end()">end
</A></B>()
</CODE>
<BR>
Finishes off rendering.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#flush()">flush
</A></B>()
</CODE>
<BR>
Causes any pending sprites to be rendered, without ending the PolygonSpriteBatch.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../com/badlogic/gdx/graphics/Color.html" title="class in com.badlogic.gdx.graphics">Color
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#getColor()">getColor
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#getProjectionMatrix()">getProjectionMatrix
</A></B>()
</CODE>
<BR>
Returns the current projection matrix.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#getTransformMatrix()">getTransformMatrix
</A></B>()
</CODE>
<BR>
Returns the current transform matrix.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#isBlendingEnabled()">isBlendingEnabled
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#setBlendFunction(int, int)">setBlendFunction
</A></B>(int
srcFunc,
int
dstFunc)
</CODE>
<BR>
Sets the blending function to be used when rendering sprites.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#setColor(com.badlogic.gdx.graphics.Color)">setColor
</A></B>(
<A HREF="../../../../../com/badlogic/gdx/graphics/Color.html" title="class in com.badlogic.gdx.graphics">Color
</A> tint)
</CODE>
<BR>
Sets the color used to tint images when they are added to the SpriteBatch.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#setColor(float)">setColor
</A></B>(float
color)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#setColor(float, float, float, float)">setColor
</A></B>(float
r,
float
g,
float
b,
float
a)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#setProjectionMatrix(com.badlogic.gdx.math.Matrix4)">setProjectionMatrix
</A></B>(
<A HREF="../../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4
</A> projection)
</CODE>
<BR>
Sets the projection matrix to be used by this SpriteBatch.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#setShader(com.badlogic.gdx.graphics.glutils.ShaderProgram)">setShader
</A></B>(
<A HREF="../../../../../com/badlogic/gdx/graphics/glutils/ShaderProgram.html" title="class in com.badlogic.gdx.graphics.glutils">ShaderProgram
</A> shader)
</CODE>
<BR>
Sets the shader to be used in a GLES 2.0 environment.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#setTransformMatrix(com.badlogic.gdx.math.Matrix4)">setTransformMatrix
</A></B>(
<A HREF="../../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4
</A> transform)
</CODE>
<BR>
Sets the transform matrix to be used by this SpriteBatch.
</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object
</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail
</B></FONT></TH>
</TR>
</TABLE>
<A NAME="renderCalls"><!-- --></A><H3>
renderCalls
</H3>
<PRE>
public int
<B>renderCalls
</B></PRE>
<DL>
<DD>number of render calls since last
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#begin()"><CODE>begin()
</CODE></A>
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="totalRenderCalls"><!-- --></A><H3>
totalRenderCalls
</H3>
<PRE>
public int
<B>totalRenderCalls
</B></PRE>
<DL>
<DD>number of rendering calls ever, will not be reset, unless it's done manually
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="maxVerticesInBatch"><!-- --></A><H3>
maxVerticesInBatch
</H3>
<PRE>
public int
<B>maxVerticesInBatch
</B></PRE>
<DL>
<DD>the maximum number of sprites rendered in one batch so far
<P>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail
</B></FONT></TH>
</TR>
</TABLE>
<A NAME="PolygonSpriteBatch()"><!-- --></A><H3>
PolygonSpriteBatch
</H3>
<PRE>
public
<B>PolygonSpriteBatch
</B>()
</PRE>
<DL>
<DD>Constructs a new PolygonSpriteBatch. Sets the projection matrix to an orthographic projection with y-axis point upwards,
x-axis point to the right and the origin being in the bottom left corner of the screen. The projection will be pixel perfect
with respect to the screen resolution.
<P>
</DL>
<HR>
<A NAME="PolygonSpriteBatch(int)"><!-- --></A><H3>
PolygonSpriteBatch
</H3>
<PRE>
public
<B>PolygonSpriteBatch
</B>(int
size)
</PRE>
<DL>
<DD>Constructs a PolygonSpriteBatch with the specified size in vertices and (if GL2) the default shader. See
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#PolygonSpriteBatch(int, com.badlogic.gdx.graphics.glutils.ShaderProgram)"><CODE>PolygonSpriteBatch(int, ShaderProgram)
</CODE></A>.
<P>
</DL>
<HR>
<A NAME="PolygonSpriteBatch(int, com.badlogic.gdx.graphics.glutils.ShaderProgram)"><!-- --></A><H3>
PolygonSpriteBatch
</H3>
<PRE>
public
<B>PolygonSpriteBatch
</B>(int
size,
<A HREF="../../../../../com/badlogic/gdx/graphics/glutils/ShaderProgram.html" title="class in com.badlogic.gdx.graphics.glutils">ShaderProgram
</A> defaultShader)
</PRE>
<DL>
<DD><p>
Constructs a new PolygonSpriteBatch. Sets the projection matrix to an orthographic projection with y-axis point upwards,
x-axis point to the right and the origin being in the bottom left corner of the screen. The projection will be pixel perfect
with respect to the screen resolution.
</p>
<p>
The size parameter specifies the maximum size of a single batch in number of vertices(!)
</p>
<p>
The defaultShader specifies the shader to use. Note that the names for uniforms for this default shader are different than
the ones expect for shaders set with
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#setShader(com.badlogic.gdx.graphics.glutils.ShaderProgram)"><CODE>setShader(ShaderProgram)
</CODE></A>. See the
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#createDefaultShader()"><CODE>createDefaultShader()
</CODE></A> method.
</p>
<P>
<DL>
<DT><B>Parameters:
</B><DD><CODE>size
</CODE> - the batch size in number of vertices(!)
<DD><CODE>defaultShader
</CODE> - the default shader to use. This is not owned by the SpriteBatch and must be disposed separately.
</DL>
</DL>
<HR>
<A NAME="PolygonSpriteBatch(int, int)"><!-- --></A><H3>
PolygonSpriteBatch
</H3>
<PRE>
public
<B>PolygonSpriteBatch
</B>(int
size,
int
buffers)
</PRE>
<DL>
<DD>Constructs a PolygonSpriteBatch with the specified size and number of buffers and (if GL2) the default shader. See
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#PolygonSpriteBatch(int, int, com.badlogic.gdx.graphics.glutils.ShaderProgram)"><CODE>PolygonSpriteBatch(int, int, ShaderProgram)
</CODE></A>.
<P>
</DL>
<HR>
<A NAME="PolygonSpriteBatch(int, int, com.badlogic.gdx.graphics.glutils.ShaderProgram)"><!-- --></A><H3>
PolygonSpriteBatch
</H3>
<PRE>
public
<B>PolygonSpriteBatch
</B>(int
size,
int
buffers,
<A HREF="../../../../../com/badlogic/gdx/graphics/glutils/ShaderProgram.html" title="class in com.badlogic.gdx.graphics.glutils">ShaderProgram
</A> defaultShader)
</PRE>
<DL>
<DD><p>
Constructs a new PolygonSpriteBatch. Sets the projection matrix to an orthographic projection with y-axis point upwards,
x-axis point to the right and the origin being in the bottom left corner of the screen. The projection will be pixel perfect
with respect to the screen resolution.
</p>
<p>
The size parameter specifies the maximum size of a single batch in number of vertices(!)
</p>
<p>
The defaultShader specifies the shader to use. Note that the names for uniforms for this default shader are different than
the ones expect for shaders set with
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#setShader(com.badlogic.gdx.graphics.glutils.ShaderProgram)"><CODE>setShader(ShaderProgram)
</CODE></A>. See the
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#createDefaultShader()"><CODE>createDefaultShader()
</CODE></A> method.
</p>
<P>
<DL>
<DT><B>Parameters:
</B><DD><CODE>size
</CODE> - the batch size in number of vertices(!)
<DD><CODE>buffers
</CODE> - the number of buffers to use. only makes sense with VBOs. This is an expert function.
<DD><CODE>defaultShader
</CODE> - the default shader to use. This is not owned by the SpriteBatch and must be disposed separately.
</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail
</B></FONT></TH>
</TR>
</TABLE>
<A NAME="createDefaultShader()"><!-- --></A><H3>
createDefaultShader
</H3>
<PRE>
public static
<A HREF="../../../../../com/badlogic/gdx/graphics/glutils/ShaderProgram.html" title="class in com.badlogic.gdx.graphics.glutils">ShaderProgram
</A> <B>createDefaultShader
</B>()
</PRE>
<DL>
<DD>Returns a new instance of the default shader used by SpriteBatch for GL2 when no shader is specified.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="begin()"><!-- --></A><H3>
begin
</H3>
<PRE>
public void
<B>begin
</B>()
</PRE>
<DL>
<DD>Sets up the SpriteBatch for drawing. This will disable depth buffer writting. It enables blending and texturing. If you have
more texture units enabled than the first one you have to disable them before calling this. Uses a screen coordinate system
by default where everything is given in pixels. You can specify your own projection and modelview matrices via
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#setProjectionMatrix(com.badlogic.gdx.math.Matrix4)"><CODE>setProjectionMatrix(Matrix4)
</CODE></A> and
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#setTransformMatrix(com.badlogic.gdx.math.Matrix4)"><CODE>setTransformMatrix(Matrix4)
</CODE></A>.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="end()"><!-- --></A><H3>
end
</H3>
<PRE>
public void
<B>end
</B>()
</PRE>
<DL>
<DD>Finishes off rendering. Enables depth writes, disables blending and texturing. Must always be called after a call to
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#begin()"><CODE>begin()
</CODE></A>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setColor(com.badlogic.gdx.graphics.Color)"><!-- --></A><H3>
setColor
</H3>
<PRE>
public void
<B>setColor
</B>(
<A HREF="../../../../../com/badlogic/gdx/graphics/Color.html" title="class in com.badlogic.gdx.graphics">Color
</A> tint)
</PRE>
<DL>
<DD>Sets the color used to tint images when they are added to the SpriteBatch. Default is
<A HREF="../../../../../com/badlogic/gdx/graphics/Color.html#WHITE"><CODE>Color.WHITE
</CODE></A>.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setColor(float, float, float, float)"><!-- --></A><H3>
setColor
</H3>
<PRE>
public void
<B>setColor
</B>(float
r,
float
g,
float
b,
float
a)
</PRE>
<DL>
<DD><DL>
<DT><B>See Also:
</B><DD><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#setColor(com.badlogic.gdx.graphics.Color)"><CODE>setColor(Color)
</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setColor(float)"><!-- --></A><H3>
setColor
</H3>
<PRE>
public void
<B>setColor
</B>(float
color)
</PRE>
<DL>
<DD><DL>
<DT><B>See Also:
</B><DD><A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#setColor(com.badlogic.gdx.graphics.Color)"><CODE>setColor(Color)
</CODE></A>,
<A HREF="../../../../../com/badlogic/gdx/graphics/Color.html#toFloatBits()"><CODE>Color.toFloatBits()
</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getColor()"><!-- --></A><H3>
getColor
</H3>
<PRE>
public
<A HREF="../../../../../com/badlogic/gdx/graphics/Color.html" title="class in com.badlogic.gdx.graphics">Color
</A> <B>getColor
</B>()
</PRE>
<DL>
<DD><DL>
<DT><B>Returns:
</B><DD>the rendering color of this PolygonSpriteBatch. Manipulating the returned instance has no effect.
</DL>
</DD>
</DL>
<HR>
<A NAME="draw(com.badlogic.gdx.graphics.g2d.PolygonRegion, float, float)"><!-- --></A><H3>
draw
</H3>
<PRE>
public void
<B>draw
</B>(
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonRegion.html" title="class in com.badlogic.gdx.graphics.g2d">PolygonRegion
</A> region,
float
x,
float
y)
</PRE>
<DL>
<DD>Draws a polygon region with the bottom left corner at x,y having the width and height of the region.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="draw(com.badlogic.gdx.graphics.g2d.PolygonRegion, float, float, float, float)"><!-- --></A><H3>
draw
</H3>
<PRE>
public void
<B>draw
</B>(
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonRegion.html" title="class in com.badlogic.gdx.graphics.g2d">PolygonRegion
</A> region,
float
x,
float
y,
float
width,
float
height)
</PRE>
<DL>
<DD>Draws a polygon region with the bottom left corner at x,y and stretching the region to cover the given width and height.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="draw(com.badlogic.gdx.graphics.g2d.PolygonRegion, float, float, float, float, float, float, float, float, float)"><!-- --></A><H3>
draw
</H3>
<PRE>
public void
<B>draw
</B>(
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonRegion.html" title="class in com.badlogic.gdx.graphics.g2d">PolygonRegion
</A> region,
float
x,
float
y,
float
originX,
float
originY,
float
width,
float
height,
float
scaleX,
float
scaleY,
float
rotation)
</PRE>
<DL>
<DD>Draws the polygon region with the bottom left corner at x,y and stretching the region to cover the given width and height.
The polygon region is offset by originX, originY relative to the origin. Scale specifies the scaling factor by which the
polygon region should be scaled around originX, originY. Rotation specifies the angle of counter clockwise rotation of the
rectangle around originX, originY.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="draw(com.badlogic.gdx.graphics.g2d.PolygonRegion, float[], int, int)"><!-- --></A><H3>
draw
</H3>
<PRE>
public void
<B>draw
</B>(
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonRegion.html" title="class in com.badlogic.gdx.graphics.g2d">PolygonRegion
</A> region,
float[]
spriteVertices,
int
offset,
int
length)
</PRE>
<DL>
<DD>Draws the polygon region using the given vertices. Each vertices must be made up of 5 elements in this order: x, y, color,
u, v.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="flush()"><!-- --></A><H3>
flush
</H3>
<PRE>
public void
<B>flush
</B>()
</PRE>
<DL>
<DD>Causes any pending sprites to be rendered, without ending the PolygonSpriteBatch.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="disableBlending()"><!-- --></A><H3>
disableBlending
</H3>
<PRE>
public void
<B>disableBlending
</B>()
</PRE>
<DL>
<DD>Disables blending for drawing sprites. Does not disable blending for text rendering
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="enableBlending()"><!-- --></A><H3>
enableBlending
</H3>
<PRE>
public void
<B>enableBlending
</B>()
</PRE>
<DL>
<DD>Enables blending for sprites
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setBlendFunction(int, int)"><!-- --></A><H3>
setBlendFunction
</H3>
<PRE>
public void
<B>setBlendFunction
</B>(int
srcFunc,
int
dstFunc)
</PRE>
<DL>
<DD>Sets the blending function to be used when rendering sprites.
<P>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>srcFunc
</CODE> - the source function, e.g. GL11.GL_SRC_ALPHA
<DD><CODE>dstFunc
</CODE> - the destination function, e.g. GL11.GL_ONE_MINUS_SRC_ALPHA
</DL>
</DD>
</DL>
<HR>
<A NAME="dispose()"><!-- --></A><H3>
dispose
</H3>
<PRE>
public void
<B>dispose
</B>()
</PRE>
<DL>
<DD>Disposes all resources associated with this SpriteBatch
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getProjectionMatrix()"><!-- --></A><H3>
getProjectionMatrix
</H3>
<PRE>
public
<A HREF="../../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4
</A> <B>getProjectionMatrix
</B>()
</PRE>
<DL>
<DD>Returns the current projection matrix. Changing this will result in undefined behaviour.
<P>
<DD><DL>
<DT><B>Returns:
</B><DD>the currently set projection matrix
</DL>
</DD>
</DL>
<HR>
<A NAME="getTransformMatrix()"><!-- --></A><H3>
getTransformMatrix
</H3>
<PRE>
public
<A HREF="../../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4
</A> <B>getTransformMatrix
</B>()
</PRE>
<DL>
<DD>Returns the current transform matrix. Changing this will result in undefined behaviour.
<P>
<DD><DL>
<DT><B>Returns:
</B><DD>the currently set transform matrix
</DL>
</DD>
</DL>
<HR>
<A NAME="setProjectionMatrix(com.badlogic.gdx.math.Matrix4)"><!-- --></A><H3>
setProjectionMatrix
</H3>
<PRE>
public void
<B>setProjectionMatrix
</B>(
<A HREF="../../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4
</A> projection)
</PRE>
<DL>
<DD>Sets the projection matrix to be used by this SpriteBatch. If this is called inside a
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#begin()"><CODE>begin()
</CODE></A>/
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#end()"><CODE>end()
</CODE></A> block.
the current batch is flushed to the gpu.
<P>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>projection
</CODE> - the projection matrix
</DL>
</DD>
</DL>
<HR>
<A NAME="setTransformMatrix(com.badlogic.gdx.math.Matrix4)"><!-- --></A><H3>
setTransformMatrix
</H3>
<PRE>
public void
<B>setTransformMatrix
</B>(
<A HREF="../../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4
</A> transform)
</PRE>
<DL>
<DD>Sets the transform matrix to be used by this SpriteBatch. If this is called inside a
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#begin()"><CODE>begin()
</CODE></A>/
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#end()"><CODE>end()
</CODE></A> block.
the current batch is flushed to the gpu.
<P>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>transform
</CODE> - the transform matrix
</DL>
</DD>
</DL>
<HR>
<A NAME="setShader(com.badlogic.gdx.graphics.glutils.ShaderProgram)"><!-- --></A><H3>
setShader
</H3>
<PRE>
public void
<B>setShader
</B>(
<A HREF="../../../../../com/badlogic/gdx/graphics/glutils/ShaderProgram.html" title="class in com.badlogic.gdx.graphics.glutils">ShaderProgram
</A> shader)
</PRE>
<DL>
<DD>Sets the shader to be used in a GLES 2.0 environment. Vertex position attribute is called "a_position", the texture
coordinates attribute is called called "a_texCoords0", the color attribute is called "a_color". See
<A HREF="../../../../../com/badlogic/gdx/graphics/glutils/ShaderProgram.html#POSITION_ATTRIBUTE"><CODE>ShaderProgram.POSITION_ATTRIBUTE
</CODE></A>,
<A HREF="../../../../../com/badlogic/gdx/graphics/glutils/ShaderProgram.html#COLOR_ATTRIBUTE"><CODE>ShaderProgram.COLOR_ATTRIBUTE
</CODE></A> and
<A HREF="../../../../../com/badlogic/gdx/graphics/glutils/ShaderProgram.html#TEXCOORD_ATTRIBUTE"><CODE>ShaderProgram.TEXCOORD_ATTRIBUTE
</CODE></A>
which gets "0" appened to indicate the use of the first texture unit. The projection matrix is uploaded via a mat4 uniform
called "u_proj", the transform matrix is uploaded via a uniform called "u_trans", the combined transform and projection
matrx is is uploaded via a mat4 uniform called "u_projTrans". The texture sampler is passed via a uniform called
"u_texture".
</p>
Call this method with a null argument to use the default shader.
</p>
This method will flush the batch before setting the new shader, you can call it in between
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#begin()"><CODE>begin()
</CODE></A> and
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html#end()"><CODE>end()
</CODE></A>.
<P>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>shader
</CODE> - the
<A HREF="../../../../../com/badlogic/gdx/graphics/glutils/ShaderProgram.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>ShaderProgram
</CODE></A> or null to use the default shader.
</DL>
</DD>
</DL>
<HR>
<A NAME="isBlendingEnabled()"><!-- --></A><H3>
isBlendingEnabled
</H3>
<PRE>
public boolean
<B>isBlendingEnabled
</B>()
</PRE>
<DL>
<DD><DL>
<DT><B>Returns:
</B><DD>whether blending for sprites is enabled
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<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/PolygonSpriteBatch.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-all.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>
libgdx API
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/PolygonSprite.html" title="class in com.badlogic.gdx.graphics.g2d"><B>PREV CLASS
</B></A>
<A HREF="../../../../../com/badlogic/gdx/graphics/g2d/Sprite.html" title="class in com.badlogic.gdx.graphics.g2d"><B>NEXT CLASS
</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.html" target="_top"><B>FRAMES
</B></A>
<A HREF="PolygonSpriteBatch.html" target="_top"><B>NO FRAMES
</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><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>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<div style="font-size:9pt"><i>
Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
</i></div>
</BODY>
</HTML>