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