# Class: renderflag

For most renderable nodes you can define under what state conditions they are rendered. l3dmodels also allow renderflag to be meshid specific, if no meshid is given, we apply it to all.

## Hierarchy

    o-+ renderinterface
      o-+ renderflag

## Classes that implement this interface:

- l2dnode
- l3dlevelmodel
- l3dmodel
- l3dprimitive
- l3dtext
- l3dtrail
- particlecloud
- rcmddrawmesh
- rcmdforceflag
- rcmdignoreflag

## Methods:

### Method overview:

- rfAlphatest
- rfBlend
- rfFog
- rfFrontcull
- rfLitFX
- rfLitSun
- rfNocolormask
- rfNocull
- rfNodepthmask
- rfNodepthtest
- rfNodraw
- rfNolightmap
- rfNormalize
- rfNovertexcolor
- rfProjectorpass
- rfStencilmask
- rfStenciltest
- rfUnlit
- rfWireframe

rfAlphatest (renderflag,[boolean])
  returns: ([boolean])
  returns or sets renderflag state. Alphatest performs a test on the pixel's alpha value. Depending on the user set comparemode and alpha threshold (see rendersurface) the pixel will be drawn or not.
rfBlend (renderflag,[boolean])
  returns: ([boolean])
  returns or sets renderflag state. Blending will compute outpixel as result of previous pixel and new pixel in the framebuffer (see rendersurface).
rfFog (renderflag,[boolean])
  returns: ([boolean])
  returns or sets renderflag state
rfFrontcull (renderflag,[boolean])
  returns: ([boolean])
  returns or sets renderflag state. Frontfaces are culled (default is off which means backfaces are culled), makes no difference when rfNocull is set
rfLitFX (renderflag,[boolean])
  returns: ([boolean])
  returns or sets renderflag state, only really affects l3dmodels or terrain. closest 3 l3dlights in the same l3dset will be used. If not lit by sun, but lit by fx lights we will turn ambientterm to 1, so you can use baked lighting in vertexcolors.
rfLitSun (renderflag,[boolean])
  returns: ([boolean])
  returns or sets renderflag state. Lit by sun
rfNocolormask (renderflag,[boolean])
  returns: ([boolean])
  returns or sets renderflag state. Pixel wont write into framebuffer
rfNocull (renderflag,[boolean])
  returns: ([boolean])
  returns or sets renderflag state. We will draw backfacing triangles too
rfNodepthmask (renderflag,[boolean])
  returns: ([boolean])
  returns or sets renderflag state. Output pixels will not write into Z-Buffer
rfNodepthtest (renderflag,[boolean])
  returns: ([boolean])
  returns or sets renderflag state. When disabled only pixels that have closer or equal distance than previous pixels will be drawn.
rfNodraw (renderflag,[boolean])
  returns: ([boolean])
  returns or sets renderflag state. We will not draw the node
rfNolightmap (renderflag,[boolean])
  returns: ([boolean])
  returns or sets renderflag state. Lightmap if active for this node will not be used. Useful for disabling lightmap on permesh basis.
rfNormalize (renderflag,[boolean])
  returns: ([boolean])
  returns or sets renderflag state, normalization fixes lighting problems if your models are scaled, but costs a bit more. Flag is autoset if renderscale is not 1
rfNovertexcolor (renderflag,[boolean])
  returns: ([boolean])
  returns or sets renderflag state. Vertex colors arent used, instead a single color for all.
rfProjectorpass (renderflag,[boolean])
  returns: ([boolean])
  returns or sets renderflag state, forces surfaces affected by projectors into a new pass. Singlepass projector outcome sometimes might differ from multipass, especially when fog is envolved. If you need same treatment you can enforce it.
rfStencilmask (renderflag,[boolean])
  returns: ([boolean])
  returns or sets renderflag state. If set pixel will write into stencil buffer
rfStenciltest (renderflag,[boolean])
  returns: ([boolean])
  returns or sets renderflag state. Stenciltest provides a mechanism to draw or discard pixel based on stencil buffer value. Detailed operations can be set with stencilcommand interface
rfUnlit (renderflag,[boolean])
  returns: ([boolean])
  returns or sets renderflag state. LitSun and LitFX will be ignored, this is mostly used in renderflags set by shaders.
rfWireframe (renderflag,[boolean])
  returns: ([boolean])
  returns or sets renderflag state, specify linewidth in rendersurface

## Inherited Methods: