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

GFLW Window creation failed #595

Open
drexhacker opened this issue May 21, 2021 · 6 comments
Open

GFLW Window creation failed #595

drexhacker opened this issue May 21, 2021 · 6 comments

Comments

@drexhacker
Copy link

Am working on a desktop app with go flutter but unfortunately the Application failed to run on my old pc with OpenGL 2.1 Mesa 18.X.X (Graphics Card: Intel Cooperation 4 Series Graphics Controller rev 03), Now am asking is there a way to build this old pc of mine

@drexhacker
Copy link
Author

Maybe a way to configure gflw to support OpenGL 2.1 would work

@pchampio
Copy link
Member

hover build XXX --opengl=none (note: texture plugin wont work anymore, but we don't officially have any of them.. so it's no issue)

@drexhacker
Copy link
Author

@pchampio its still failin

@pchampio pchampio reopened this May 27, 2021
@pchampio
Copy link
Member

What's the terminal output ? (bins must be build with hover build XXX --opengl=none --debug)
I'm afraid flutter might not support such a old version.

@drexhacker
Copy link
Author

creating glfw window: VersionUnavailable: EGL: Failed to create context: Arguments are inconsistent

@pchampio
Copy link
Member

I don't think I can help you that much.
It's my first time seeing this error.

Maybe can you try to workout the glfw flags ?

Flowing: https://github.com/go-flutter-desktop/go-flutter/wiki/Setting-up-hover-to-use-a-home-made-version-of-'go-flutter'
can you try to modify the glfw flags here (especially line 145):

go-flutter/application.go

Lines 97 to 146 in e85ebb3

switch a.config.windowMode {
case WindowModeDefault:
// nothing
case WindowModeMaximize:
glfw.WindowHint(glfw.Maximized, glfw.True)
case WindowModeBorderlessMaximize:
glfw.WindowHint(glfw.Maximized, glfw.True)
glfw.WindowHint(glfw.Decorated, glfw.False)
case WindowModeBorderless:
glfw.WindowHint(glfw.Decorated, glfw.False)
case WindowModeBorderlessFullscreen:
monitor = glfw.GetPrimaryMonitor()
mode := monitor.GetVideoMode()
a.config.windowInitialDimensions.width = mode.Width
a.config.windowInitialDimensions.height = mode.Height
glfw.WindowHint(glfw.RedBits, mode.RedBits)
glfw.WindowHint(glfw.GreenBits, mode.GreenBits)
glfw.WindowHint(glfw.BlueBits, mode.BlueBits)
glfw.WindowHint(glfw.RefreshRate, mode.RefreshRate)
default:
return errors.Errorf("invalid window mode %T", a.config.windowMode)
}
opengl.GLFWWindowHint()
{
// TODO(drakirus): Delete this when https://github.com/go-gl/glfw/issues/272 is resolved.
// Post an empty event from the main thread before it can happen in a non-main thread,
// to work around https://github.com/glfw/glfw/issues/1649.
glfw.PostEmptyEvent()
}
if a.config.windowInitialLocation.xpos != 0 {
// To create the window at a specific position, make it initially invisible
// using the Visible window hint, set its position and then show it.
glfw.WindowHint(glfw.Visible, glfw.False)
}
glfw.WindowHint(glfw.ScaleToMonitor, glfw.True)
if a.config.windowAlwaysOnTop {
glfw.WindowHint(glfw.Floating, glfw.True)
}
if a.config.windowTransparent {
glfw.WindowHint(glfw.TransparentFramebuffer, glfw.True)
}
if runtime.GOOS == "linux" {
// Skia expects an EGL context on linux (libglvnd)
glfw.WindowHint(glfw.ContextCreationAPI, glfw.EGLContextAPI)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants