@@ -46,6 +46,8 @@ public class TextureImage {
46
46
47
47
/**
48
48
* Enum specifying the shader access hint of the image.
49
+ * <p>
50
+ * Shader accesses that violate the hint may result in undefined behavior.
49
51
*/
50
52
public enum Access {
51
53
@@ -110,12 +112,15 @@ public int getGlEnum() {
110
112
public TextureImage (Texture texture ) {
111
113
this (texture , 0 , -1 , Access .ReadWrite );
112
114
}
115
+
113
116
public TextureImage (Texture texture , Access access ) {
114
117
this (texture , 0 , -1 , access );
115
118
}
119
+
116
120
public TextureImage (Texture texture , int level , int layer ) {
117
121
this (texture , level , layer , Access .ReadWrite );
118
122
}
123
+
119
124
public TextureImage (Texture texture , int level , int layer , Access access ) {
120
125
this .texture = Objects .requireNonNull (texture , "Underlying texture cannot be null" );
121
126
this .level = level ;
@@ -133,7 +138,7 @@ public TextureImage(Texture texture, int level, int layer, Access access) {
133
138
* to an image unit. Additionally, the image must be bound beforehand using
134
139
* {@link GL2#glBindTexture(int, int)}.
135
140
*
136
- * @param gl4 OpenGL4 implementation (not null)
141
+ * @param gl4 GL4 implementation (not null)
137
142
* @param texUtil utility used to convert JME's image format to the corresponding GL enum (not null)
138
143
* @param unit texture unit to bind to
139
144
*/
@@ -165,7 +170,7 @@ public boolean clearUpdateNeeded() {
165
170
/**
166
171
* Sets the underlying texture wrapped by this TextureImage.
167
172
*
168
- * @param texture
173
+ * @param texture wrapped texture (not null)
169
174
*/
170
175
public void setTexture (Texture texture ) {
171
176
Objects .requireNonNull (texture , "Wrapped texture cannot be null." );
@@ -180,8 +185,10 @@ public void setTexture(Texture texture) {
180
185
* <p>
181
186
* The level controls which mipmap level will be bound to the texture unit,
182
187
* where zero corresponds to the base level of the texture.
188
+ * <p>
189
+ * default=0
183
190
*
184
- * @param level level to bind (cannot be negative)
191
+ * @param level level to bind (not negative)
185
192
*/
186
193
public void setLevel (int level ) {
187
194
if (level < 0 ) {
@@ -199,6 +206,8 @@ public void setLevel(int level) {
199
206
* If the underlying texture is a one/two/three demensional array,
200
207
* cube map, cube map array, two demensional multisample array, then this
201
208
* specifies which layer of the array to bind.
209
+ * <p>
210
+ * default=-1
202
211
*
203
212
* @param layer layer to bind, or negative to bind all layers
204
213
*/
0 commit comments