Exemplo n.º 1
0
        /// <summary>
        /// Creates a Texture wrapper for the specified GL texture native handle
        /// <param name="nativePointer">GLuint texture name</param>
        /// </summary>
        public static Texture WrapGLTexture(object texture, IntPtr nativePointer,
                                            int width, int height, int numMipMaps, Format format, bool isInverted)
        {
            Texture tex = WrapGL(nativePointer, width, height, numMipMaps, (int)format, isInverted);

            if (texture != null)
            {
                tex.SetPrivateData(new ManagedTexture {
                    Texture = texture
                });
            }

            return(tex);
        }