本文整理匯總了Golang中vu/data.Shader.Name方法的典型用法代碼示例。如果您正苦於以下問題:Golang Shader.Name方法的具體用法?Golang Shader.Name怎麽用?Golang Shader.Name使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類vu/data.Shader
的用法示例。
在下文中一共展示了Shader.Name方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: CreateShader
// CreateShader creates one of the known shaders. This is expected to be used by
// eng.LoadShader when a shader is not already in the cache. Nil is returned for
// unrecognized shaders. This function contains the list of official shader names.
func CreateShader(shaderName string, sh *data.Shader) {
sh.Name = shaderName
switch shaderName {
case "flat":
flatShader(sh)
case "flata":
flataShader(sh)
case "gouraud":
gouraudShader(sh)
case "phong":
phongShader(sh)
case "uv":
uvShader(sh)
case "uva":
uvaShader(sh)
case "uvra":
uvraShader(sh)
case "uvm":
uvmShader(sh)
case "wave":
waveShader(sh)
case "bb":
bbShader(sh)
case "bba":
bbaShader(sh)
case "bbra":
bbraShader(sh)
default:
sh.Name = "" // couldn't find the shader.
}
}