jdomnitz's picture

Failed to create EGL window surface, error 12293

Finally trying to deploy my application to GL ES devices and my testers tell me they receive the following error:
Failed to create EGL window surface, error 12293

The stack trace shows the error occuring at:
Platform.Egl.EglWindowInfo.CreateWindowSurface (IntPtr config)

Running on Ubuntu 10.10 and a BeagleBoard XM

Any idea what it could be or where to look?


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

Can you please compile a debug version of OpenTK on Ubuntu and capture a complete stack trace and debug log (System.Diagnostics.Debug)?

This configuration hasn't been tested before (EGL with an active X server), but the issue should be fixable.

Edit: error 12293 is EGL_BAD_CONFIG according to egl.h ("An EGLConfig argument does not name a valid EGL frame buffer configuration.")

jdomnitz's picture

Yea I was aware of the error description just wasn't sure what could be wrong with the configuration. Sending out debug versions now for testing.

Any ideas on configuration changes to try or not until we see the full debug log?

jdomnitz's picture

Also, selection of the graphics context is wrong. If both an embedded and a regular context are available it favors the regular context. With X11 and OpenGL ES, there is also a software rasterizer available. If both are available it should default to the embedded context.

the Fiddler's picture

My desktop card (Ati) supposedly supports both desktop and ES contexts in the latest drivers, so favoring embedded contexts is not an option. I'm trying to find out how to best handle this, OpenGL ES hasn't really been a priority so far.

jdomnitz's picture

Alright but if you try it on your desktop does it work? I grabbed an open gl es stack for win7 and just got the same error. The config value passed to CreateWindowSurface is IntPtr.Zero

the Fiddler's picture

My Ubuntu desktop bails out before reaching that point. Unfortunately, the debugger is acting up so I cannot actually see what is going on.

I'm going to try on an upgraded stuck on ArchLinux next (but I need to make sure it supports ES first).

jdomnitz's picture

Any luck with getting things up and running?

Is there a version of openTK that is known to work with open gl es? I could figure out whats wrong if I had a reference to compare things too.

the Fiddler's picture

I tested but it seems Ati drivers don't actually expose EGL. ES compatibility is achieved through ARB_ES_compatibility, so this doesn't help here.

Do you know of any OpenGL ES emulators for Linux? Something is probably going wrong when creating the EGL context, either in EglContext.cs or EglX11PlatformFactory.cs (under Source/OpenTK/Platform/Egl).

c2woody's picture

In EglGraphicsMode.cs there's a call to Egl.ChooseConfig, maybe you can check if that returns num_configs==0 or actually returns some configuration ID.

jdomnitz's picture

Yea Egl.ChooseConfig always returns 0 for num_configs. I tried every combination of attributes I can think of and even just the none terminator but it always returns 0. The weird part is Egl.GetConfigs returns 60 configs including ones that should be valid for any of the attributes I was using on ChooseConfig. What the heck am I missing here?