-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it viable to use glow to generate an interface with multiple backends? #51
Comments
I have thought about doing that myself, I don't think it would be very hard for Glow to output that. Older direct state stuff could be folded in as well. gl.AttachShader(progID, shadID) Think go.mobile was contemplating that as well. |
I have not completely made up my mind about this, but so far I think I prefer the OpenGL APIs being more consistent with the upstream APIs and not more idiomatic Go. Given that the vast majority of OpenGL code out in the wild (and my previous projects) are using C++, it makes translating easier when you don't have to think about if a given OpenGL func in Go has been changed to have a receiver, etc.
Do you happen to have a link to where where it was being discussed? |
There is a http://godoc.org/golang.org/x/mobile/gl
It seems to be a pure OpenGL ES 2.0 binding (single backend). Does anyone know what platforms OpenGL ES 2.0 is actually available/usable on as of 2014? Clearly, Android is one of them, but what about desktop OSes? I see mentions of linux and darwin in the Edit: The only resources I have on this topic are: Some of the TODOs of that package are: // TODO(crawshaw): build on more host platforms (makes it easier to gobind).
// TODO(crawshaw): expand to cover OpenGL ES 3. (/cc @crawshaw if you have a moment to read this, feel free to share comments if you have any.) |
Anything that supports GL4.1 is API compatible with GLES2.0. When they made gles2.0 they started around gl3.2 core and stripped out features. Now the default settings and some corner case behaviors in the context may be different so you have to build an appropriate context. A failed? patch I submitted to go.mobile a tincy bit ago makes it more broadly usable on desktop gl in linux https://go-review.googlesource.com/#/c/1851 Read these for more info, also search for GLES in the official gl4.1/gl4.3 and gl4.5 spec pdf files On the receiver's thing... |
Oh wait... that is a precursor for the patch I would submit when it gets resolved nevermind on that. |
I should note the strongest reason for doing this would be windows. |
Glow has roughly the right structure to allow multiple backends. At a minimum you'd have to refactor the templates and change the |
Thanks for the overview Eric. This won't be my highest priority at the moment, but it's something I may want to come back to at some point. It seems the potential is promising. |
Okay, its 2021. There are many projects out there trying to provide GLES2 with desktop development support by translating GLES2 to OpenGL/Metal/etc. Such projects are (at least for mac);
I am trying to figure out how to tell glow to link to ANGLE for example. I stole the libs I am also curious as to why glow has an
@dmitshur if you can take a moment to clarify this for me, as well as for everyone else, it would be much appreciated! EDIT: more info about this @ johanhenriksson/goworld#22 (comment) |
Google's ANGLE library implements OpenGL ES on top of Windows GPU APIs. Updates go-gl#51 Signed-off-by: Elias Naur <[email protected]>
Google's ANGLE library implements OpenGL ES on top of Windows GPU APIs. Updates #51 Signed-off-by: Elias Naur <[email protected]>
Hi @errcw (/cc @ajhager, @slimsag),
You might've seen me mention you in the discussion at ajhager/webgl#2.
I'm starting to wonder if it would be possible and viable to use glow (possibly with some degree of modifications to allow for this) to generate an interface with multiple backends.
For example, https://github.com/ajhager/webgl currently provides (sorry about the misleading repo name) a webgl-like API that actually has 2 backend implementations:
After thinking about it, it seems a better approach would be to use the OpenGL ES 2 spec as the interface, and provide those 2 backends (and possibly more).
Do you think
glow
can be useful here? Feel free to ask any questions about this if you want me to elaborate or explain. Thanks!The text was updated successfully, but these errors were encountered: