[Bug 31110] New: SharpOcarina (.NET 4.0 app using OpenTK, C# OpenGL wrapper) fails to create a temp OpenGL context

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Jul 2 16:16:18 CDT 2012


http://bugs.winehq.org/show_bug.cgi?id=31110

             Bug #: 31110
           Summary: SharpOcarina (.NET 4.0 app using OpenTK, C# OpenGL
                    wrapper) fails to create a temp OpenGL context
           Product: Wine
           Version: 1.5.7
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: opengl
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: focht at gmx.net
    Classification: Unclassified


Hello,

"SharpOcarina" is a scene development tool for "The Legend of Zelda: Ocarina of
Time".
Written in C#, requiring .NET Framework 4.0

Website: http://code.google.com/p/sharpocarina/

It makes extensive use of "OpenTK" -> http://www.opentk.com/

"The Open Toolkit is an advanced, low-level C# library that wraps OpenGL,
OpenCL and OpenAL. It is suitable for games, scientific applications and any
other project that requires 3d graphics, audio or compute functionality."

Another interesting "testsuite" for Wine OpenGL, the complete source is
available ;-)

The app itself fails quickly after load:

--- snip ---
...
002b:Call user32.CreateWindowExW(00000000,001814a0
L"7c76823a-2b3a-499b-b4f7-e135ab4518ab",001a1e28 L"OpenTK Native
Window",54000000,00000000,00000000,00000280,000001e0,0001011c,00000000,040d0000,00000000)
ret=045bebf2 
...
002b:Ret  user32.CreateWindowExW() retval=00010122 ret=045bebf2
...
002b:Call user32.GetDC(00010122) ret=04771a21
002b:Ret  user32.GetDC() retval=000006a8 ret=04771a21
002b:Call gdi32.DescribePixelFormat(000006a8,00000001,00000028,0032df20)
ret=04771c55
002b:Call opengl32.wglDescribePixelFormat(000006a8,00000001,00000028,0032df20)
ret=7eb0b844
002b:Call gdi32.GdiDescribePixelFormat(000006a8,00000001,00000028,0032df20)
ret=7e1741d2
002b:Ret  gdi32.GdiDescribePixelFormat() retval=00000044 ret=7e1741d2
002b:Ret  opengl32.wglDescribePixelFormat() retval=00000044 ret=7eb0b844
002b:Ret  gdi32.DescribePixelFormat() retval=00000044 ret=04771c55
...
002b:Call gdi32.SetPixelFormat(000006a8,00000001,0032df20) ret=04773492
002b:Call opengl32.wglSetPixelFormat(000006a8,00000001,0032df20) ret=7eb0b960
002b:Call gdi32.GdiSetPixelFormat(000006a8,00000001,0032df20) ret=7e173296
002b:Ret  gdi32.GdiSetPixelFormat() retval=00000001 ret=7e173296
002b:Ret  opengl32.wglSetPixelFormat() retval=00000001 ret=7eb0b960
002b:Ret  gdi32.SetPixelFormat() retval=00000001 ret=04773492
...
002b:Call opengl32.wglCreateContext(000006a8) ret=04773547
002b:Call gdi32.__wine_get_wgl_driver(000006a8,00000029) ret=7e172fd5
002b:Ret  gdi32.__wine_get_wgl_driver() retval=7ea739e0 ret=7e172fd5
002b:Ret  opengl32.wglCreateContext() retval=00010000 ret=04773547 
...
002b:Call opengl32.wglMakeCurrent(000006a8,00010000) ret=047735e8
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  135 (GLX)
  Minor opcode of failed request:  5 (X_GLXMakeCurrent)
  Serial number of failed request:  702
  Current serial number in output stream:  702 
--- snip ---

I assume this works on Windows (if someone wants to test the app).

If I'm not mistaken, this seems to be the C# source code for the failing code:
https://opentk.svn.sourceforge.net/svnroot/opentk/trunk/Source/OpenTK/Platform/Windows/WinGLContext.cs
(WinGLContext constructor, temp context creation in order to load wgl
extensions).

Prerequisite: 'winetricks -q dotnet40'

NOTE: There is a bug in winetricks 'dotnet40' recipe.
You _must_ set 'fusion' override to builtin (fusion=b) for the installer to
succeed and to get all assemblies properly installed into GAC.

Regards

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list