@@ -55,20 +55,33 @@ public int getHeight() {
5555 /**
5656 * Binds the texture to the specified texture unit for rendering.
5757 *
58+ * <p>Binding a texture makes it available for use in subsequent rendering operations. The texture
59+ * unit represents a specific slot in the graphics pipeline to which the texture is assigned.
60+ *
5861 * @param unit the texture unit to bind this texture to.
62+ * @see #unbind()
5963 */
6064 @ Override
6165 public void bind (int unit ) {
6266 texture .bind (unit );
6367 }
6468
65- /** Unbinds the texture from its currently bound texture unit. */
69+ /**
70+ * Unbinds the texture from its currently bound texture unit.
71+ *
72+ * <p>Once a texture is unbound, it is no longer available for rendering until it is bound again.
73+ */
6674 @ Override
6775 public void unbind () {
6876 texture .unbind ();
6977 }
7078
71- /** Deletes the texture and releases any associated resources. */
79+ /**
80+ * Deletes the texture and releases any associated resources.
81+ *
82+ * <p>This method should be called when the texture is no longer needed to free up GPU memory.
83+ * After a texture is deleted, it cannot be used for rendering unless it is recreated.
84+ */
7285 @ Override
7386 public void delete () {
7487 texture .delete ();
@@ -77,7 +90,11 @@ public void delete() {
7790 /**
7891 * Updates the pixel data of the texture.
7992 *
93+ * <p>This method replaces the existing texture data with new pixel values. The pixel data must
94+ * match the dimensions of the texture.
95+ *
8096 * @param pixels an array of pixel data to set for this texture.
97+ * @throws IllegalArgumentException if the pixel array size does not match the texture dimensions.
8198 */
8299 @ Override
83100 public void setPixels (int [] pixels ) {
@@ -87,6 +104,9 @@ public void setPixels(int[] pixels) {
87104 /**
88105 * Gets the filter mode currently applied to the texture.
89106 *
107+ * <p>The filter mode determines how the texture is sampled when it is magnified or minified
108+ * during rendering. Common filter modes include nearest-neighbor and linear filtering.
109+ *
90110 * @return the filter mode of the texture.
91111 * @see FilterMode
92112 */
@@ -98,6 +118,10 @@ public FilterMode getFilterMode() {
98118 /**
99119 * Sets the filter mode for the texture.
100120 *
121+ * <p>The filter mode controls how the texture is sampled when rendered at different sizes. For
122+ * example, linear filtering smooths the texture when scaled, while nearest-neighbor filtering
123+ * preserves sharp edges.
124+ *
101125 * @param filterMode the desired filter mode to apply to the texture.
102126 * @see FilterMode
103127 */
@@ -106,9 +130,42 @@ public void setFilterMode(FilterMode filterMode) {
106130 texture .setFilterMode (filterMode );
107131 }
108132
133+ /**
134+ * Gets the texture wrapping mode currently applied to this texture.
135+ *
136+ * <p>The texture wrap mode controls how the texture is applied when texture coordinates exceed
137+ * the [0, 1] range. For example, in {@link TextureWrapMode#REPEAT}, the texture will tile
138+ * infinitely, whereas in {@link TextureWrapMode#CLAMP}, the texture's edge pixels are stretched.
139+ *
140+ * @return the {@link TextureWrapMode} applied to the texture.
141+ */
142+ @ Override
143+ public TextureWrapMode getTextureWrapMode () {
144+ return texture .getTextureWrapMode ();
145+ }
146+
147+ /**
148+ * Sets the texture wrapping mode for this texture.
149+ *
150+ * <p>This method controls how the texture is mapped outside the standard [0, 1] texture
151+ * coordinate range. Use {@link TextureWrapMode#REPEAT} to tile the texture across a surface, or
152+ * {@link TextureWrapMode#CLAMP} to stretch the texture's edge pixels when coordinates exceed the
153+ * valid range.
154+ *
155+ * @param textureWrapMode the new {@link TextureWrapMode} to apply to the texture.
156+ */
157+ @ Override
158+ public void setTextureWrapMode (TextureWrapMode textureWrapMode ) {
159+ this .texture .setTextureWrapMode (textureWrapMode );
160+ }
161+
109162 /**
110163 * Retrieves the backend texture instance used by this facade.
111164 *
165+ * <p>This method provides access to the underlying texture object managed by the {@link
166+ * TextureManager}. It is useful for accessing low-level or engine-specific features not exposed
167+ * by the {@link Texture2D} class.
168+ *
112169 * @return the underlying {@link Texture} instance.
113170 */
114171 @ Override
0 commit comments