This function returns whether the given surface format is supported on the current platform. All formats are listed here.
surface_format_is_supported(format);
Argument | Type | Description |
---|---|---|
format | Surface Format Constant | The surface format to check |
if (surface_format_is_supported(surface_rgba32float))
{
my_surf = surface_create(320, 180, surface_rgba32float);
// ...
}
else
{
show_debug_message("Effect disabled, 32-bit surface not supported");
}
This checks if the surface_rgba32float format is supported on the current platform, and in that case it creates a surface with that format. However, if the format is not supported, it instead prints a message to the output log.