Compile() private method

private Compile ( bool checkErrors = true ) : bool
checkErrors bool
return bool
Exemplo n.º 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);
            }
        }