From: NathanSweet Date: Wed, 11 Sep 2013 17:24:17 +0000 (+0200) Subject: Javadocs. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=92a1e8974dd7a5c572cff2d509abab4d898d790a;p=mikumikustudio%2Flibgdx-mikumikustudio.git Javadocs. --- diff --git a/gdx/src/com/badlogic/gdx/graphics/g2d/PolygonRegion.java b/gdx/src/com/badlogic/gdx/graphics/g2d/PolygonRegion.java index 516c2ba2e..4b78454d7 100644 --- a/gdx/src/com/badlogic/gdx/graphics/g2d/PolygonRegion.java +++ b/gdx/src/com/badlogic/gdx/graphics/g2d/PolygonRegion.java @@ -17,11 +17,10 @@ package com.badlogic.gdx.graphics.g2d; /** Defines a polygon shape on top of a texture region to avoid drawing transparent pixels. - * + *

* THIS STUFF IS A WIP - * + *

* @see PolygonRegionLoader - * * @author Stefan Bachmann * @author Nathan Sweet */ public class PolygonRegion { diff --git a/gdx/src/com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.java b/gdx/src/com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.java index 6d6c7b0cd..b9dc9da3c 100644 --- a/gdx/src/com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.java +++ b/gdx/src/com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.java @@ -33,44 +33,29 @@ import com.badlogic.gdx.math.Matrix4; import com.badlogic.gdx.utils.NumberUtils; /**

- * A PolyongSpriteBatch is used to draw 2D polygons that reference a texture (region). The class will batch the drawing commands + * A PolygonSpriteBatch 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. - *

- * + *

* THIS STUFF IS WIP - * *

- * To draw something with a PolyongSpriteBatch one has to first call the {@link PolygonSpriteBatch#begin()} method which will + * To draw something with a PolygonSpriteBatch one has to first call the {@link PolygonSpriteBatch#begin()} method which will * setup appropriate render states. When you are done with drawing you have to call {@link PolygonSpriteBatch#end()} which will * actually draw the things you specified. - *

- * *

- * All drawing commands of the PolyongSpriteBatch operate in screen coordinates. The screen coordinate system has an x-axis + * All drawing commands of the PolygonSpriteBatch 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. - *

- * *

- * A PolyongSpriteBatch is managed. In case the OpenGL context is lost all OpenGL resources a PolyongSpriteBatch uses internally + * A PolygonSpriteBatch is managed. In case the OpenGL context is lost all OpenGL resources a PolygonSpriteBatch 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. - *

- * + * SpritPolygonSpriteBatcheBatch will be automatically reloaded after the OpenGL context is restored. *

- * A PolyongSpriteBatch is a pretty heavy object so you should only ever have one in your program. - *

- * + * A PolygonSpriteBatch is a pretty heavy object so you should only ever have one in your program. *

- * 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 + * A PolygonSpriteBatch 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 {@link #setShader(ShaderProgram)}. - *

- * *

- * A PolyongSpriteBatch has to be disposed if it is no longer used. - *

- * - * + * A PolygonSpriteBatch has to be disposed if it is no longer used. * @author mzechner * @author Stefan Bachmann * @author Nathan Sweet */ @@ -122,21 +107,14 @@ public class PolygonSpriteBatch { this(size, null); } - /**

- * Constructs a new PolygonSpriteBatch. Sets the projection matrix to an orthographic projection with y-axis point upwards, + /** 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. - *

- * *

* The size parameter specifies the maximum size of a single batch in number of vertices(!) - *

- * *

* 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 {@link #setShader(ShaderProgram)}. See the {@link #createDefaultShader()} method. - *

- * * @param size the batch size in number of vertices(!) * @param defaultShader the default shader to use. This is not owned by the SpriteBatch and must be disposed separately. */ public PolygonSpriteBatch (int size, ShaderProgram defaultShader) { @@ -149,21 +127,14 @@ public class PolygonSpriteBatch { this(size, buffers, null); } - /**

- * Constructs a new PolygonSpriteBatch. Sets the projection matrix to an orthographic projection with y-axis point upwards, + /** 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. - *

- * *

* The size parameter specifies the maximum size of a single batch in number of vertices(!) - *

- * *

* 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 {@link #setShader(ShaderProgram)}. See the {@link #createDefaultShader()} method. - *

- * * @param size the batch size in number of vertices(!) * @param buffers the number of buffers to use. only makes sense with VBOs. This is an expert function. * @param defaultShader the default shader to use. This is not owned by the SpriteBatch and must be disposed separately. */ @@ -586,13 +557,12 @@ public class PolygonSpriteBatch { * 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".

- * - * Call this method with a null argument to use the default shader.

- * + * "u_texture". + *

+ * Call this method with a null argument to use the default shader. + *

* This method will flush the batch before setting the new shader, you can call it in between {@link #begin()} and * {@link #end()}. - * * @param shader the {@link ShaderProgram} or null to use the default shader. */ public void setShader (ShaderProgram shader) { if (drawing) {