1
0
Fork 0

Boost de puissance

This commit is contained in:
MrDev023 2015-07-15 21:52:39 +02:00
parent 5ccf998834
commit 69577a9f6a
3 changed files with 83 additions and 29 deletions

View file

@ -15,6 +15,8 @@ public class Main {
private static final String TITLE = "Test VBO";
private static final int width = 1280, height = 720;
private static Thread[] threadArray;
private static Game game;
@ -29,12 +31,26 @@ public class Main {
Display.setResizable(true);
Mouse.setGrabbed(true);
Display.create();
threadArray = new Thread[Runtime.getRuntime().availableProcessors()];
game = new Game();
loop();
} catch (Exception e) {
}
}
public static Thread addThread(Thread t){
for(Thread c : threadArray){
c = t;
try {
c.join();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return t;
}
/**
* @Info Boucle principal avec Timer