public async ValueTask update(ArrayBufferView data)
 {
     await EventHorizonBlazorInterop.Func <CachedEntity>(
         new object[]
     {
         new string[] { this.___guid, "update" }, data
     }
         );
 }
Exemplo n.º 2
0
 public void update(ArrayBufferView data)
 {
     EventHorizonBlazorInterop.Func <CachedEntity>(
         new object[]
     {
         new string[] { this.___guid, "update" }, data
     }
         );
 }
Exemplo n.º 3
0
        public RawTexture(
            ArrayBufferView data, decimal width, decimal height, decimal format, Scene sceneOrEngine, System.Nullable <bool> generateMipMaps = null, System.Nullable <bool> invertY = null, System.Nullable <decimal> samplingMode = null, System.Nullable <decimal> type = null
            ) : base()
        {
            var entity = EventHorizonBlazorInterop.New(
                new string[] { "BABYLON", "RawTexture" },
                data, width, height, format, sceneOrEngine, generateMipMaps, invertY, samplingMode, type
                );

            ___guid = entity.___guid;
        }
        public static async ValueTask <RawTexture> NewRawTexture(
            ArrayBufferView data, decimal width, decimal height, decimal format, Scene scene, System.Nullable <bool> generateMipMaps = null, System.Nullable <bool> invertY = null, System.Nullable <decimal> samplingMode = null, System.Nullable <decimal> type = null
            )
        {
            var entity = await EventHorizonBlazorInterop.New(
                new string[] { "BABYLON", "RawTexture" },
                data, width, height, format, scene, generateMipMaps, invertY, samplingMode, type
                );

            return(new RawTexture(entity));
        }
 public void compressedTexSubImage2D(
     int target,
     int level,
     double xoffset,
     double yoffset,
     int width,
     int height,
     int format,
     ArrayBufferView data)
 {
     throw new NotImplementedException();
 }
 public void texSubImage2D(
     int target,
     int level,
     double xoffset,
     double yoffset,
     int width,
     int height,
     int format,
     int type,
     ArrayBufferView pixels)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 7
0
 public static RawTexture CreateRTexture(ArrayBufferView data, decimal width, decimal height, Scene sceneOrEngine, System.Nullable <bool> generateMipMaps = null, System.Nullable <bool> invertY = null, System.Nullable <decimal> samplingMode = null, System.Nullable <decimal> type = null)
 {
     return(EventHorizonBlazorInterop.FuncClass <RawTexture>(
                entity => new RawTexture()
     {
         ___guid = entity.___guid
     },
                new object[]
     {
         new string[] { "BABYLON", "RawTexture", "CreateRTexture" }, data, width, height, sceneOrEngine, generateMipMaps, invertY, samplingMode, type
     }
                ));
 }
        private ArrayBufferView GetTypedArray(Stream s, uint type)
        {
#if CODE_ANALYSIS
            MemoryStream memoryStream = (s as MemoryStream);
            //if (arrayHolder == null)
            //{
            //    if ((type != BYTE) && (type != UNSIGNED_BYTE))
            //        throw new Exception("RuntimeException: Buffer byte order problem");
            //    //arrayHolder = (HasArrayBufferView)((ByteBufferWrapper)s).getByteBuffer();
            //}
            ArrayBufferView array          = null; // memoryStream.GetBuffer();
            int             remainingBytes = (int)(s.Length - s.Position);
            int             byteOffset     = 0;    // array.ByteOffset + ((int)s.Position * elementSize);
            switch (type)
            {
            case GLES20.FLOAT:
                return(new Float32Array(array.Buffer, byteOffset, remainingBytes / 4));

            case GLES20.UNSIGNED_BYTE:
                return(new Uint8Array(array.Buffer, byteOffset, remainingBytes));

            case GLES20.UNSIGNED_SHORT:
                return(new Uint16Array(array.Buffer, byteOffset, remainingBytes / 2));

            case GLES20.INT:
                return(new Int32Array(array.Buffer, byteOffset, remainingBytes / 4));

            case GLES20.SHORT:
                return(new Int16Array(array.Buffer, byteOffset, remainingBytes / 2));

            case GLES20.BYTE:
                return(new Int8Array(array.Buffer, byteOffset, remainingBytes));
            }
#endif
            throw new Exception("IllegalArgumentException:");
        }
 public virtual void BufferSubData(uint target, long offset, ArrayBufferView data) { }
