Gunter's picture

CurrentContext bombs with experimental OpenGL ES 1.1 support

Project:The Open Toolkit library
Version:1.0-beta-3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:open
Description

CurrentContext will throw an KeyNotFoundException when you enable the experimental OpenGL ES 1.1 support when creating the first GraphicsContext.

When you comment out the line:

Debug.Print("GraphicsMode: {0}", mode);

in the main constructor of GraphicsContext the error will go away.

Probably reason:

The above line calls GraphicsMode.ToString which in turn calls the property index which in turn calls implementation.SelectGraphicsMode which seemsto trigger another (recursive) call into GraphicContext (deep inside SelectGraphicsModeARB), this time under a windows platform and not Egl.

Steps to reproduce:
- Enable EXPERIMENTAL
- Use an ES emulator like the one from Imagination Technologies (change lib name in Handler.cs)
- Use x86 platform on OpenTk project
- Run SimpleWindow from the Samples.