internal PixelBuffer(PixelBufferType type, int width, int height, bool mipmap, PixelFormat format, PixelBufferOption option, InternalOption option2) { int errorCode = PsmPixelBuffer.Create(type, width, height, mipmap, format, option, option2, 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); }
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(); }