Exemplo n.º 10
0
        private void PlatformSetData <T>(int level, T[] data, int startIndex, int elementCount) where T : struct
        {
            int w, h;

            GetSizeForLevel(Width, Height, level, out w, out h);

            // Store the current bound texture.
            var prevTexture = GraphicsExtensions.GetBoundTexture2D();

            if (prevTexture != glTexture)
            {
                gl.bindTexture(gl.TEXTURE_2D, glTexture);
                GraphicsExtensions.CheckGLError();
            }

            GenerateGLTextureIfRequired();
            gl.pixelStorei(gl.UNPACK_ALIGNMENT, Math.Min(_format.GetSize(), 8));

            ArrayBufferView arrayBuffer = null;
            var             size        = Utilities.ReflectionHelpers.SizeOf <T> .Get();

            if (size == 1)
            {
                var subarr = new Uint8Array(data.As <ArrayBuffer>(), startIndex.As <uint>(), elementCount.As <uint>());
                arrayBuffer = subarr.As <ArrayBufferView>();
            }
            else if (size == 4 && typeof(T) == typeof(Color))
            {
                var  subarr      = new Uint8Array(4 * elementCount.As <uint>());
                uint subarrindex = 0;

                for (uint i = startIndex.As <uint>(); i < startIndex.As <uint>() + elementCount; i++)
                {
                    var col = data[i].As <Color>();

                    subarr[subarrindex + 0] = col.R;
                    subarr[subarrindex + 1] = col.G;
                    subarr[subarrindex + 2] = col.B;
                    subarr[subarrindex + 3] = col.A;

                    subarrindex += 4;
                }

                arrayBuffer = subarr.As <ArrayBufferView>();
            }
            else
            {
                throw new NotImplementedException();
            }

            if (glFormat == gl.COMPRESSED_TEXTURE_FORMATS)
            {
                gl.compressedTexImage2D(gl.TEXTURE_2D, level, glInternalFormat, w, h, 0, arrayBuffer.As <Int8Array>());
            }
            else
            {
                gl.texImage2D(gl.TEXTURE_2D, level, glInternalFormat, w, h, 0, glFormat, glType, arrayBuffer);
            }

            GraphicsExtensions.CheckGLError();

            // Restore the bound texture.
            if (prevTexture != glTexture)
            {
                gl.bindTexture(gl.TEXTURE_2D, prevTexture);
                GraphicsExtensions.CheckGLError();
            }
        }
 public virtual void ReadPixels(int x, int y, int width, int height, uint format, uint type, ArrayBufferView pixels) { }
 public virtual void TexImage2D(uint target, int level, uint internalformat, int width, int height, int border, uint format, uint type, ArrayBufferView pixels) { }
Exemplo n.º 13
0
 public ArrayBufferView readPixels(System.Nullable <decimal> faceIndex = null, System.Nullable <decimal> level = null, ArrayBufferView buffer = null)
 {
     return(EventHorizonBlazorInterop.FuncClass <ArrayBufferView>(
                entity => new ArrayBufferView()
     {
         ___guid = entity.___guid
     },
                new object[]
     {
         new string[] { this.___guid, "readPixels" }, faceIndex, level, buffer
     }
                ));
 }
 public void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, ArrayBufferView pixels)
 {
     Invoke("readPixels", x, y, width, height, format, type, pixels);
 }
Exemplo n.º 15
0
 public void BufferSubData(int target, long offset, ArrayBufferView data)
 {
 }
Exemplo n.º 16
0
 public void BufferData(int target, ArrayBufferView data, int usage)
 {
 }
Exemplo n.º 17
0
 public void TexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ArrayBufferView pixels)
 {
 }
Exemplo n.º 18
0
 public void TexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ArrayBufferView pixels)
 {
 }
Exemplo n.º 19
0
 /// <summary>
 /// Sends the request. If the request is asynchronous (which is the default), this method returns as soon as the request is sent. If the request is synchronous, this method doesn't return until the response has arrived.
 /// </summary>
 /// <param name="data"></param>
 public virtual extern void Send(ArrayBufferView data);
Exemplo n.º 20
0
 public void send(ArrayBufferView data = null);
Exemplo n.º 21
0
 public Blob(ArrayBufferView[] arrayBufferView, object propertyBag = null) { }
Exemplo n.º 22
0
 public void CompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, ArrayBufferView data)
 {
 }
 public void bufferData(GLenum target, ArrayBufferView data, GLenum usage)
 {
     Invoke("bufferData", target, data.Object, usage);
 }
Exemplo n.º 24
0
 public void CompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, ArrayBufferView data)
 {
 }
 public void texImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, ArrayBufferView pixels)
 {
     Invoke("texImage2D", target, level, internalformat, width, height, border, format, type, pixels.Object);
 }
Exemplo n.º 26
0
 public void ReadPixels(int x, int y, int width, int height, int format, int type, ArrayBufferView pixels)
 {
 }
 public virtual void TexSubImage2D(uint target, int level, int xoffset, int yoffset, int width, int height, uint format, uint type, ArrayBufferView pixels) { }
Exemplo n.º 28
0
 public static void TestMethod(ArrayBufferView array, string name)
 {
     Assert.True(array != null, string.Format("ArrayBufferView is an alias of {0}", name));
 }
Exemplo n.º 29
0
 public void send(ArrayBufferView data = null);
 public void bufferData(GLenum target, ArrayBufferView data, GLenum usage)
 {
     Invoke("bufferData", target, data.Object, usage);
 }
 public virtual void BufferData(uint target, ArrayBufferView data, uint usage)
 {
 }
 public void texImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, ArrayBufferView pixels)
 {
     Invoke("texImage2D", target, level, internalformat, width, height, border, format, type, pixels.Object);
 }
Exemplo n.º 33
0
 public void Send(ArrayBufferView data)
 {
 }
Exemplo n.º 34
0
 public string Decode(ArrayBufferView input, TextDecodeOptions options)
 {
     return(null);
 }
Exemplo n.º 35
0
 public extern HaxeString Decode(ArrayBufferView data);
 public virtual void BufferData(uint target, ArrayBufferView data, uint usage) { }
Exemplo n.º 37
0
 public void Send(ArrayBufferView data)
 {
 }
Exemplo n.º 38
0
 public void AppendBuffer(ArrayBufferView data)
 {
 }
 public void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, ArrayBufferView pixels)
 {
     Invoke("readPixels", x, y, width, height, format, type, pixels);
 }
Exemplo n.º 40
0
 public Blob(ArrayBufferView[] arrayBufferView) { }
Exemplo n.º 41
0
 public ArrayBufferView GetRandomValues(ArrayBufferView array)
 {
     return(default(ArrayBufferView));
 }
Exemplo n.º 42
0
 public string Decode(ArrayBufferView input)
 {
     return(null);
 }