Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (116)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  gl.create() problems - mode not supported  (Read 2992 times)
0 Members and 1 Guest are viewing this topic.
Offline Falken224

Senior Newbie




Ooooooh!  Look at the pretty Stars.


« Posted 2003-05-21 11:41:12 »

I've copied code nearly exactly from several of the tutorials I've seen on this site.  The only problem is anytime I try to do a gl.create() I get the following exception:

1  
2  
3  
4  
5  
6  
7  
8  
java.lang.Exception: Mode not supported by hardware
      at org.lwjgl.opengl.BaseGL.nCreate(Native Method)
      at org.lwjgl.opengl.BaseGL.doCreate(Unknown Source)
      at org.lwjgl.opengl.GL.doCreate(Unknown Source)
      at org.lwjgl.Window.create(Unknown Source)
      at com.rn.artillery.Tutorial.initialize(Tutorial.java:37)
      at com.rn.artillery.Tutorial.execute(Tutorial.java:23)
      at com.rn.artillery.Tutorial.main(Tutorial.java:245)

Here's the relevant code:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
  private void initialize()
  {
    try
    {
      mode=findDisplayMode(800,600,16);

      System.out.println(mode.width+","+mode.height+","+mode.bpp+","+mode.freq);
     
      gl=new GL("Test", 50,50,mode.width,mode.height,mode.bpp,0,0,0);
      gl.create();
      glu=new GLU(gl);

      glInit();

      Keyboard.create();
      quadPosition = new Vector2f(100f,100f);
      quadVelocity = new Vector2f(1.0f,1.0f);
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
  }

  private DisplayMode findDisplayMode(int width, int height, int bpp)
  {
    DisplayMode[] modes = Display.getAvailableDisplayModes();
    for(int loop=0; loop<modes.length; loop++)
    {
      if(modes[loop].width==width
        && modes[loop].height==height
        && modes[loop].bpp>=bpp
        && modes[loop].freq==60)
          return modes[loop];
    }
    return null;
  }


Any help anybody?  I KNOW the particular mode *IS* supported, so I don't think that's it.  Sorry for a newless clewbie type question, but this has got me stumped.

-NateBob
 Brother Of Phil
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #1 - Posted 2003-05-21 12:30:39 »

Hm thats just pain odd...
platform?
whats the output from using the -ea switch?
Whats the output from:
1  
  System.out.println(mode.width+","+mode.height+","+mode.bpp+","+mode.freq ); 
?

Offline Falken224

Senior Newbie




Ooooooh!  Look at the pretty Stars.


« Reply #2 - Posted 2003-05-21 12:50:57 »

Well, here's raw output for you: with the -ea switch:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
Removed 0 duplicate displaymodes
800,600,16,60  //That's my System.out.println you were asking about
java.lang.Exception: Mode not supported by hardware
      at org.lwjgl.opengl.BaseGL.nCreate(Native Method)
      at org.lwjgl.opengl.BaseGL.doCreate(Unknown Source)
      at org.lwjgl.opengl.GL.doCreate(Unknown Source)
      at org.lwjgl.Window.create(Unknown Source)
      at com.rn.artillery.Tutorial.initialize(Tutorial.java:37)
      at com.rn.artillery.Tutorial.execute(Tutorial.java:23)
      at com.rn.artillery.Tutorial.main(Tutorial.java:245)
Selecting NT display mode check
Querying Real 3D Starfighter device
Querying NetMeeting driver device
Found 49 displaymodes
Window registered
Created window
Pixel format is 4
Destroying directinput
Releasing DC
Destroy window
Destroyed window
Debugger disconnected from local process.
Process exited with exit code 0.


Helpful?

-Nate

-NateBob
 Brother Of Phil
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Mojomonkey

Senior Member




ooh ooh eee eeee


« Reply #3 - Posted 2003-05-21 12:58:47 »

I noticed this line:

Querying NetMeeting driver device

Do you have net meeting running? Net meeting will disable Hardware acceleration, which may be what is causing the Display Mode not to be found.

Don't send a man to do a monkey's work.
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #4 - Posted 2003-05-21 13:09:44 »

Thats not the problem - it is always being queried - all devices are. I am looking into it...

Can you run the tests from the distribution?

Offline Falken224

Senior Newbie




Ooooooh!  Look at the pretty Stars.


« Reply #5 - Posted 2003-05-21 13:10:21 »

Quote
Do you have net meeting running?


Not that I know of.  I don't even know what that is.  This is a work computer, so they could have anything on it.  *rolls eyes*  Just kind of playing around with this stuff on lunch hours to prep for the REAL development at home.

Yeah . . . that's what I'm doing.  Wink

Seriously, though.  Went through the list of services and the 'NetMeeting Remote' service wasn't running.

Also forgot platform.  I'm running Win2k on a box with . . . 600+MB RAM, and even though the case is stamped with a Pentium III logo, I think it's a P2 . . . couldn't tell you what speed, and a piece of crap graphics card that streteches the definition of "accelleration"

-NateBob
 Brother Of Phil
Offline Falken224

Senior Newbie




Ooooooh!  Look at the pretty Stars.


« Reply #6 - Posted 2003-05-21 13:14:03 »

Here's output from WindowCreationTest.class
1  
2  
3  
4  
5  
6  
7  
8  
Removed 0 duplicate displaymodes
Found 49 display modes
java.lang.Exception: Mode not supported by hardware
      at org.lwjgl.opengl.BaseGL.nCreate(Native Method)
      at org.lwjgl.opengl.BaseGL.doCreate(Unknown Source)
      at org.lwjgl.opengl.GL.doCreate(Unknown Source)
      at org.lwjgl.Window.create(Unknown Source)
      at org.lwjgl.test.WindowCreationTest.main(Unknown Source)Display created

Then it hangs.   :-/  I have to kill it manually.

(edited to add ---)
FullScreenWindowedTest.class has similar output I can post that if you need it.

-NateBob
 Brother Of Phil
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #7 - Posted 2003-05-21 13:18:24 »

lol - wtf is going on - You do have a Graphics card installed?   Grin

I am think that this has something to do with it:
Quote
and a piece of crap graphics card that streteches the definition of "accelleration"


Does it run OpenGL applications at all?
Try this application:
http://www.realtech-vr.com/glview/

does that shed some light on the issue?

Offline Falken224

Senior Newbie




Ooooooh!  Look at the pretty Stars.


« Reply #8 - Posted 2003-05-21 13:29:21 »

Okay . . . I'm saved from feeling like a COMPLETE idiot . . .

Tested OpenGL . . . saw the nifty spinning cube and everything.  I KNEW I'd used OpenGL stuff before.

But that was for OpenGL1.1 interfaces.  When it got to 1.2 interfaces it freaked out.

In the report section it says: "No Hardware Support"

Is that mandatory for LWJGL to run?

Here's all the stuff my system DOESN'T support.

-No hardware support
-No compiled vertex array.
-No 8bit palette texture support.
-No multitexturing extension.
-No secondary color support.
-No S3TC compression support.
-No Texture Edge Clamp extension.
-No vertex program extension found
-No Fragment program extension found.
-No ICD Registry Entry.
-Few texture units found.

Like I said . . . crappy, but I'm positive I've at least done BASIC openGL stuff before . . . I think.  I'm gonna feel like a twit if this is really the problem.  (Mebbe it was D3D . . . hmm)

(edited to add --)
Hmm . . . looks like it might be defaulting to some standard Microsoft software OpenGL renderer . . . which would explain why that spinning cube was rendering at a whopping 3 fps.  Roll Eyes

Who needs fast . . . and if it doesn't work at all . . . well . . . so be it.  I'll wait 'til Sept. when we get new workstations.

-NateBob
 Brother Of Phil
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #9 - Posted 2003-05-21 13:39:46 »

heh - AFAIK, it should fail gracefully. But I have never tested it - my hardware is to new  Cool

In any event, the error message could be much more constructive - I'll see what we can do about it... in the mean time, do you have any other somewhat similar workstations, you could test?

If I am not mistaking, shouldn't all windows implementations have a SW GL mode? *ponder*

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Falken224

Senior Newbie




Ooooooh!  Look at the pretty Stars.


« Reply #10 - Posted 2003-05-21 13:47:23 »

Quote
in the mean time, do you have any other somewhat similar workstations, you could test?


Unfortunately no.  I've been pushing hard for better equipment . . . at LEAST a dual monitor setup . . . but to no avail (I'm the ONLY developer w/o one  Angry ).  Fortunately, we FINALLY get to requisition new stuff in June, but then there's a mandatory 90 day delay.  Damn the state budgets.   Angry

