Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
image_mipmap(3) 		  Arcan Lua API 		 image_mipmap(3)

NAME
     image_mipmap - Forcetoggle image mipmap storage

SYNOPSIS
     nil
     image_mipmap( vid, state )

DESCRIPTION
     Mipmapping  is  the common procedure of generating multiple versions of the
     same image (typically at lower resolutions for each  "level")  and  letting
     the  rendering  subsystem	determine which version is the most suitable for
     the rendering operation at hand. This usually saves on memory bandwidth  at
     the  cost	of  approximately a third more memory consumption. This function
     enforces a certain mipmap state for a video object. Some filtering methods,
     FILTER_TRILINEAR  in particular, relies on access to lower mipmap levels.

NOTES
     1	    This is a no-operation in memory conservative mode.

     2	    The default mipmap state for all objects is  determined  at  compile
	    time  (  ARCAN_VIDEO_DEFAULT_MIPMAP_STATE  ),  with hardcoded mipmap
	    disable defaults for frameservers and for rendertarget storage.

     3	    The engine does not currently support  manually  generated	mipmaps.
	    These can be useful in some contexts, particularly when dealing with
	    texture  compression  or when optimizing memory use through pre-pass
	    analysis of visibility with color-coded mipmap levels.

     4	    This state transformation is costly  with  non-trivially  determined
	    benefits.  In order to reliably switch open GL  backend state, a new
	    GL	store needs to be created, thus the raw texture data  is  copied
	    and uploaded again.

EXAMPLE
     function image_mipmap0()
	   icon = load_image("test.png");
	   props = image_surface_properties(icon);
	   icon2 = null_surface(props.width, props.height);
	   icon2 = image_sharestorage(icon, icon2);
	   show_image({icon, icon2});
	   resize_image(icon, props.width * 0.5, props.height * 0.5);
	   resize_image(icon2, props.width * 0.5, props.height * 0.5);
	   move_image(icon2, props.width, 0);
	   image_mipmap(icon2, false);
	   image_mipmap(icon, true);
     end

MISUSE
     function image_mipmap0()
	   image_mipmap(WORLDID, "potatoe");
     end

SEE ALSO:
image				   August 2026			 image_mipmap(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=image_mipmap&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help