What is the problem or limitation you are having?
OpenGL is a widely-used and reasonably common standard known and understood by a large number of developers, even though it is not the easiest API to learn. There should be a widget that allows a user to perform OpenGL drawing using whatever OpenGL API they prefer or is available on their platform.
Describe the solution you'd like
The solution would be widgets on each platform that set up an OpenGL view which call back to user functions for initialisation and rendering code. What the user does in these call-back is completely up to them: the widget makes no assumptions about the library which is being uses to interface with OpenGL, permitting the user to choose between libraries like PyOpenGL or ModernGL, to use the native OpenGL interface for their platform if there is one, or potentially to call out to wrapped OpenGL code written in C or C++.
Describe alternatives you've considered
A similar widget, but where Toga has an OpenGL compatibility layer which provides a common OpenGL interface that works cross platform, choosing a particular "best" OpenGL API for each platform which is wrapped by the compatibility layer.
Or possibly something more structured. For example, rather than arbitrary rendering callbacks on the interface widget, the user supplies shader programs, buffer data, etc. which are then used in a pre-defined, standard rendering pipeline defined completely in the interface layer.
Additional context
This isn't necessarily the end-state: as discussed in #51, it probably makes sense to have more smaller, more user-friendly GL API similar to WebGL, which is built on top of this widget.
Tests for this API are probably going to be fairly simple (eg. do the callbacks get called when we expect, etc.) since actual drawing is not the widget's responsibility.
What is the problem or limitation you are having?
OpenGL is a widely-used and reasonably common standard known and understood by a large number of developers, even though it is not the easiest API to learn. There should be a widget that allows a user to perform OpenGL drawing using whatever OpenGL API they prefer or is available on their platform.
Describe the solution you'd like
The solution would be widgets on each platform that set up an OpenGL view which call back to user functions for initialisation and rendering code. What the user does in these call-back is completely up to them: the widget makes no assumptions about the library which is being uses to interface with OpenGL, permitting the user to choose between libraries like PyOpenGL or ModernGL, to use the native OpenGL interface for their platform if there is one, or potentially to call out to wrapped OpenGL code written in C or C++.
Describe alternatives you've considered
A similar widget, but where Toga has an OpenGL compatibility layer which provides a common OpenGL interface that works cross platform, choosing a particular "best" OpenGL API for each platform which is wrapped by the compatibility layer.
Or possibly something more structured. For example, rather than arbitrary rendering callbacks on the interface widget, the user supplies shader programs, buffer data, etc. which are then used in a pre-defined, standard rendering pipeline defined completely in the interface layer.
Additional context
This isn't necessarily the end-state: as discussed in #51, it probably makes sense to have more smaller, more user-friendly GL API similar to WebGL, which is built on top of this widget.
Tests for this API are probably going to be fairly simple (eg. do the callbacks get called when we expect, etc.) since actual drawing is not the widget's responsibility.