903 |
/** Add a dependency. |
/** Add a dependency. |
904 |
* Adds an object that mustn't get garbage collected |
* Adds an object that mustn't get garbage collected |
905 |
* before this one. |
* before this one. |
906 |
|
* For example, if you use a texture id that you get from |
907 |
|
* a GL.Texture object's getTexId() method, you should |
908 |
|
* probably ensure that that texture won't get deleted |
909 |
|
* before this display list. Calling displayList.addDepend() |
910 |
|
* with the texture object ensures this as it stores a reference |
911 |
|
* to the texture in this display list. |
912 |
*/ |
*/ |
913 |
public void addDepend(Object o) { |
public void addDepend(Object o) { |
914 |
if(depends == null) depends = new ArrayList(); |
if(depends == null) depends = new ArrayList(); |