-
Notifications
You must be signed in to change notification settings - Fork 118
Expand file tree
/
Copy pathTextureArrayData.java
More file actions
49 lines (38 loc) · 1.76 KB
/
TextureArrayData.java
File metadata and controls
49 lines (38 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package arc.graphics;
import arc.graphics.gl.*;
/**
* Used by a {@link TextureArray} to load the pixel data. The TextureArray will request the TextureArrayData to prepare itself through
* {@link #prepare()} and upload its data using {@link #consumeTextureArrayData()}. These are the first methods to be called by TextureArray.
* After that the TextureArray will invoke the other methods to find out about the size of the image data, the format.
* </p>
* <p>
* Before a call to either {@link #consumeTextureArrayData()}, TextureArray will bind the OpenGL ES texture.</p>
* <p>
* Look at {@link FileTextureArrayData} for example implementation of this interface.
* @author Tomski
*/
public interface TextureArrayData{
/** @return whether the TextureArrayData is prepared or not. */
boolean isPrepared();
/**
* Prepares the TextureArrayData for a call to {@link #consumeTextureArrayData()}. This method can be called from a non OpenGL thread and
* should thus not interact with OpenGL.
*/
void prepare();
/**
* Uploads the pixel data of the TextureArray layers of the TextureArray to the OpenGL ES texture. The caller must bind an OpenGL ES texture. A
* call to {@link #prepare()} must preceed a call to this method. Any internal data structures created in {@link #prepare()}
* should be disposed of here.
*/
void consumeTextureArrayData();
/** @return the width of this TextureArray */
int getWidth();
/** @return the height of this TextureArray */
int getHeight();
/** @return the layer count of this TextureArray */
int getDepth();
/** @return the internal format of this TextureArray */
int getInternalFormat();
/** @return the GL type of this TextureArray */
int getGLType();
}