Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (576)
games submitted by our members
Games in WIP (497)
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  
  Invalid operation problem  (Read 4197 times)
0 Members and 1 Guest are viewing this topic.
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Posted 2006-06-19 17:00:31 »

Thanks wiesi, how stupid I am i just had to scroll down to discover 0.98 and 0.99 releases  Lips Sealed Lips Sealed Lips Sealed

I see LWJGL 1.0beta has been released : where can I find 0.99 release ? (Is it the same ?) Xith3D is compatible only with 0.99 ...

it should be easy as just swithing 0.99 for 1.0beta, as there has not been any major api changes.
Well actually that's what I did but I didn't worked so far.. It's puzzling me I get
1  
org.lwjgl.opengl.OpenGLException: Invalid operation (1282)

I've seen this error commonly happens when using more than one thread but I do have one thread only ! Here's the complete stack trace :
1  
2  
3  
4  
5  
6  
7  
8  
9  
org.lwjgl.opengl.OpenGLException: Invalid operation (1282)
   at org.lwjgl.opengl.Util.checkGLError(Util.java:56)
   at org.lwjgl.opengl.Display.swapBuffers(Display.java:566)
   at org.lwjgl.opengl.Display.update(Display.java:582)
   at com.xith3d.render.lwjgl.CanvasPeerImpl.renderDone(CanvasPeerImpl.java:772)
   at com.xith3d.render.lwjgl.CanvasPeerImpl.display(CanvasPeerImpl.java:958)
   at com.xith3d.render.lwjgl.CanvasPeerImpl.render(CanvasPeerImpl.java:1035)
   at com.xith3d.scenegraph.View.renderOnce(View.java:616)
   at com.xith3d.scenegraph.View.renderOnce(View.java:549)

It seems like it happens just before swapBuffers() (swapBuffer calls Util.GLCheckError() before really swapping buffers).

(@Moderators : you may separe this thread if you don't think it's appropriate)

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline darkprophet

Senior Member




Go Go Gadget Arms


« Reply #1 - Posted 2006-06-20 00:40:10 »

Its because you did something thats illegal in the OpenGL world somewhere in your code. on swapBuffers, Util.checkError(); catches the problem...

Just put Util.checkError() in all of your code that you've changed and see what comes up...

(Btw, why is this thread sticky?)

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #2 - Posted 2006-06-20 11:15:52 »

Its because you did something thats illegal in the OpenGL world somewhere in your code. on swapBuffers, Util.checkError(); catches the problem...

Just put Util.checkError() in all of your code that you've changed and see what comes up...

(Btw, why is this thread sticky?)
(The beginning of this thread is in the "LWJGL 0.99 Released" subject)
Yeah but I did OpenGL long ago and now I'm working with Xith3D only I don't mind fixing the LWJGL renderer now if it's straight-forward, however it'll take a bit longer.
I know the Util.glCheckError() mecanism but the error 1282 is usually thrown (from what I've found on forums) when you call an OpenGL command from a different thread from which it has been created. Could it be another problem ?

I'll try to put Util.glCheckError() everywhere to have more details.

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
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 2006-06-20 12:58:01 »

no, the invalid operation will not be thrown if you call it from another thread in LWJGL; if you do call GL commands from another thread you will get a LWJGLException about contexts...

invalid operation is an OpenGL specific exception, nothing to do with threads..

DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline Niwak

Senior Member


Medals: 1
Projects: 1



« Reply #4 - Posted 2006-06-20 13:36:46 »

I've encountered this type of problem with Xith3D's LWJGL renderer long ago. I've filled a bug report for it, it has to do with the fact that Xith3D never checks the hardware capabilities ; it takes for granted a set of capabilities and if it doesn't fit, it will just run as is with OpenGL firing errors. The bug exists as well with the JOGL renderer, it is just not catched. As far as I can tell, this type of bug rely on the Xith3D side, not LWJGL.

You should use GLIntercept to catch the offending openGL call. It is of great help

            Vincent

Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #5 - Posted 2006-06-20 16:02:30 »

no, the invalid operation will not be thrown if you call it from another thread in LWJGL; if you do call GL commands from another thread you will get a LWJGLException about contexts...

invalid operation is an OpenGL specific exception, nothing to do with threads..

DP
OK

I've encountered this type of problem with Xith3D's LWJGL renderer long ago. I've filled a bug report for it, it has to do with the fact that Xith3D never checks the hardware capabilities ; it takes for granted a set of capabilities and if it doesn't fit, it will just run as is with OpenGL firing errors. The bug exists as well with the JOGL renderer, it is just not catched. As far as I can tell, this type of bug rely on the Xith3D side, not LWJGL.
OK gonna debug that.

You should use GLIntercept to catch the offending openGL call. It is of great help
Unfortunately, alas, alas it's windows-only !! If you have a manner to make it works on linux (I think Wine isn't of great help here) please tell me.

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline elias

Senior Member





« Reply #6 - Posted 2006-06-21 13:19:35 »

It could be easier than that since in LWJGL, extensions each have their own class. So, find all OpenGL classes used by Xith (GL11, GL12, ARBVertexBufferObject etc.) and for each of those, check that the corresponding capability is set (GLContext.getCapabilities().GL_ARB_vertex_buffer_object).

 - elias

Offline Niwak

Senior Member


Medals: 1
Projects: 1



« Reply #7 - Posted 2006-06-21 13:22:57 »

It could be easier than that since in LWJGL, extensions each have their own class. So, find all OpenGL classes used by Xith (GL11, GL12, ARBVertexBufferObject etc.) and for each of those, check that the corresponding capability is set (GLContext.getCapabilities().GL_ARB_vertex_buffer_object).

You will need a bit more work, since you also have to check for hardware specific constants. For example, Xith3D takes for granted that the hardware provides 4 full texture units. For example, this is false on a GeForce 2 card and causes the error mentionned in the original post.
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.

xsi3rr4x (12 views)
2014-04-15 18:08:23

BurntPizza (11 views)
2014-04-15 03:46:01

UprightPath (24 views)
2014-04-14 17:39:50

UprightPath (10 views)
2014-04-14 17:35:47

Porlus (27 views)
2014-04-14 15:48:38

tom_mai78101 (49 views)
2014-04-10 04:04:31

BurntPizza (108 views)
2014-04-08 23:06:04

tom_mai78101 (208 views)
2014-04-05 13:34:39

trollwarrior1 (176 views)
2014-04-04 12:06:45

CJLetsGame (182 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
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!