コード例 #1
0
        internal void BufferData(WebGLBuffer buffer, int size)
        {
            InvokeCanvasMethodUnmarshalled <object>(UnmarshalledCanvasMethod.BufferDataSize, buffer.Type, size, buffer.Usage);

            // InvokeCanvasMethod("bufferData",
            //     new object[] { (int)buffer.Type, new ContextObject(ContextType.WrapIntoFloat32Array, data), (int)usage });
        }
コード例 #2
0
 internal void BufferData <T>(WebGLBuffer buffer, T[] data, int elementByteSize,
                              int length)
     where T : struct
 {
     InvokeCanvasMethodUnmarshalled <object>(UnmarshalledCanvasMethod.BufferDataStruct, buffer.Type,
                                             elementByteSize, data, length, buffer.Usage);
 }
コード例 #3
0
        internal void BindBuffer(WebGLBuffer buffer)
        {
            InvokeCanvasMethodUnmarshalled <object>(UnmarshalledCanvasMethod.BindBuffer, buffer.Type, buffer.Id);

            //InvokeCanvasMethod("bindBuffer",  new object[] { (int)buffer.Type, new ContextObject(2, buffer.Id )});

            if (buffer.Type == BufferType.ARRAY_BUFFER)
            {
                currentlyBoundArrayBuffer = buffer;
            }
            else if (buffer.Type == BufferType.ELEMENT_ARRAY_BUFFER)
            {
                currentlyBoundElementArrayBuffer = buffer;
            }
        }
コード例 #4
0
 internal void BufferData(WebGLBuffer buffer, ushort[] data)
 {
     BufferData(buffer, data, 2, data.Length);
 }