Home > javax media opengl glexception error > javax.media.opengl.glexception error making context current 6

Javax.media.opengl.glexception Error Making Context Current 6

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up JOGL: javax.media.opengl.GLException: AWT-EventQueue-0: Context not current on thread up vote 0 down vote favorite I'm creating a game with JOGL and I've come across an error which I can't for the life of me figure out. In the game I'm using two GLCanvases (GLJpanels actually), one for the menu and one for the actual game. The idea being that when a game is started from the menu, the menu GLCanvas is removed from the gamewindow and swapped for the game GLCanvas. So far I've gotten the menu to work pretty much perfectly, but whenever I attempt to switch over to the game canvas, I get this error: Catched Exception on thread AWT-EventQueue-0 javax.media.opengl.GLException: AWT-EventQueue-0: Context not current on thread, obj 0x2ab44e2d, ctx 0x0, surf 0x0, inDestruction: false, <53f7c06e, 2e7aa0d3>[count 0, qsz 0, owner ] The code I'm using to switch between canvases is: public void start() { canvas.addGLEventListener(this); animator.start(); window.add(canvas); canvas.requestFocus(); } public void stop() { window.remove(canvas); animator.stop(); canvas.removeGLEventListener(this); } and the switch function: public void switchToCanvas(String canvasName) { currentCanvas = canvasName; if(canvasName.equals("GameCanvas")) { menu.stop(); game.start(); } else { game.stop(); menu.start(); } } I've done some googling and I came around this question: JOGL: How can I create my own openGL context and bind it to a GLCanvas? But none of the solution posted there worked for me. java opengl jogl glcanvas share|improve this question asked Feb 6 '14 at 18:20 user1870238 82212 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote At first, I would rather use a single GLCanvas instead of 2 instances of GLJPanel. GLJPanel has an higher memory footprint and should only be used when GLWindow or AWT/SWT GLCanvas can't be used, when there are some issues with mixing heavyweight and lightweight components. Secondly, your error message means

Sign in Pricing Blog Support Search GitHub This repository Watch 389 Star 2,991 Fork 896 processing/processing Code Issues 294 Pull requests 24 Projects 0 Wiki Pulse Graphs New issue P2D, P3D, OpenGL Error Making Context Current on Thread #2221 Closed JediExterm opened this Issue Nov 18, 2013 · 8 comments Projects None yet Labels opengl Milestone No milestone Assignees codeanticode http://stackoverflow.com/questions/21610901/jogl-javax-media-opengl-glexception-awt-eventqueue-0-context-not-current-on-t 2 participants JediExterm commented Nov 18, 2013 Whenever I try running a processing sketch that explicitly lists a renderer in the size function, I encounter an error. Whatever shape I draw within setup properly draws, but the draw function is never called. This is the error: java.lang.RuntimeException: javax.media.opengl.GLException: Error making https://github.com/processing/processing/issues/2221 context 0x20000 current on Thread AWT-EventQueue-0, drawableWrite 0x300156f0, drawableRead 0x300156f0, werr: 0, WindowsWGLContext [Version 4.2 (Compat profile, arb, ES2 compat, FBO, hardware) - 4.2.11631 Compatibility Profile Context [GL 4.2.0, vendor 0.0.0 (n/a)], options 0xa03, this 0x4858cca9, handle 0x20000, jogamp.opengl.gl4.GL4bcImpl@6d4c4d61, quirks: [NoDoubleBufferedBitmap, NeedCurrCtx4ARBCreateContext], Drawable: WindowsOnscreenWGLDrawable[Realized true, Factory jogamp.opengl.windows.wgl.WindowsWGLDrawableFactory@2c6c5356, Handle 0x300156f0, Surface JAWT-Window[JAWT version: 0x10004, CA_LAYER: false, isLayeredSurface false, bounds [ 0 / 0 600 x 600 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], shallUseOffscreenLayer false, isOffscreenLayerSurface false, attachedSurfaceLayer 0x0, windowHandle 0x290c3e, surfaceHandle 0x300156f0, bounds [ 0 / 0 600 x 600 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], pos 0/0, size 600x600, visible true, lockedExt false, config AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type .awt, connection \Display1, unitID 0, awtDevice D3DGraphicsDevice[screen=1], handle 0x0], idx 1], chosen GLCaps[wgl vid 0xb arb: rgba 8/8/8/8, trans-rgba 0x0/0/0/0, accum-rgba 0/0/0/0, dp/st/ms 24/8/2, sample-ext de

