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
image_storage_slice(3) Arcan Lua API image_storage_slice(3)

image_storage_slice -

true or false
image_storage_slice( vid:store int:type vidtbl:slices )

Some rendering effects require specialised storage layouts that we refer to as 'sliced', from the fact that they represent slices of some geometry. Typical such layouts are 'cubemaps' ( SLICE_CUBEMAP ) and '3D' textures ( SLICE_ 3D). This is not normally supported by the engine, but the backing store of a video object can irreversibly be converted to such storage formats with the use of this function. The function returns true if the backing store was successfully converted. This property will then carry through when using image_sharestorage . Calling the function multiple times with the same input set will update the slices that has a more recent upload timestamp than the previous slice in the corresponding slot. The performance characteristics of this function also vary with the underlying hardware platform, the source format of the individual slices and the GPU affinity of the individual slices. The default and typically worst case requires a full GPU -> CPU -> GPU synchronous transfer and is thus not suitable for high rate updates.

1
the number of slices and the current backing store of store should have a power-of-two base width (height will be ignored).

function image_storage_slice0()
      local surf = alloc_surface(32, 32)
      local c1 = fill_surface(32, 32, 255, 0, 0)
      local c2 = fill_surface(32, 32, 255, 255, 0)
      local c3 = fill_surface(32, 32, 255, 0, 255)
      local c4 = fill_surface(32, 32, 255, 255, 255)
      local c5 = fill_surface(32, 32, 0, 255, 0)
      local c6 = fill_surface(32, 32, 0, 0, 255)
      image_storage_slice(surf, SLICE_CUBEMAP, {c1,c2,c3,c4,c5,c6})
end

June 2022 image

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.