Login  Register

Re: New tutorial on AWT/SWT/Swing/GLJPanel/GLCanvas

Posted by Sven Gothel on Feb 11, 2011; 4:30pm
URL: https://forum.jogamp.org/New-tutorial-on-AWT-SWT-Swing-GLJPanel-GLCanvas-tp2363921p2474760.html

On Friday, February 11, 2011 11:02:37 Sven Gothel wrote:

> http://jogamp.org/git/?p=jogl.git;a=blob;f=src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLContext.java;h=845460c58fa29cbee6ae9a47b143619363ab9dd5;hb=bf75331124d6d0c53b74d5235ec03f5fcbc55cba#l89
>
> This is the odd call on WinXP 32bit with SWT,
> the follow up test on OBJ_DC (3) will fail (it's 0).
>
>   89     long hdc = WGL.wglGetCurrentDC();
>   90     if (0 == hdc) {
>   91       throw new GLException("Error: attempted to make an external GLDrawable without a drawable current, werr " + GDI.GetLastError());
>   92     }
>   93     int hdcType = GDI.GetObjectType(hdc);
>   94     if( GDI.OBJ_DC != hdcType ) {
>   95         // FIXME: Turns out in above use case (WinXP-32bit, GDI, SWT) the returned DC (not 0) is invalid!

Fixed more ARB PFD/Caps selection:
  http://jogamp.org/git/?p=jogl.git;a=commit;h=bff7e97c2f22673bb0457765696fb867d3e4f69d

+++

Not working:
----------------

besides

  - winxp_32bit-java6u23_32bit-swt-gdi         (virtual box 4.0.2 linux host)

  - winxp_32bit-java6u23_32bit-swt-chromium2.1 (virtual box 4.0.2 linux host)

(winxp_32bit: winxp 32bit service pack 3 with all updates as of 2011-02-11)


Working:
-----------

  - win7_64bit-java6u23_64bit-swt-gdi         (virtual box 4.0.2 linux host)
  - win7_64bit-java6u23_32bit-swt-gdi         (virtual box 4.0.2 linux host)
  - win7_64bit-java6u23_64bit-swt-chromium2.1 (virtual box 4.0.2 linux host)
  - win7_64bit-java6u23_32bit-swt-chromium2.1 (virtual box 4.0.2 linux host)

  - win7_64bit-java6u23_64bit-swt-amd  (native)
  - win7_64bit-java6u23_32bit-swt-amd  (native)
  - win7_64bit-java6u23_64bit-swt-nv   (native)
  - win7_64bit-java6u23_32bit-swt-nv   (native)


A similar bug report about WinXP's 'wglGetCurrentDC()' is available here:

http://compgroups.net/comp.graphics.api.opengl/Strange-behaviour-with-wglUseFontBitmaps


~Sven