コード例 #1
0
        public static void vertexAttribDivisor(this assets::ScriptCoreLib.JavaScript.WebGL.WebGLRenderingContext gl, uint index, uint divisor)
        {
            var ANGLEInstancedArrays = (ANGLE_instanced_arrays)gl.getExtension("ANGLE_instanced_arrays");

            // 0:63ms {{ ANGLEInstancedArrays = [object ANGLEInstancedArrays] }}

            // tail call inline?
            // can jsc meta inline such extension methods, and cache the first statement to the call site?


            ANGLEInstancedArrays.vertexAttribDivisorANGLE(
                index, divisor
                );
        }
コード例 #2
0
        // X:\jsc.svn\examples\java\webgl\Test\TestInstancedANGLE\TestInstancedANGLE\Application.cs

        // http://blog.tojicode.com/2013/09/whats-coming-in-webgl-20.html

        // or should this live in ScriptCoreLib.Extensions merge assembly?

        // promoted extensions. will this conflict with WebGL2 RenderingContext ?
        public static void drawArraysInstanced(this assets::ScriptCoreLib.JavaScript.WebGL.WebGLRenderingContext gl, uint mode, int first, int count, int primcount)
        {
            var ANGLEInstancedArrays = (ANGLE_instanced_arrays)gl.getExtension("ANGLE_instanced_arrays");

            // 0:63ms {{ ANGLEInstancedArrays = [object ANGLEInstancedArrays] }}

            // tail call inline?
            // can jsc meta inline such extension methods, and cache the first statement to the call site?


            ANGLEInstancedArrays.drawArraysInstancedANGLE(
                mode, first, count, primcount
                );
        }