| Report Content as Inappropriate ♦ ♦ Error Making Context Current JOGL 2.0 rc9 This post was updated on . I've got a JOGL 2.0 application and I'm getting a very http://forum.jogamp.org/Error-Making-Context-Current-JOGL-2-0-rc9-td4025517.html repeatable "Error making context current: 0x0x20000" error. It only happens when the OpenGL https://forum.processing.org/topic/glgraphics-glexception-surface-already-locked window is created on my second monitor (which ever one is not my main monitor in windows) - oddly enough. I've tried making each monitor main, and it happens when I "setLocation" of the JFrame to the OTHER monitor. Any thoughts on what might be causing this? I've seen a lot of posts like this javax.media.opengl.glexception error that are older, but the answer is always: "the bug was fixed, use the latest version." I am using the latest RC. EDIT - By the way this is on a box with an ATI Radeon HD 5700 Series graphics card. I cannot seem to reproduce this issue on any machine with an NVidia graphics card. Here is what I get on my console: Exception in thread "Timer-0" java.lang.RuntimeException: javax.media.opengl.glexception error making javax.media.opengl.GLException: Error making context current: 0x0x20000, werr: 0, WindowsOnscreenWGLContext [OpenGL 4.2, options 0x103, 4.2 (Compatibility profile, arb, ES2 compatible, hardware) - 4.2.11631 Compatibility Profile Context, handle 0x20000, jogamp.opengl.gl4.GL4bcImpl@7d91275b, Drawable: WindowsOnscreenWGLDrawable[Realized true, Factory jogamp.opengl.windows.wgl.WindowsWGLDrawableFactory@44af07c4, handle 0xffffffffb2011a77, Window JAWT-Window[windowHandle 0x220c74, surfaceHandle 0xffffffffb2011a77, bounds [ 0 / 0 784 x 762 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], shallUseOffscreenLayer false, isOffscreenLayerSurface false, pos 0/0, size 784x762, visible true, lockedExt false, config AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type AWT, connection \Display0, unitID 0, awtDevice D3DGraphicsDevice[screen=0], handle 0x0], idx 0], chosen GLCaps[wgl vid 0x2 arb: on-scr, rgba 0x8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms: 24/8/0, dbl, mono , hw, GLProfile[GL4bc/GL4bc.hw]], requested GLCaps[on-scr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono , hw, GLProfile[GL4bc/GL4bc.hw]], sun.awt.Win32GraphicsConfig@71a550f9[dev=D3DGraphicsDevice[screen=0],pixfmt=2], encapsulated WindowsWGLGraphicsConfiguration[DefaultGraphicsScreen[WindowsGraphicsDevice[type Windows, connection decon, unitID 0, handle 0x0], idx 0], pfdID 2, ARB-Choosen true, requested GLCaps[on-scr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono , hw, GLProfile[GL4bc/GL4bc.hw]], chosen GLCaps[wgl vid 0x2 arb:

Tool DevelopmentEvents and OpportunitiesGeneral Discussion Sub forum : Move this topic Cancel Contributed Library Questions cedrickie.. GLGraphics - GLException Surface already locked in Contributed Library Questions • 2 years ago Now as the GLGraphics library works on my pc after installing the latest NVidia beta drivers, i started to integrate it into my sketch. But its not working due to the following error message. "GLException Surface already locked" I tested a lot but couldnt figure out what is causing the problems. I am using minim, toxi.math and the controlP5 library. I am also creating different PGraphics, but like i said, checked and removed a lot and couldnt figure out why it is not working. any ideas ? Processing Console Error Message : Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: wglShareLists(0x20000, 0x20001) failed: error code 0 at com.sun.opengl.impl.windows.WindowsGLContext.create(WindowsGLContext.java:136) at com.sun.opengl.impl.windows.WindowsGLContext.makeCurrentImpl(WindowsGLContext.java:150) at com.sun.opengl.impl.windows.WindowsOnscreenGLContext.makeCurrentImpl(WindowsOnscreenGLContext.java:65) at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:127) at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:182) at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:258) at javax.media.opengl.GLCanvas.display(GLCanvas.java:130) at javax.media.opengl.GLCanvas.paint(GLCanvas.java:142) at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248) at sun.awt.RepaintArea.paint(RepaintArea.java:224) at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:310) at java.awt.Component.dispatchEventImpl(Component.java:4706) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchTh

 

Related content

javax.media.opengl.glexception error swapping buffers

Javax media opengl glexception Error Swapping Buffers p the Java Gaming Resources or peek at the official Java tutorials Home Help Search Login Register Java-Gaming org Java Game APIs Engines OpenGL Development JOGL Development Error swapping buffers Pages ignore Print Error swapping buffers Read times Members and Guest are viewing this topic emzic Senior Devvie Error swapping buffers Posted - - hello some of my users are reporting this error when the application starts up sorry i can provide more information but does anyone know what the problem could be thanks javax media opengl GLException Error swapping buffers at com

javax.media.opengl.glexception error making context current

Javax media opengl glexception Error Making Context Current p Support Answers MathWorks Search MathWorks com MathWorks Answers relatedl Support MATLAB Answers trade MATLAB Central Community Home MATLAB Answers File Exchange Cody Blogs Newsreader Link Exchange ThingSpeak Anniversary Home Ask Answer Browse More Contributors Recent Activity Flagged Content Flagged as Spam Help MATLAB Central Community Home MATLAB Answers File Exchange Cody Blogs Newsreader Link Exchange ThingSpeak Anniversary Home Ask Answer Browse More Contributors Recent Activity Flagged Content Flagged as Spam Help Trial software MathWorks Support Team view profile questions answers accepted answers Reputation Vote Why do I get java exceptions when