raft,
using your code now as of recent suggestion by Egon - works great - thanks!
Achim
using your code now as of recent suggestion by Egon - works great - thanks!
Achim
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuJava version is: 1.6.0_17
-> support for BufferedImage
Version helper for 1.2+ initialized!
-> using BufferedImage
Software renderer (OpenGL mode) initialized
Using LWJGL's AWTGLCanvas
Software renderer disposed
Driver is: RDPDD/6.1.7600.16385 on NVIDIA Corporation / GeForce GT 220/PCI/SSE2
GL_ARB_texture_env_combine supported and used!
FBO supported and used!
OpenGL renderer initialized (using 4 texture stages)
Hardware supports textures up to 8192*8192 in size!
Adding Lightsource: 0
Subobject of object 2/object4 compiled using 2400 vertices in 62ms!
Object 2/object4 compiled to 1 subobjects in 101ms!
Subobject of object 0/object2 compiled using 2400 vertices in 19ms!
Object 0/object2 compiled to 1 subobjects in 29ms!
Subobject of object 1/object3 compiled using 48 vertices in 0ms!
Object 1/object3 compiled to 1 subobjects in 0ms!
Additional visibility list (2) created with size: 4096
Additional visibility list (3) created with size: 4096
Compiled 3 display lists!
8
54
60
61
60
61
60
60
61
60
61
61
60
Visibility lists disposed!
@Override
public void paint(Graphics g) {
final int millisToPaint = 1000/framesPerSec; //time interval for new paint (in thread awt)
long millisSinceLastPaint = System.currentTimeMillis()-lastTimePainted;
if (millisSinceLastPaint < millisToPaint) {
try { thread.sleep(millisToPaint - millisSinceLastPaint); }
catch (Exception e) {
System.out.println(Thread.currentThread());
System.out.println("$3 " + e);
}
} else {
try {
// System.out.println("paint called at" + System.currentTimeMillis());
buffer.clear(Color.DARK_GRAY);
md.synchPositions();
if (SW_RENDERING) {
// if (millisSinceLastPaint < millisToPaint) {
// thread.sleep(millisToPaint - millisSinceLastPaint);
// }
world.renderScene(buffer);
world.draw(buffer);
drawAnnotations();
buffer.update();
buffer.display(g);
} else {
if (sh != null) {
sh.updateShadowMap();
sh.drawScene();
}
drawAnnotations();
buffer.update();
buffer.displayGLOnly();
canvas.repaint();
}
} catch (Exception e) {
//the SW renderer sometimes produces concurrent access and nullpointer exceptions
System.out.println(Thread.currentThread());
System.out.println("$3 " + e + " " + canvas);
}
lastTimePainted = System.currentTimeMillis();
}
}
Page created in 0.017 seconds with 12 queries.