Пример #1
0
        internal void ApplyPass()
        {
            // Create a Program object
            shaderProgram = GL20.CreateProgram();

            // Attach our compiled shaders
            if (VertexIndex < _technique._effect.vertexShaders.Count)
            {
                GL20.AttachShader(shaderProgram, _technique._effect.vertexShaders[VertexIndex]);
            }
            if (FragmentIndex < _technique._effect.fragmentShaders.Count)
            {
                GL20.AttachShader(shaderProgram, _technique._effect.fragmentShaders[FragmentIndex]);
            }

            // Set the parameters
            // TODO GL20.ProgramParameter (shaderProgram, AssemblyProgramParameterArb.GeometryInputType, (int)All.Lines);
            // TODO GL20.ProgramParameter (shaderProgram, AssemblyProgramParameterArb.GeometryOutputType, (int)All.Line);

            // Set the max vertices
            int maxVertices;

            // TODO GL20.GetInteger (GetPName.MaxGeometryOutputVertices, out maxVertices);
            // TODO GL20.ProgramParameter (shaderProgram, AssemblyProgramParameterArb.GeometryVerticesOut, maxVertices);

            // Link the program
            GL20.LinkProgram(shaderProgram);
            string name = String.Format("Technique {0} - Pass {1}: ", _technique.Name, Name);

            ShaderLog(name, shaderProgram);
        }
Пример #2
0
Файл: GL.cs Проект: mortend/uno
 public void AttachShader(GLProgramHandle program, GLShaderHandle shader)
 {
     TKGL.AttachShader((int)program, (int)shader);
 }