LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: smith on November 13, 2007, 20:28:52

Title: Display.create() fails when screen in portrait mode.
Post by: smith on November 13, 2007, 20:28:52
I have a windowed app that I have written for a friend who insists on having his display in portrait mode. However when in this mode Display.create() always throws an exception. It works fine when in landscape but the following exception when in portrait:

Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7

org.lwjgl.LWJGLException: Could not find a valid pixel format at org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat(Native Method)
        at org.lwjgl.opengl.WindowsPeerInfo.choosePixelFormat(WindowsPeerInfo.java:52)
        at org.lwjgl.opengl.WindowsDisplayPeerInfo.initDC(WindowsDisplayPeerInfo.java:54)
        at org.lwjgl.opengl.WindowsDisplay.createWindow(WindowsDisplay.java:150)
        at org.lwjgl.opengl.Display.createWindow(Display.java:260)
        at org.lwjgl.opengl.Display.create(Display.java:757)
        at org.lwjgl.opengl.Display.create(Display.java:709)

I have tried having him change his display to several different bit depths and resolutions without success.
I have also tried a few different PixelFormat's all with the same results.
Title: Re: Display.create() fails when screen in portrait mode.
Post by: Matzon on November 14, 2007, 06:32:39
what OS is this ? (and what is RXTX-2.1-7 ??)
Title: Re: Display.create() fails when screen in portrait mode.
Post by: smith on November 15, 2007, 01:59:52
Windows XP, ignore the RXTX bit, it's just a serial port library.