Thanks for all the replies, really appreciate the help.
i’ll try responding to all the input.
For the vsync, yes, that’s partly why we went fullscreen with a bufferstrategy, since we needed to wait for the vsync to avoid nasty tearing, but on the one that gets 50fps the refresh rate us 75hz and i thought i could atleast match it in framerate.
the locking is there because different modules themselves don’t have any synchronization. they would draw in an inconsistent state because there was no synchronization between the draw thread and them changing the variables due to user input/mouse move. So we moved it up there. The other part of the synchronization is in the event system.
as for the JFrame, it is because at times we need to show a configuration screen. in a previous version i had the components being added to the JFrame and then calling paintAll using the graphics from the bufferstrategy, unfortunately this didn’t do much. So as an ugly hack we added them to the rootpane and update it, and that worked, with all sort of nasty side effects, and we couldn’t use things like comboboxes. So as a solution i moved everything to a second frame hidden behind the first. and i just swap them out. So there’s no real reason for the first one to remain a JFrame, and i’ll change that.
i’ll try the “-Dsun.java2d.pmoffscreen=false” on the linux systems see it that helps, and as for the directx being dissabled on the server system, it’s something i’m working on to correct, seems something/someone did something to the driver.
I beleive the laptop was plugged in at the time, don’t remeber so can’t be 100% sure
as for the rendering code, the only one that’s mine is the main gui, which i’m basing my tests on anyway. that code is
public void drawFrame(Graphics2D e, Rectangle dimensions, int framecount, long redrawtime) {
e.setColor(Color.white);
if (shifting && scrollbuf != null) {
e.drawImage(segment(scrollbuf), (dimensions.width - (currentEntries * (5 + mwidth))) / 2, (height - mheight) / 2, myObserver);
} else {
for (int x = 0; x < currentEntries; x++) {
medias.get(x + entryoffset).drawFrame(e);
}
}
scroll.drawFrame(e);
languages.drawFrame(e, dimensions);
for (GuiButton b : staticchildren) {
b.drawFrame(e);
}
if(level!=null){
welcome = level.getTitle();
welcomemsg = level.getDescription();
Font old = e.getFont();
e.setColor(Color.white);
e.setFont(new Font("Arial", Font.BOLD, 45));
e.drawString(welcome, 10, (int) (start - epad - e.getFontMetrics().getLineMetrics(welcome, e).getHeight() - 10));
e.setFont(new Font("Arial", Font.BOLD, 20));
e.drawString(welcomemsg, 20, (int) (start - epad - e.getFontMetrics().getLineMetrics(welcomemsg, e).getHeight() - 5));
e.drawString(tooltip, (int) ((dimensions.width - e.getFontMetrics().getStringBounds(tooltip, e).getWidth()) / 2),
mheight + epad + start + 50);
e.setFont(old);
}
}
most if not all of the calls in here the calls to drawFrame have internally just a set of images which it choses from depending on the current state and draws them, this to prevent repeated calls to fillrects etc, which was the initial cauze of my first slowdown problem.
I’m a little confused by broumbroum’s post, The first part i get, so you want me to change g to an offscreen image and always draw an image to g instead of really drawing on it. but the second part "context to the correct bufferStrategy " context is any class that implements my IDraw interface. it’s unrelated to the bufferStrategy, maybe this is a case of poor variable names?
Also on a side note, all the other boxes we’ve used to test on ran win2000, and seems from the debug output that it doesn’t support acceleration, or am i reading it wrong?
and really, thanks again for all the replies, you guys have been really helpfull