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 }); }
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); }
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; } }
internal void BufferData(WebGLBuffer buffer, ushort[] data) { BufferData(buffer, data, 2, data.Length); }