LWJGL
May 23, 2013, 06:43:55 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL 2.9.0 released!
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: Unable to create display  (Read 4148 times)
Kikketer
Newbie
*
Posts: 2


WWW
« on: November 15, 2006, 07:02:11 »

I followed the wiki tutorial:
http://lwjgl.org/wiki/doku.php/lwjgl/tutorials/display/basicdisplay

My code is the same so I won't bore you with example code, but I'm getting an error:
"Unable to create display"

This is after failing the following code:
Code:

//Create the display
try {
 Display.setDisplayMode(chosenMode);
 Display.setTitle("An Example Title");
 Display.create();
} catch (LWJGLException e) {
 Sys.alert("Error", "Unable to create display");
 System.exit(0);
}


Before getting here I System.out.println the chosenMode.toString(), and it prints 640 x 480 x 16 @70Hz so I know it's available.
Do I need to install OpenGL or some such thing to get this to work??
Logged
Matzon
Administrator
Demigod
*****
Posts: 2239



« Reply #1 on: November 15, 2006, 10:00:33 »

what is the exception?
do you have an OpenGL capable graphics card ?
Logged

Kikketer
Newbie
*
Posts: 2


WWW
« Reply #2 on: November 16, 2006, 06:11:42 »

Ok with:
Code:

Sys.alert("Error", e.getMessage());

It says "Could  not find a valid pixel format"

I checked with the desktop properties and found that I can only refresh at 60 or 75Hz, not 70.
How can I change this?
Logged
ndhb
Regular nerd
**
Posts: 70


« Reply #3 on: November 16, 2006, 06:48:40 »

Most of us use something like:
Code:
for (int i = 0; i < d.length; i++) {
System.err.println("Width " + d[i].getWidth() + " Height " + d[i].getHeight() + " Bits " + d[i].getBitsPerPixel() + " Freq " + d[i].getFrequency()); // DEBUG: display modes
if ((d[i].getWidth() == WIDTH && d[i].getHeight() == HEIGHT && d[i].getBitsPerPixel() == BPP && d[i].getFrequency() == REFRESH)) {
displayMode = d[i];
break;
} // if reasonable display mode detected
} // for all display modes


For something thats not "production code". Maybe you can find a valid pixel format that way.

- Nicolai de Haan Brøgger
Logged
fredrikbridell
Newbie
*
Posts: 1


WWW
« Reply #4 on: December 15, 2006, 07:02:22 »

I just wanted to add that I had exactly this problem. I had previously managed to install LWJGL and run some simple stuff, when it suddenly stopped working, giving me the error "Could  not find a valid pixel format" even though I was clearly using a pixel format that should be ok. I should add that my graphics card and other OpenGL apps seemed to working fine.

Solution: I downloaded and installed new drivers for the graphics card anyway. Now it works.

I don't know if this is relevant, but the problem occurred after I used the TV-out thing on my graphics card for the first time.
Logged
krasse
Newbie
*
Posts: 10


« Reply #5 on: April 03, 2009, 00:35:38 »

Many of my users have this problem and I keep telling them to update their drivers but that seems to be a tricky thing to do sometimes. I just wonder if there is any good reference page for this problem. I found one page for the Tribal Trouble support page http://www.tribaltrouble.com/supportdriver?os=w that seems very good but I don't want to simply steal this information.

If this kind of resource doesn't exist, I would like to create one myself (or with your help) that every LWJGL developer can link to. Is the wiki a good place for this perhaps?
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!