shaders_are_supported

Checks to see if the target platform supports shaders.

Syntax:

GML Code Example

shaders_are_supported();


Returns: Boolean


Description

This function will do a check to see if the chosen target platform supports shaders, returning true if they do, and false if they do not.


Example:

GML Code Example

global.GFX = false;
 if shaders_are_supported()
    {
    if shader_is_compiled(sh_glass) && shader_is_compiled(sh_warp)
       {
       global.GFX = true;
       }
    }
 

The above code will set a global variable to false, and then if the platform supports shaders and both the shaders being checked have compiled correctly, it will be set to true.


Back: Shaders
Next: shader_set



No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here