本文整理汇总了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.
}
}