Axiom.RenderSystems.OpenGL.GLSL.GLSLProgram.AttachToProgramObject C# (CSharp) Метод

AttachToProgramObject() публичный Метод

public AttachToProgramObject ( int programObject ) : void
programObject int
Результат void
		public void AttachToProgramObject( int programObject )
		{
			// atach child objects
            foreach (var childShader in attachedGLSLPrograms.Cast<GLSLProgram>())
			{
			    // bug in ATI GLSL linker : modules without main function must be recompiled each time 
			    // they are linked to a different program object
			    // don't check for compile errors since there won't be any
			    // *** minor inconvenience until ATI fixes thier driver
			    childShader.Compile( false );
			    childShader.AttachToProgramObject( programObject );
			}

            Gl.glAttachObjectARB(programObject, GLHandle);
            GLSLHelper.CheckForGLSLError("GLSL : Error attaching " + this.Name + " shader object to GLSL Program Object.", programObject);
		}

Usage Example

Пример #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="programObject"></param>
        public void AttachToProgramObject(int programObject)
        {
            Gl.glAttachObjectARB(programObject, glHandle);
            GLSLHelper.CheckForGLSLError("Error attaching " + this.name + " shader object to GLSL Program Object.", programObject);

            // atach child objects
            for (int i = 0; i < attachedGLSLPrograms.Count; i++)
            {
                GLSLProgram childShader = (GLSLProgram)attachedGLSLPrograms[i];

                // bug in ATI GLSL linker : modules without main function must be recompiled each time
                // they are linked to a different program object
                // don't check for compile errors since there won't be any
                // *** minor inconvenience until ATI fixes there driver
                childShader.Compile(false);
                childShader.AttachToProgramObject(programObject);
            }
        }