Основной класс
public class Cars implements GLEventListener {
static Scene1 scene;
@Override
public void init(GLAutoDrawable drawable) {
...
try {
scene.LoadDrum(drawable);
} catch (IOException ex) {
Logger.getLogger(Cars.class.getName()).log(Level.SEVERE, null, ex);
}
}
public static void main(String[] args) {
scene = new Scene1();
scene.Scene();
Cars r = new Cars();
...
}
}
public class Scene1 {
class Image
{
int IndexTexture;
String Name;
int number;
}
static final int CountTexture = 1;
int Scene()
{
image = new Image[CountTexture];
CountIndexTexture = 0;
vectordrum = new Vector<String>();
return 0;
}
int LoadDrum(GLAutoDrawable drawable) throws IOException
{
...
CountIndexTexture++;
image[CountIndexTexture - 1].Name = "auto1";
image[CountIndexTexture - 1].number = CountIndexTexture - 1;
image[CountIndexTexture - 1].IndexTexture = t.getTextureObject(gl);
...
}
}