I brought this up in the OpenGL group, but haven't found an answer yet. How does one enable multisampling using lwjgl? I can't find any tutorials or information on it anywhere.
set a value (>0) in the samples parameter in the Display.create method
Multisampling needs to be done at the Display creation by setting the samples parameter in PixelFormat to more than zero. (you need to then give that PixelFormat to the Display.create() method, of course)
I think that's right, at any rate :lol:
EDIT: Dah! how did you beat me!?!?!?! :shock:
Please forgive my "n00bness" but after trying this for a while, I'm not seeing how to fit this into my autodetect-supported-formats loop:
DisplayMode modes[] = Display.getAvailableDisplayModes();
boolean modeFound = false;
for (int i = 0; i < modes.length; i++) {
if (modes[i].getWidth() == WIDTH &&
modes[i].getHeight() == HEIGHT &&
modes[i].getBitsPerPixel() == displayBPP) {
modeFound = true;
Display.setDisplayMode(modes[i]);
break;
}
}
Is there a way to detect supported PixelFormats on a machine? I've tried passing different numbers into the PixelFormat() constructor, but nothing seems to work. I've tried PixelFormat(0,8,0,1), PixelFormat(8,24,0,1), PixelFormat(0,8,0,8 ), etc.. All of them come back with a "Could not find a suitable ARB pixel format."