CgExamples.Gl_14_bulge.checkForCgError C# (CSharp) 메소드

checkForCgError() 정적인 개인적인 메소드

static private checkForCgError ( string situation ) : void
situation string
리턴 void
        static void checkForCgError(string situation)
        {
            int error;
            string errorString = Cg.cgGetLastErrorString(out error);

            if (error != Cg.CG_NO_ERROR)
            {
                Console.WriteLine("{0}- {1}- {2}",
                  myProgramName, situation, errorString);
                if (error == Cg.CG_COMPILER_ERROR)
                {
                    Console.WriteLine("{0}", Cg.cgGetLastListing(myCgContext));
                }
                Environment.Exit(1);
            }
        }