mojo.graphics.Canvas.DrawPrimitives - nitrologic/monkey2 GitHub Wiki
mojo::mojo.graphics.mojo.graphics.Canvas.DrawPrimitives
monkey:monkey.types.Int,count:monkey:monkey.types.Int,vertices:monkey:monkey.types.Float Ptr,verticesPitch:monkey:monkey.types.Int,texCoords:monkey:monkey.types.Float Ptr,texCoordsPitch:monkey:monkey.types.Int,colors:monkey:monkey.types.Uint Ptr,colorsPitch:monkey:monkey.types.Int,image:mojo:mojo.graphics.Image,indices:monkey:monkey.types.Int Ptr )
Method DrawPrimitives:Void( order:Draws a sequence of primtives.
Draws a sequence of convex primtives using the current Color, BlendMode and Matrix.
Parameters | |
---|---|
order |
order The type of primitive: 1=points, 2=lines, 3=triangles, 4=quads, >4=n-gons. |
count |
count The number of primitives to draw. |
vertices |
vertices Pointer to the first vertex x,y pair. |
verticesPitch |
verticesPitch Number of bytes from one vertex x,y pair to the next. Set to 8 for 'tightly packed' vertices. |
texCoords |
texCoords Pointer to the first texCoord s,t pair. This can be null. |
texCoordsPitch |
texCoordsPitch Number of bytes from one texCoord s,y to the next. Set to 8 for 'tightly packed' texCoords. |
colors |
colors Pointer to the first RGBA uint color value. This can be null. |
colorsPitch |
colorsPitch Number of bytes from one RGBA color to the next. Set to 4 for 'tightly packed' colors. |
image |
image Source image for rendering. This can be null. |
indices |
indices Pointer to sequence of integer indices for indexed drawing. This can by null for non-indexed drawing. |