コード例 #1
0
ファイル: Program.cs プロジェクト: cra0zy/JSIL.Hacks
        private static void initShaders()
        {
            var fragmentShader = GetShader(gl, "shader-fs");
            var vertexShader = GetShader(gl, "shader-vs");

            shaderProgram = gl.CreateProgram();
            gl.AttachShader(shaderProgram, vertexShader);
            gl.AttachShader(shaderProgram, fragmentShader);
            gl.LinkProgram(shaderProgram);

            if (!gl.GetProgramParameter(shaderProgram, gl.LinkStatus))
            {
                throw new Exception("Could not initialize shaders");
            }

            gl.UseProgram(shaderProgram);

            vertexPositionAttribute = gl.GetAttributeLocation(shaderProgram, "aVertexPosition");
            gl.EnableVertexAttributeArray(vertexPositionAttribute);

            pMatrixUniform = gl.GetUniformLocation(shaderProgram, "uPMatrix");
            mvMatrixUniform = gl.GetUniformLocation(shaderProgram, "uMVMatrix");
        }
コード例 #2
0
ファイル: GLContext.cs プロジェクト: cra0zy/JSIL.Hacks
 public void VertexAttributePointer(GLAttributeLocation attributeLocation, int itemSize, GLType type, bool normalized, int stride, int offset) { }
コード例 #3
0
 public void EnableVertexAttributeArray(GLAttributeLocation attributeLocation)
 {
 }
コード例 #4
0
ファイル: GLContext.cs プロジェクト: cra0zy/JSIL.Hacks
 public void EnableVertexAttributeArray(GLAttributeLocation attributeLocation) { }
コード例 #5
0
 public void VertexAttributePointer(GLAttributeLocation attributeLocation, int itemSize, GLType type, bool normalized, int stride, int offset)
 {
 }