public void GenerateMipmap() { int num = PsmTexture.GenerateMipmap(this.handle); if (num != 0) { Error.ThrowNativeException(num); } }
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); } }
public void GenerateMipmap() { int errorCode = PsmTexture.GenerateMipmap(this.handle); if (errorCode != 0) { Error.ThrowNativeException(errorCode); } }
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); } }
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(); }
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; } }
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; } }
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; } }
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); } }