pottermm / javachromiumembedded

Automatically exported from code.google.com/p/javachromiumembedded
0 stars 0 forks source link

Use GL2ES2 instead of GL2 to avoid GLException #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download
2. Run compile.bat
3. Run run.bat

What is the expected output? What do you see instead?
Working sample project using chromium embedded.

What version of the product are you using? On what operating system?
Windows 7 Home Premium x64
jdk7u45
jcef 3.1650.1501.9 win64 preview

Please provide any additional information below.

Basically I just tried to download and run the sample project included with the 
binary download. What happens is the program will open and draw the window and 
jcef will load google.com in, but the browser remains blank. I only knew that 
it successfully loaded the page by right clicking > view source.

I'm only a casual java developer, I only have need for it every so often so I 
could just be doing something horribly wrong.

My theory is that perhaps my opengl version is too high or something. I have 
using an Nvidia GTX 780 as my gpu which has support for opengl 4.4. I've never 
done anything opengl related in java, so I don't know exactly what this here 
stack trace is trying to tell me. :)

Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Not a 
GL2 implementation
    at jogamp.opengl.gl4.GL4bcImpl.getGL2(GL4bcImpl.java:37127)
    at org.cef.CefClient$1.display(CefClient.java:112)
    at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:588)
    at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:572)
    at javax.media.opengl.awt.GLCanvas$7.run(GLCanvas.java:1054)
    at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1034)
    at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:909)
    at javax.media.opengl.awt.GLCanvas$8.run(GLCanvas.java:1065)
    at javax.media.opengl.Threading.invoke(Threading.java:193)
    at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:483)
    at javax.media.opengl.awt.GLCanvas.paint(GLCanvas.java:537)
    at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
    at sun.awt.RepaintArea.paint(RepaintArea.java:240)
    at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:347)
    at java.awt.Component.dispatchEventImpl(Component.java:4937)
    at java.awt.Component.dispatchEvent(Component.java:4687)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:694)
    at java.awt.EventQueue$3.run(EventQueue.java:692)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.awt.EventQueue$4.run(EventQueue.java:708)
    at java.awt.EventQueue$4.run(EventQueue.java:706)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

Original issue reported on code.google.com by Scynthe...@gmail.com on 24 Dec 2013 at 5:47

GoogleCodeExporter commented 9 years ago
Thanks for the report. I think your graphics card is actually too new (OpenGL 4 
removed some OpenGL 2 functionality). According to 
http://forum.jogamp.org/Not-a-GL2-implementation-exception-td4030873.html we 
should use GL2ES2 instead of GL2 for compatibility.

Original comment by magreenb...@gmail.com on 2 Jan 2014 at 11:34

GoogleCodeExporter commented 9 years ago
More related reading: 
http://forum.jogamp.org/What-profile-to-choose-td3575514.html

It seems that specifying |GLProfile.getMaxFixedFunc(true)| instead of 
|GLProfile.getDefault()| in CefClient::createGLCanvas() may resolve the 
problem. Can you test it and report back? Thanks.

Original comment by magreenb...@gmail.com on 6 Jan 2014 at 5:50

GoogleCodeExporter commented 9 years ago
I had the same issue and making that change to CefClient resolved it for me.

Original comment by aaron.ra...@gmail.com on 6 Mar 2014 at 3:06

GoogleCodeExporter commented 9 years ago
@#2: Fixed in revision 85.

Original comment by magreenb...@gmail.com on 17 Jun 2014 at 6:15