@@ -46,6 +46,8 @@ public class TextureImage {
4646
4747 /**
4848 * Enum specifying the shader access hint of the image.
49+ * <p>
50+ * Shader accesses that violate the hint may result in undefined behavior.
4951 */
5052 public enum Access {
5153
@@ -110,12 +112,15 @@ public int getGlEnum() {
110112 public TextureImage (Texture texture ) {
111113 this (texture , 0 , -1 , Access .ReadWrite );
112114 }
115+
113116 public TextureImage (Texture texture , Access access ) {
114117 this (texture , 0 , -1 , access );
115118 }
119+
116120 public TextureImage (Texture texture , int level , int layer ) {
117121 this (texture , level , layer , Access .ReadWrite );
118122 }
123+
119124 public TextureImage (Texture texture , int level , int layer , Access access ) {
120125 this .texture = Objects .requireNonNull (texture , "Underlying texture cannot be null" );
121126 this .level = level ;
@@ -133,7 +138,7 @@ public TextureImage(Texture texture, int level, int layer, Access access) {
133138 * to an image unit. Additionally, the image must be bound beforehand using
134139 * {@link GL2#glBindTexture(int, int)}.
135140 *
136- * @param gl4 OpenGL4 implementation (not null)
141+ * @param gl4 GL4 implementation (not null)
137142 * @param texUtil utility used to convert JME's image format to the corresponding GL enum (not null)
138143 * @param unit texture unit to bind to
139144 */
@@ -165,7 +170,7 @@ public boolean clearUpdateNeeded() {
165170 /**
166171 * Sets the underlying texture wrapped by this TextureImage.
167172 *
168- * @param texture
173+ * @param texture wrapped texture (not null)
169174 */
170175 public void setTexture (Texture texture ) {
171176 Objects .requireNonNull (texture , "Wrapped texture cannot be null." );
@@ -180,8 +185,10 @@ public void setTexture(Texture texture) {
180185 * <p>
181186 * The level controls which mipmap level will be bound to the texture unit,
182187 * where zero corresponds to the base level of the texture.
188+ * <p>
189+ * default=0
183190 *
184- * @param level level to bind (cannot be negative)
191+ * @param level level to bind (not negative)
185192 */
186193 public void setLevel (int level ) {
187194 if (level < 0 ) {
@@ -199,6 +206,8 @@ public void setLevel(int level) {
199206 * If the underlying texture is a one/two/three demensional array,
200207 * cube map, cube map array, two demensional multisample array, then this
201208 * specifies which layer of the array to bind.
209+ * <p>
210+ * default=-1
202211 *
203212 * @param layer layer to bind, or negative to bind all layers
204213 */
0 commit comments