Windows: Moved pixel format logic from WindowsDisplayPeerInfo.initDC to WindowsDisplay.createWindow

This commit is contained in:
Elias Naur 2008-05-01 09:55:54 +00:00
parent bf4b5a5890
commit b11fcc99f6
2 changed files with 6 additions and 2 deletions

View file

@ -174,6 +174,8 @@ final class WindowsDisplay implements DisplayImplementation {
throw new LWJGLException("Failed to get dc");
}
peer_info.initDC(getHwnd(), getHdc());
int format = WindowsPeerInfo.choosePixelFormat(getHdc(), 0, 0, peer_info.getPixelFormat(), null, true, true, false, true);
WindowsPeerInfo.setPixelFormat(getHdc(), format);
showWindow(getHwnd(), SW_SHOWDEFAULT);
if (parent == null) {
setForegroundWindow(getHwnd());