shader_current


语法:

shader_current();


返回:

Real (ID value of the shader, or -1 if no shader)


描述

This function will return the index ID value of the shader currently being used for rendering, or it will return -1 if no shader is being used.

重要!该函数在试用版(Trial License)产品中可用。


例如:

if shader_current() == -1
   {
   shader_set(sh_warp)
   }

The above code will check to see what the current shader is and if it returns -1 (no shader being used) then a shader is set.