コード例 #1
0
 public static ColorfulTextShaderProgram GetInstance()
 {
     if (instance == null)
     {
         instance = new ColorfulTextShaderProgram();
     }
     return(instance);
 }
コード例 #2
0
ファイル: ShaderPrograms.cs プロジェクト: klenin/Citrus
 public static ColorfulTextShaderProgram GetShaderProgram(int styleIndex)
 {
     if (cachedShaderPrograms[styleIndex] == null)
     {
         cachedShaderPrograms[styleIndex] = new ColorfulTextShaderProgram {
             ColorIndex = (styleIndex * 2 + 1) / (GradientMapTextureSize * 2.0f)
         };
     }
     return(cachedShaderPrograms[styleIndex]);
 }