CCPrimitiveBatch
CCPrimitiveBatch
Cocos2DInheritance: System.Object
Implements: System.IDisposable
Constructors
CCPrimitiveBatch(GraphicsDevice)
CCPrimitiveBatch(GraphicsDevice)(Microsoft.Xna.Framework.Graphics.GraphicsDevice graphicsDevice)
the constructor creates a new PrimitiveBatch and sets up all of the internals that PrimitiveBatch will need.
Parameters:
graphicsDevice
(Microsoft.Xna.Framework.Graphics.GraphicsDevice) - The graphics device.Example
CCPrimitiveBatch(GraphicsDevice, int)
CCPrimitiveBatch(GraphicsDevice, int)(Microsoft.Xna.Framework.Graphics.GraphicsDevice graphicsDevice, System.Int32 bufferSize)
Parameters:
graphicsDevice
(Microsoft.Xna.Framework.Graphics.GraphicsDevice)bufferSize
(System.Int32)Methods
AddVertex(Vector2, Color, PrimitiveType)
AddVertex(Vector2, Color, PrimitiveType)(Microsoft.Xna.Framework.Vector2 vertex, Microsoft.Xna.Framework.Color color, Microsoft.Xna.Framework.Graphics.PrimitiveType primitiveType)
Parameters:
vertex
(Microsoft.Xna.Framework.Vector2)color
(Microsoft.Xna.Framework.Color)primitiveType
(Microsoft.Xna.Framework.Graphics.PrimitiveType)AddVertex(ref Vector2, Color, PrimitiveType)
AddVertex(ref Vector2, Color, PrimitiveType)(Microsoft.Xna.Framework.Vector2 vertex, Microsoft.Xna.Framework.Color color, Microsoft.Xna.Framework.Graphics.PrimitiveType primitiveType)
Parameters:
vertex
(Microsoft.Xna.Framework.Vector2)color
(Microsoft.Xna.Framework.Color)primitiveType
(Microsoft.Xna.Framework.Graphics.PrimitiveType)Begin()
Begin()()
Begin is called to tell the PrimitiveBatch what kind of primitives will be drawn, and to prepare the graphics card to render those primitives.
Example
Dispose()
Dispose()()
Example
Dispose(bool)
Dispose(bool)(System.Boolean disposing)
Parameters:
disposing
(System.Boolean)End()
End()()
End is called once all the primitives have been drawn using AddVertex. it will call Flush to actually submit the draw call to the graphics card, and then tell the basic effect to end.
Example
IsReady()
System.Boolean IsReady()()
Returns:
System.Boolean
SetProjection(ref Matrix)
SetProjection(ref Matrix)(Microsoft.Xna.Framework.Matrix projection)
Parameters:
projection
(Microsoft.Xna.Framework.Matrix)UpdateMatrix()
UpdateMatrix()()