As for hijacking someone else's computer for a bit . . . mebbe, but doubtful.  IS Dept would freak already if they saw half the stuff I have installed on THIS one.  One of the perks of being a developer . . . they rarely check. Smiley

Lemme know if there's any other info you need.

-Nate

-NateBob
 Brother Of Phil
Offline princec

JGO Kernel


Medals: 380
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #11 - Posted 2003-05-21 14:44:14 »

This is a graceful failure! It says exactly what the problem is in the exception - the mode's not supported by hardware and LWJGL is a hardware acceleration API only!

So you're stuffed Smiley Sorry!

Cas Smiley

Offline Falken224

Senior Newbie




Ooooooh!  Look at the pretty Stars.


« Reply #12 - Posted 2003-05-21 14:55:19 »

Quote
LWJGL is a hardware acceleration API only!


Truly?!  Why . . . how could I have missed that?  Sad

Okay . . . that sux.  Are there PLANS to extend to software rendering?  Maybe . . . pleeeeease.

*sigh*  Mebbe I'll just switch to GL4Java or something . . . at least if they support software rendering I might.  Or maybe I'll use GL4J for software and LWJGL for hardware.

Cry

-NateBob
 Brother Of Phil
Offline rreyelts

Junior Member




There is nothing Nu under the sun


