# Class: rendersystem

Rendering system information and settings

## Methods:

### Method overview:

- baseshaders
- batchmaxindices
- batchmeshmaxtris
- cgallowglslsm3up
- cgcompilerargs
- cgdumpbroken
- cgdumpcompiled
- cghighprofile
- cglowprofileglsl
- cgprefercompiled
- cguseoptimal
- checkstate
- detail
- force2tex
- forcefinish
- gldriverinfo
- glextensions
- glfinish
- glinfo
- hwbonesparams
- nodefaultgpuprogs
- noglextensions
- popgl
- poppedgl
- purehwvertices
- pushgl
- swapinterval
- texanisolevel
- texanisotropic
- texcompression
- usebaseshaders
- usevbos
- vendor

baseshaders ([shader color_only, color_lightmap, 1tex, 1tex_lightmap])
  returns: ([shader color_only, color_lightmap, 1tex, 1tex_lightmap])
  returns or sets baseshaders. Any non-material mesh, ie just having a texture or just having a color, will use those shaders and pass its texture (if exists) as Texture:0 to the shader. All other materials will use the Shader:0 they come with.
batchmaxindices ([int])
  returns: ([int])
  l3dbatchbuffers will finish batch after indices are reached.
batchmeshmaxtris ([int])
  returns: ([int])
  l3dbatchbuffers will immediately render meshes with less triangles.
cgallowglslsm3up ([boolean])
  returns: ([boolean])
  gets or sets if Cg on startup should allow use of GLSL for non-nvidia cards, that can compile a test vertex- and fragment shader with SM3 features. From Cg 2.1 on this defaults to true.
cgcompilerargs ([string])
  returns: ([string])
  returns the cg compiler args. Args must be separated by ;
cgdumpbroken ([boolean])
  returns: ([boolean])
  gets or sets if Cg programs, who failed to load and were compiled at runtime, should be saved. Their filename is like pre-compiled version just with a BROKEN added.
cgdumpcompiled ([boolean])
  returns: ([boolean])
  gets or sets if all Cg programs will saved to their corresponding compiled filename, will overwrite files.
cghighprofile (string vertexprofile, fragmentprofile, [technique])
  returns: ()
  sets the Cg high profiles, used in higher techniques, also allows downgrade of max capable technique. Strings are profilenames of Cg, there is no error checking if profilename actually correspons to maximum tehniques. Be aware that setting should be done on startup, changing between modes so that shaders will be in mixed types, will result into errors. The commands main purpose is to test profile codepaths.
cglowprofileglsl ([boolean])
  returns: ()
  sets if GLSL is used in the low Cg profiles. Setting will enforce GLSL useage for lowCgProfile (normally arbfp1/arbvp1) and highCgProfile, disabling will revert to original state. Be aware that setting should be done on startup, changing between modes so that shaders will be in mixed types, will result into errors. The commands main purpose is to test GLSL codepaths profiles.
cgprefercompiled ([boolean])
  returns: ([boolean])
  gets or sets if Cg should check for compiled programs first.
cguseoptimal ([boolean])
  returns: ([boolean])
  gets or sets if Cg should set optimal profile compiler arguments, using driver and GPU info. Be aware that there is no way to disable it, hence once the first Cg gpuprogram is loaded from that time on all will use compile flags for the local machine. When you want to precompile your shaders using generic profile options, ie like the offline Cg compiler, you should set this value to false before loading your shaders. The only machine dependent flag will be use of ATI_draw_buffers over ARB_draw_buffers.
checkstate ()
  returns: (boolean)
  returns whether there are errors in the state tracker (prints to console).
detail ([int])
  returns: ([int])
  gets or sets users detail setting 1 - 3, 3 = highest detail. 1 = half texture size, 16 bit. 2 = 16 bit texture, 3 = 32 bit textures.
force2tex ([boolean])
  returns: ([boolean])
  sets/gets if system should be forced to have only two textureunits, useful for debugging. Affects system only during startup.
forcefinish ([boolean])
  returns: ([boolean])
  if true then renderfunction will wait until all rendering is finished before swapbuffers. Might fix issues you have.
gldriverinfo ()
  returns: (string vendor, renderer, version)
  returns current driver info.
glextensions ()
  returns: (string)
  returns the GL extension string
glfinish ()
  returns: ()
  waits until all pending GL processes are finished.
glinfo ()
  returns: (string renderer,string version, string vendor)
  returns information about OpenGL Driver
hwbonesparams ([int])
  returns: ([int])
  gets or sets how many parameters you use additionally to matrices in your gpuskin programs
nodefaultgpuprogs ([boolean])
  returns: ([boolean])
  sets/gets if defaultgpuprogs are disabled. Affects system only during startup.
noglextensions ([boolean])
  returns: ([boolean])
  sets/gets if 'nice-to-have' GLextensions are disabled. Affects system only during startup.
popgl ()
  returns: ()
  pops GL resources from useage (ie retrieves data). Should be done before a major GLContext change. Only relative if cusom window managers are used.
poppedgl ()
  returns: (boolean)
  returns true if GL resources are just popped, ie rendering is disabled.
purehwvertices ([boolean])
  returns: ([boolean])
  returns or sets if you can guarantee that all vertices (cept for debug helpers or font) are processed by your shaders which all use programmable pipeline. In that case we can ignore a few costly state changes that are only needed for fixed function pipeline.
pushgl ()
  returns: ()
  pushes all GL resources back (ie restores active data). Should be done after a major GLContext change. This function is also only for use with custom window managers. It is automatically called when switching from windowed to fullscreen mode. While GL resources are pushed rendering will be ignored, and many OpenGL calls will result into errors.
swapinterval ([int])
  returns: ([int])
  gets or sets swapbuffer interval behavior 0 = vsynch off, 1 on, 2 double buffered on ...
texanisolevel ([float])
  returns: ([float])
  sets value for anisotropic filtering. Must be <= maximum capable
texanisotropic ([boolean])
  returns: ([boolean])
  gets or sets if texture anisotropic filtering should be used
texcompression ([boolean])
  returns: ([boolean])
  gets or sets if texture compression should be used
usebaseshaders ([boolean])
  returns: ([boolean])
  returns or sets if baseshaders should be used. Make sure they are specified before.
usevbos ([boolean])
  returns: ([boolean])
  sets/gets if vertex buffer objects should be enabled. This generally turns them on/off (on will have no effect if your hardware cant do it), the other option is to disable them per model.load. By default it is on if system technique is higher than VID_ARB_V.
vendor ()
  returns: (string)
  returns vendor of rendering system (ati,nvidia,intel,unknown)