STATE_engine_set_patches_offset

 

 



  Determines the distance that the engine will set for all created patches from the polygon
  the patches are put on. (To learn about patches and what they are used for please see
  STATE_polygon_add_patch_easy() or STATE_engine_create_shadow() )
  
   Q: Why do we need this function ?
  
   A: When putting a patch over a polygon we get two polygons one on top of the other
  	  Some 3D cards can not handle this situation cleanly because of small floating point
      glitches when zbuffer is done. The artifact is stripes on the patch (coming from the polygon behind)
      This function can be used to solve this problem so that patches look better.
  
  The default distance is 2. This function was introduced with version 5.4 of the engine.
  previous versions of the engine made patches with 0 distance.
  
   Parameters:
  		offset_size: The distance is explained above.
  					 Use the smallest number that makes the patches look good
  					 example of possible values: 0, 0.4, 1, 10, 40
  					 A too big number would make shadows created with STATE_engine_create_shadow()
  					 to be inaccurate
  
   See also:
   STATE_engine_get_patches_offset(), STATE_polygon_add_patch_easy() 
   STATE_polygon_add_patch(), STATE_polygon_add_shadow_patch(), STATE_engine_create_shadow()

 

 

Go to page 1      Select API

 

Copyright © 2007 3DSTATE Corporation. www.3dstate.com