Login  Register

Re: Jogl Using Wrong (Generic) Graphics Adapter

Posted by Tobi Delbruck on Dec 03, 2014; 1:42pm
URL: https://forum.jogamp.org/Jogl-Using-Wrong-Generic-Graphics-Adapter-tp4033216p4033699.html

I don't think I am creating that many contexts, but maybe I'm not getting it. Maybe 5 in total if you count
1. the initial dummy context
2. A first GLCanvas (this is actually called twice because of class hierarchy)

Now after this first canvas is realized on the display, I make a new window, which again creates two GLCanvas.
The exception is thrown then.

If the preferences of jAER are such that 2 GLCanvas are created on startup, there is no exception. The exception only occurs if the first canvas is created, then presumably displayed, and then another one is created and attempted to be displayed.
This is consistent with the problem being perhaps in the native window.

I also tried the recommended procedure below, both with and without shared context and using a variety of options for the GLCapabilities. Now what occurs is that the 2nd canvas does appear, but it is being rendered with GDI 1.1 and there are many artifacts, aside from being unusably slow.


               GLCapabilities caps=new GLCapabilities(GLProfile.getDefault());
                 caps.setDoubleBuffered(true);
                 caps.setHardwareAccelerated(true);
                 caps.setRedBits(8);
                 caps.setGreenBits(8);
                 caps.setBlueBits(8);
                caps.setAlphaBits(8);
                caps.setOnscreen(true);
               
                drawable = new GLCanvas(caps);

I will try to make a unit test to reproduce the behavior following https://jogamp.org/wiki/index.php/Contributing_a_new_feature_or_fix

Sven, let me know how we can financially contribute. This can come from research funding. JOGL has clearly been a major factor in allowing us to effectively demonstrate the silicon retina technology.
Tobi