# Class: rcmddrawmesh

Draws a mesh, be aware that mesh winding is opposite (CCW) of l2dnodes (CW). Positions and sizes are always in OpenGL coordinates (0,0) = bottom left. The l2dnodes' reference size system is not used. By default starts out as fullscreen quad, 2d mesh for orhtographic overlay drawing.

## Hierarchy

    o-+ renderinterface
      o-+ rcmd
        o-+ rcmddrawmesh

## Interfaces:

- indexarray
- matobject
- renderflag
- rendersurface
- vertexarray

## Methods:

### Method overview:

- autosize
- color
- link
- matrix
- matsurface
- new
- orthographic
- pos
- quadmesh
- rendermesh
- size
- usermesh

new ()
  returns: (rcmddrawmesh)
  returns the rcmd
autosize (rcmddrawmesh,[int])
  returns: ([int])
  returns or sets. 0 off -1 viewsized. Default is -1
color (rcmddrawmesh,[float r,g,b,a])
  returns: ([float r,g,b,a])
  returns or sets color
link (rcmddrawmesh,[spatialnode])
  returns: ([spatialnode])
  gets or sets if matrix shall be updated from a linked node. This is a weak reference and will not prevent spatialnode from gc. Passing a non-spatialnode disables the link.
matrix (rcmddrawmesh,[matrix4x4])
  returns: ([matrix4x4])
  returns or sets. Overwrites pos and is only used in non-orthographic.
matsurface (rcmddrawmesh,[matsurface])
  returns: ([matsurface])
  returns or sets matsurface
orthographic (rcmddrawmesh,[boolean])
  returns: ([boolean])
  returns or sets whether 2d orhographic overlay mode should be used instead of the current active camera. the renderflags rfNovertexcolor,rfNodepthtest and rfNodepthmask are set to true in orthographic mode (also after matsurface change). (defualt is true).
pos (rcmddrawmesh,[float x,y,z])
  returns: ([float x,y,z])
  returns or sets. Overwritten by matrix. xy Only used when autosize is 0 or non-orthographic. Coordinates in OpenGL (0,0) = bottomleft of current l3dview.
quadmesh (rcmddrawmesh)
  returns: ()
  deletes usermesh and sets quadmesh again.
rendermesh (rcmddrawmesh,[rendermesh])
  returns: ([rendermesh])
  gets or sets rendermesh. Get only works if a usermesh was created before or another rendermesh passed for useage.
size (rcmddrawmesh,[float x,y,z])
  returns: ([float x,y,z])
  returns or sets. xy Only used when autosize is 0 or non-orthographic. Coordinates in OpenGL (0,0) = bottomleft of current l3dview
usermesh (rcmddrawmesh, vertextype, int numverts, numindices, [vidbuffer vbo], [int vbooffset], [vidbuffer ibo], [int ibooffset])
  returns: ()
  creates inplace custom rendermesh (see rendermesh for details) Note that polygon winding is CCW.

## Inherited Methods:

### From rcmd

flag