« Reply #13 - Posted 2003-05-21 16:01:54 »

LWJGL is a hardware acceleration API only!

Can you say exactly what you mean here Cas? I know that LWJGL was intentionally only written for games, etc... but shouldn't it just be able to use whatever OpenGL driver is installed? As long as the driver is fully functional there shouldn't be any problems - well, except that you'll get slow rendering...

For example, shouldn't I be able to use LWJGL with Mesa software rendering? If not, why not?

God bless,
-Toby Reyelts


About me: http://jroller.com/page/rreyelts
Jace - Easier JNI: http://jace.reyelts.com/jace
Retroweaver - Compile on JDK1.5, and deploy on 1.4: http://retroweaver.sf.net.
Offline princec

JGO Kernel


Medals: 380
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #14 - Posted 2003-05-21 20:51:44 »

It was a deliberate filter on Win32 to barf on modes that it claimed were allowed but which would give you 3fps. You might ask for a stencil buffer for example and it would happily give you one but punt you back to software rendering which is exactly what you don't want - for a game library.

Cas Smiley

Offline AndersDahlberg

Junior Member





« Reply #15 - Posted 2003-05-21 22:55:13 »

Hmm, if this is a work computer we're talking about maybe you've got matlab installed?

I had problems with my opengl disappearing when "matlabs webserver" was running (auto-run *sigh*) - when I stopped that service (and all other matlab related background services) everything worked (tm) again  Grin

Not sure if this is any help to you - but I thought there is a small chance  :-/
Offline Falken224

Senior Newbie




Ooooooh!  Look at the pretty Stars.


« Reply #16 - Posted 2003-05-22 11:30:10 »

Quote
It was a deliberate filter on Win32 to barf on modes that it claimed were allowed but which would give you 3fps.


