Example #1
0
        public void GenerateMipmap()
        {
            int num = PsmTexture.GenerateMipmap(this.handle);

            if (num != 0)
            {
                Error.ThrowNativeException(num);
            }
        }
Example #2
0
        public void SetPixels(int level, TextureCubeFace cubeFace, Array pixels)
        {
            int num = PsmTexture.SetPixels(this.handle, level, cubeFace, pixels, PixelFormat.None, 0, 0, 0, 0, -1, -1);

            if (num != 0)
            {
                Error.ThrowNativeException(num);
            }
        }
Example #3
0
        public void GenerateMipmap()
        {
            int errorCode = PsmTexture.GenerateMipmap(this.handle);

            if (errorCode != 0)
            {
                Error.ThrowNativeException(errorCode);
            }
        }
Example #4
0
        public void SetPixels(int level, Array pixels)
        {
            int errorCode = PsmTexture.SetPixels(this.handle, level, TextureCubeFace.PositiveX, pixels, PixelFormat.None, 0, 0, 0, 0, -1, -1);

            if (errorCode != 0)
            {
                Error.ThrowNativeException(errorCode);
            }
        }
Example #5
0
        internal Texture(PixelBufferType type, byte[] fileImage, bool mipmap, PixelFormat format)
        {
            int errorCode = PsmTexture.FromImage(type, fileImage, mipmap, format, out this.handle);

            if (errorCode != 0)
            {
                Error.ThrowNativeException(errorCode);
            }
            PsmPixelBuffer.GetInfo(this.handle, out this.type, out this.width, out this.height, out this.level, out this.format, out this.option);
            this.state = new TextureState();
        }
Example #6
0
 public void SetFilter(TextureFilter filter)
 {
     if (this.state.filter.bits != filter.bits)
     {
         int errorCode = PsmTexture.SetFilter(this.handle, ref filter);
         if (errorCode != 0)
         {
             Error.ThrowNativeException(errorCode);
         }
         this.state.filter = filter;
     }
 }
Example #7
0
 public void SetMaxAnisotropy(float anisotropy)
 {
     if (this.state.maxAnisotropy != anisotropy)
     {
         int num = PsmTexture.SetMaxAnisotropy(this.handle, anisotropy);
         if (num != 0)
         {
             Error.ThrowNativeException(num);
         }
         this.state.maxAnisotropy = anisotropy;
     }
 }
Example #8
0
 public void SetWrap(TextureWrap wrap)
 {
     if (this.state.wrap.bits != wrap.bits)
     {
         int errorCode = PsmTexture.SetWrap(this.handle, ref wrap);
         if (errorCode != 0)
         {
             Error.ThrowNativeException(errorCode);
         }
         this.state.wrap = wrap;
     }
 }
Example #9
0
        public void SetPixels(int level, TextureCubeFace cubeFace, Array pixels, PixelFormat format, int offset, int pitch, int dx, int dy, int dw, int dh)
        {
            if (dw < 0 || dh < 0)
            {
                dh = (dw = int.MaxValue);
            }
            int num = PsmTexture.SetPixels(this.handle, level, cubeFace, pixels, format, offset, pitch, dx, dy, dw, dh);

            if (num != 0)
            {
                Error.ThrowNativeException(num);
            }
        }