Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (115)
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  
  Display.update() raising GL error: Invalid value  (Read 2356 times)
0 Members and 1 Guest are viewing this topic.
Offline anarchotron

Junior Member




...precious bodily fluids.


« Posted 2005-12-06 15:23:49 »

Can someone enlighten me as to what sort of conditions would cause Display.update()'s call to Context.swapBuffers() to raise a GL error: Invalid Value?  I see that Display.update() does this:

1  
2  
3  
4  
5  
6  
7  
8  
9  
   // We paint only when the window is visible or dirty
     if (isVisible() || isDirty()) {
         Util.checkGLError();
         try {
            Context.swapBuffers();
         } catch (LWJGLException e) {
            throw new RuntimeException(e);
         }
      }


So the error _must_ be arising from the Context.swapBuffers() call.  (I check glError() after Display.update() completes)

The error only occurs the _first_ time I Display.update(), afterwards no error occurs.

Any ideas?

Thanks!

 
Offline darkprophet

Senior Member




Go Go Gadget Arms


« Reply #1 - Posted 2005-12-06 15:36:26 »

No, thats not the case.

Util.checkGLError(); checks the drivers for any error that might have croped up anywhere in the last frame, Util.checkGLError(); releases those errors to be printed or whatever. You could be doing GL11.glLightf(GL11.glTrue); which is an invalid enum for that method call. Check the rest of your program carefully with a very fine toothcomb, if in doubt, put other Util.checkGLError(); calls in your code to see if the error has cropped up anywhere else...

DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline princec

JGO Kernel


Medals: 379
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #2 - Posted 2005-12-06 16:10:27 »

I wonder that we might tweak the generators so that one can produce a debug version of the GL interface that calls checkGLerror() after every operation. Good idea?

Cas Smiley

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

Senior Member




Go Go Gadget Arms


« Reply #3 - Posted 2005-12-06 22:31:18 »

well, as long as you can turn it off to avoid the JNI overhead that comes with it, im fine. the server VM should remove the dead-code anyway. IMO, its a good idea a long as performance doesnt suffer.

DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline princec

JGO Kernel


Medals: 379
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #4 - Posted 2005-12-06 22:55:06 »

We could have it so that it literally wrote out a different version of the GL11 class using Ant, and you'd use that whilst in development. I dunno.

Cas Smiley

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #5 - Posted 2005-12-06 22:58:05 »

Very good idea! Will save loads of time.

Offline darkprophet

Senior Member




Go Go Gadget Arms


« Reply #6 - Posted 2005-12-07 00:24:23 »

its not just GL11 - GL20, but all of the extensions too...

If its two seperate jars, im happy and will definetly save alot of time!

DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline anarchotron

Junior Member




...precious bodily fluids.


« Reply #7 - Posted 2005-12-07 04:53:10 »

No, thats not the case.

Util.checkGLError(); checks the drivers for any error that might have croped up anywhere in the last frame, Util.checkGLError(); releases those errors to be printed or whatever. You could be doing GL11.glLightf(GL11.glTrue); which is an invalid enum for that method call. Check the rest of your program carefully with a very fine toothcomb, if in doubt, put other Util.checkGLError(); calls in your code to see if the error has cropped up anywhere else...

DP

Util.checkGLError() checks the gl error state and finds it clean (otherwise it would throw an exception), after Display.update() completes, I check the gl error state and it is not clean (Invalid Value), so something that occured as a result of Context.swapBuffers() set the gl error state.  My code is full of gl error checking already.  The gl error state is clean when I call Display.update() and dirty when it completes.


Offline Vorax

Senior Member


Projects: 1


System shutting down in 5..4..3...


« Reply #8 - Posted 2005-12-07 04:53:55 »

Definetly a good idea - oh the wasted hours I could have saved....

Offline elias

Senior Member





« Reply #9 - Posted 2005-12-07 08:57:36 »

No, thats not the case.

Util.checkGLError(); checks the drivers for any error that might have croped up anywhere in the last frame, Util.checkGLError(); releases those errors to be printed or whatever. You could be doing GL11.glLightf(GL11.glTrue); which is an invalid enum for that method call. Check the rest of your program carefully with a very fine toothcomb, if in doubt, put other Util.checkGLError(); calls in your code to see if the error has cropped up anywhere else...

DP

Util.checkGLError() checks the gl error state and finds it clean (otherwise it would throw an exception), after Display.update() completes, I check the gl error state and it is not clean (Invalid Value), so something that occured as a result of Context.swapBuffers() set the gl error state.  My code is full of gl error checking already.  The gl error state is clean when I call Display.update() and dirty when it completes.




Sounds "interesting". I'd like to help, but I can't do it without a small self-contained test case. What does the exact exception look like?

 - elias

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

Junior Member




...precious bodily fluids.


« Reply #10 - Posted 2005-12-08 00:38:56 »

Ok, if I can narrow it down I will certainly post it.  I was hoping maybe someone had seen the behavior before Smiley
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 (29 views)
2014-09-21 02:42:18

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

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

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

BurntPizza (31 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!