GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
rendertarget_range(3) Arcan Lua API rendertarget_range(3)

rendertarget_range - Limit the order- range of objects to render

bool:ok
rendertarget_range( vid:rtgt, int:min, int:max )

In some render- and optimization scenarios one might want to only allow a certain set of objects to be rendered. Normally object hierarchies are ordered based on an order value, see order_image and the default rendering pipeline will process these objects according to that order, going from low to high. Using this function, a rendertarget (including the special WORLDID ) can be set to skip values that fall outside min <= val <= max. The objects will still have external storage and similar processing being synchronized, they will just not be considered when generating the rendertarget output.

1
if min or max is set to < 0 or max < min, the rendertarget will reset to the default mode of everything being processed.
2
if max == min, nothing will be drawn.

function rendertarget_range0()
-- in this example, only the green object will be visible
      local red = color_surface(64, 64, 255, 0, 0);
      local green = color_surface(64, 64, 0, 255, 0);
      local blue = color_surface(64, 64, 0, 0, 255);
      show_image({red, green, blue});
      move_image(green, 0, 64);
      move_image(blue, 64, 0);
      order_image(green, 5);
      rendertarget_range(WORLDID, 4, 6);
end

define_rendertarget(3) order_image(3) image_inherit_order(3)

June 2022 targetcontrol

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.