Well, that makes sense, but would it make sense to simply set flags that indicate feature X is not available in hardware, then leave it up to the programmer to actually pay attention?  That way, dudes like me, who are just using OpenGL for 2D stuff have more portability options.  Personally, I don't like Java2D.  Using LWJGL would be really nice, but if by default I can only run my simple non-processor-intensive games on hardware accellerated boxes, suddenly I'm having to look at other alternatives.

Yes, that's what programming's all about, I realize that, but adding that feature seems to keep with the 'lightweight' spirit of what you all are doing while adding a potentially useful feature . . . software only rendering.

It's just a thought, though.

-NateBob
 Brother Of Phil
Offline princec

JGO Kernel


Medals: 380
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #17 - Posted 2003-05-22 13:00:09 »

And a thought it shall remain Smiley
We mustn't lose our focus which is for a high performance Java games platform. On Win32 this means hardware acceleration as the only alternative is Microsoft's stunningly slow GL implementation. You can barely do a couple of sprites with it before it's too slow to be worth using.

If it's really so important to use software GL then recompile the native lib and take out the check. But for normal purposes it's not going to help anyone deliver what they want to deliver, which is fast graphics. Which is why you're using LWJGL in the first place, right?

Cas Smiley

Offline rreyelts

Junior Member




There is nothing Nu under the sun


« Reply #18 - Posted 2003-05-22 13:09:32 »

But for normal purposes it's not going to help anyone deliver what they want to deliver, which is fast graphics. Which is why you're using LWJGL in the first place, right?

No, people might want to be using LWJGL simply because it's the most up-to-date Java binding for OpenGL.

Addendum: As an example, DirectDraw/Direct3D's sole purpose is as a high-performance graphics API, yet it allows you to perform capability queries against the driver.

God bless,
-Toby Reyelts

About me: http://jroller.com/page/rreyelts
Jace - Easier JNI: http://jace.reyelts.com/jace
Retroweaver - Compile on JDK1.5, and deploy on 1.4: http://retroweaver.sf.net.
Offline Falken224

Senior Newbie




Ooooooh!  Look at the pretty Stars.


« Reply #19 - Posted 2003-05-22 13:13:37 »

Quote
We mustn't lose our focus which is for a high performance Java games platform.


Ah, to have such attitudes here where I work.  Every day is a new adventure in atrocious planning, mangled code and major rewrites.  God forbid the whole PURPOSE of each project might actually stay the same from day to day.  It's always "MORE FUNCTIONALITY!  WOOHOO!"

I truly admire such a focused effort as y'all are putting into this.  So . . . I guess hardware only, it is!   Cry

-Nate

-NateBob
 Brother Of Phil
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #20 - Posted 2003-05-22 13:40:27 »

Considering that prices for a capable graphics card are at rock bottom, theres really no excuse to not have one. Scan.co.uk for example have a 128mb GeForce FX for £60 (hell, even the TNT2 @ £20 would be more than adaquate).

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline rreyelts

Junior Member




There is nothing Nu under the sun


« Reply #21 - Posted 2003-05-22 14:24:10 »

I really think that's all beside the point. If I want to use a software driver for GL, then I should be able to do it. LWJGL has to go _out of it's way_ to prevent me from having that capability. Seems a little nutty to me.

God bless,
-Toby Reyelts

About me: http://jroller.com/page/rreyelts
Jace - Easier JNI: http://jace.reyelts.com/jace
Retroweaver - Compile on JDK1.5, and deploy on 1.4: http://retroweaver.sf.net.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

radar3301 (12 views)
2014-09-21 23:33:17

BurntPizza (30 views)
2014-09-21 02:42:18

BurntPizza (20 views)
2014-09-21 01:30:30

moogie (20 views)
2014-09-21 00:26:15

UprightPath (28 views)
2014-09-20 20:14:06

BurntPizza (32 views)
2014-09-19 03:14:18

Dwinin (48 views)
2014-09-12 09:08:26

Norakomi (74 views)
2014-09-10 13:57:51

TehJavaDev (102 views)
2014-09-10 06:39:09

Tekkerue (50 views)
2014-09-09 02:24:56
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!