Axiom.RenderSystems.OpenGL.Nvidia.NvparseFragmentProgram.LoadFromSource C# (CSharp) Метод

LoadFromSource() защищенный Метод

Loads the raw ASM source and runs Nvparse to send the appropriate texture/register combiner instructions to the card.
protected LoadFromSource ( ) : void
Результат void
		protected override void LoadFromSource()
		{
			// generate a new display list
			Gl.glNewList( programId, Gl.GL_COMPILE );

			int pos = Source.IndexOf( "!!" );

			while ( pos != -1 && pos != Source.Length )
			{
				int newPos = Source.IndexOf( "!!", pos + 1 );

				if ( newPos == -1 )
				{
					newPos = Source.Length;
				}

				string script = Source.Substring( pos, newPos - pos );

				nvparse( script );

				string error = nvparse_get_errors();

				if ( error != null && error.Length > 0 )
				{
					LogManager.Instance.Write( "nvparse error: {0}", error );
				}

				pos = newPos;
			}

			// ends the declaration of this display list
			Gl.glEndList();
		}