Ejemplo n.º 1
0
        public void upload(ByteArray vertexProgram, ByteArray fragmentProgram)
        {
            // create array to hold sampler states
            var samplerStates = new SamplerState[16];

            // convert shaders from AGAL to GLSL
            var glslVertex   = AGALConverter.ConvertToGLSL(vertexProgram, null);
            var glslFragment = AGALConverter.ConvertToGLSL(fragmentProgram, samplerStates);

            // upload as GLSL
            uploadFromGLSL(glslVertex, glslFragment, samplerStates);
        }
Ejemplo n.º 2
0
        public void upload(ByteArray vertexProgram, ByteArray fragmentProgram)
        {
            // create array to hold sampler states
            var samplerStates = new SamplerState[Context3D.MaxSamplers];

            // convert shaders from AGAL to GLSL
            var glslVertex   = AGALConverter.ConvertToGLSL(vertexProgram, null);
            var glslFragment = AGALConverter.ConvertToGLSL(fragmentProgram, samplerStates);

            // upload as GLSL
            uploadFromGLSL(glslVertex, glslFragment);
            // set sampler states from agal
            for (int i = 0; i < samplerStates.Length; i++)
            {
                setSamplerState(i, samplerStates[i]);
            }
        }