Skip to content
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

WebGL? #431

Open
phorcys420 opened this issue Jan 8, 2022 · 11 comments
Open

WebGL? #431

phorcys420 opened this issue Jan 8, 2022 · 11 comments
Labels
enhancement New feature or request External Issue Issue in dependencies - can't make progress in giu yet.

Comments

@phorcys420
Copy link

I've used imgui-js by flyover before but it really doesn't suit my needs anymore, as I know you can compile go to wasm, would that be somehow possible with giu ?

@gucio321
Copy link
Collaborator

gucio321 commented Jan 9, 2022

doesn't wasm build work?
well, it may make some problems. As far as I know there is go framework that works with wasm but it is much more complicated than giu (I mean ebiten ofc)
Idk what should be done to make giu able to build for webgl. Also is it even possible with C++ imgui?

@gucio321
Copy link
Collaborator

gucio321 commented Jan 9, 2022

okey, imgui builds with webgl are even possible (ocornut/imgui#1269 (comment))
however, to do so here we must use another backend (https://github.com/ocornut/imgui/tree/master/examples/example_emscripten_opengl3)
@AllenDang is it even possible to do so in golang?

@AllenDang
Copy link
Owner

@gucio321 Theoretically, it's possible. Any opengl backend which supports webgl could be easily intergrated with imgui.

@gucio321
Copy link
Collaborator

maybe this one? https://github.com/nuberu/webgl

@GoWeasel
Copy link
Contributor

GoWeasel commented Apr 6, 2022

@phorcys420
Take a look at this one?, it ist possible

https://magnum.graphics/showcase/imgui/

image

@phorcys420
Copy link
Author

What do you mean?
That's what we want to achieve, yes. ImGUI on the web has always been possible. But I have switched to Flutter for my UIs now so I don't think I'll look more into that issue.

@GoWeasel
Copy link
Contributor

GoWeasel commented Apr 6, 2022

As you mentioned, i mean exactly that, what you want to achieve.
As you further switched to Flutty, then u can close this issue? or not?

@gucio321
Copy link
Collaborator

gucio321 commented Apr 6, 2022

IMO this should stay open because we may deffinitly want to add webgl support for giu

@ii64
Copy link

ii64 commented Jul 16, 2022

Is this even possible? both GLFW and ImGui are using cgo.
A glance test:

# runtime/cgo
cgo: unknown ptrSize for $GOARCH "wasm"

See also cgo/main.go

@gucio321
Copy link
Collaborator

@AllenDang how is it going? I gonna start some project and would want to write UI using this awesome framework, but I suppose It'll need to be a webgl app.
Is there any chance the feature'll be ready soon? Is it related with cimgui-go?
Let me know if I can help some way

@gucio321
Copy link
Collaborator

gucio321 commented May 9, 2023

upstream issue in GO: golang/go#55351
ref: AllenDang/cimgui-go#13
Marking as external issue.

@gucio321 gucio321 added enhancement New feature or request External Issue Issue in dependencies - can't make progress in giu yet. labels May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request External Issue Issue in dependencies - can't make progress in giu yet.
Projects
None yet
Development

No branches or pull requests

5 participants