Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
epoxy
GitHub Repository: epoxy/proj11
Path: blob/master/SLICK_HOME/src/org/newdawn/slick/opengl/Texture.java
1461 views
1
package org.newdawn.slick.opengl;
2
3
/**
4
* The description of a texture loaded by the TextureLoader utility
5
*
6
* @author kevin
7
*/
8
public interface Texture {
9
10
/**
11
* Check if the texture has alpha
12
*
13
* @return True if the texture has alpha
14
*/
15
public boolean hasAlpha();
16
17
/**
18
* Get the reference from which this texture was loaded
19
*
20
* @return The reference from which this texture was loaded
21
*/
22
public String getTextureRef();
23
24
/**
25
* Bind the GL context to a texture
26
*/
27
public void bind();
28
29
/**
30
* Get the height of the original image
31
*
32
* @return The height of the original image
33
*/
34
public int getImageHeight();
35
36
/**
37
* Get the width of the original image
38
*
39
* @return The width of the original image
40
*/
41
public int getImageWidth();
42
43
/**
44
* Get the height of the physical texture
45
*
46
* @return The height of physical texture
47
*/
48
public float getHeight();
49
50
/**
51
* Get the width of the physical texture
52
*
53
* @return The width of physical texture
54
*/
55
public float getWidth();
56
57
/**
58
* Get the height of the actual texture
59
*
60
* @return The height of the actual texture
61
*/
62
public int getTextureHeight();
63
64
/**
65
* Get the width of the actual texture
66
*
67
* @return The width of the actual texture
68
*/
69
public int getTextureWidth();
70
71
/**
72
* Destroy the texture reference
73
*/
74
public void release();
75
76
/**
77
* Get the OpenGL texture ID for this texture
78
*
79
* @return The OpenGL texture ID
80
*/
81
public int getTextureID();
82
83
/**
84
* Get the pixel data from the card for this texture
85
*
86
* @return The texture data from the card for this texture
87
*/
88
public byte[] getTextureData();
89
90
}
91