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

image_color - Change color_surface and rendertarget clear-color

true or false
image_color( vid:dst, number:red, number:green, number:blue )
image_color( vid:dst, number:red, number:green, number:blue, number:alpha )

There are two uses for this function. The first is that it can be used to update the current color that a color_surface uses as the color value passed to the shader. The second is that each rendertarget, including the one hidden behind WORLDID has a clear color which is the default 'background' color. This initialises to 25, 25, 25, (255) which is a dark grey value, but can be updated via the use of this function.

1
trying to set this on a non-rendertarget, textured surface is a terminal state transition.

function image_color0()
      local a = color_surface(64, 64, 255, 0, 0);
      show_image(a);
      image_color(a, 0, 255, 0);
end

function image_color1()
      image_color(WORLDID, 255, 0, 0, 0);
end

function image_color0()
      image_color(BADID);
end

function image_color1()
      local img = fill_surface(64, 64, 0, 0, 0);
      image_color(img, 255, 0, 0, 0);
end

color_surface(3) define_rendertarget(3)

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.