/** * @param pWidth must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024). * @param pHeight must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024). * @param pTextureOptions the (quality) settings of the Texture. * @param pTextureStateListener to be informed when this {@link Texture} is loaded, unloaded or a {@link ITextureSource} failed to load. */ protected void Init(int pWidth, int pHeight, TextureOptions pTextureOptions, ITextureStateListener pTextureStateListener) /* throws IllegalArgumentException */ { if (!MathUtils.IsPowerOfTwo(pWidth) || !MathUtils.IsPowerOfTwo(pHeight)) { throw new IllegalArgumentException("Width and Height of a Texture must be a power of 2!"); } this.mWidth = pWidth; this.mHeight = pHeight; this.mTextureOptions = pTextureOptions; this.mTextureStateListener = pTextureStateListener; }
/** * @param pWidth must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024). * @param pHeight must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024). * @param pTextureOptions the (quality) settings of the Texture. * @param pTextureStateListener to be informed when this {@link BuildableTexture} is loaded, unloaded or a {@link ITextureSource} failed to load. */ public BuildableTexture(int pWidth, int pHeight, TextureOptions pTextureOptions, ITextureStateListener pTextureStateListener) /* throws IllegalArgumentException */ : base(pWidth, pHeight, pTextureOptions, pTextureStateListener) { }
/** * @param pWidth must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024). * @param pHeight must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024). * @param pTextureStateListener to be informed when this {@link BuildableTexture} is loaded, unloaded or a {@link ITextureSource} failed to load. */ public BuildableTexture(int pWidth, int pHeight, ITextureStateListener pTextureStateListener) : base(pWidth, pHeight, TextureOptions.DEFAULT, pTextureStateListener) { }
/** * @param pWidth must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024). * @param pHeight must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024). * @param pTextureOptions the (quality) settings of the Texture. * @param pTextureStateListener to be informed when this {@link Texture} is loaded, unloaded or a {@link ITextureSource} failed to load. */ public Texture(int pWidth, int pHeight, TextureOptions pTextureOptions, ITextureStateListener pTextureStateListener) /* throws IllegalArgumentException */ { Init(pWidth, pHeight, pTextureOptions, pTextureStateListener); }
/** * @param pWidth must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024). * @param pHeight must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024). * @param pTextureStateListener to be informed when this {@link Texture} is loaded, unloaded or a {@link ITextureSource} failed to load. */ public Texture(int pWidth, int pHeight, ITextureStateListener pTextureStateListener) { Init(pWidth, pHeight, TextureOptions.DEFAULT, pTextureStateListener); }