public static D3DGraphicsDevice createDevice(int screen) {
if (!d3dAvailable) {
return null;
}
ContextCapabilities d3dCaps = getDeviceCaps(screen);
// could not initialize the device successfully
if ((d3dCaps.getCaps() & CAPS_DEVICE_OK) == 0) {
if (WindowsFlags.isD3DVerbose()) {
System.out.println("Could not enable Direct3D pipeline on " +
"screen " + screen);
}
return null;