go-flutter: Windows: Failed to create OpenGL context

Flutter version

Flutter 1.9.1+hotfix.1 • channel beta • https://github.com/flutter/flutter
Framework • revision a1fb3fabec (27 hours ago) • 2019-09-03 18:07:52 -0700
Engine • revision cc88fa45db
Tools • Dart 2.5.0

Go Flutter Version

v0.29.0 

But v0.28.0 work.

Golang Version

go version go1.13 windows/amd64

Windows version

Windows 10 1903

Golang errors (Optional)

hover: Using engine from cache
go: finding github.com/go-gl/glfw latest
go: finding github.com/go-gl/gl latest
creating glfw window: VersionUnavailable: WGL: Failed to create OpenGL context
hover: app 'xx' exited with error: exit status 1

Steps to Reproduce

hover run

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 35 (16 by maintainers)

Most upvoted comments

$ hover build --help 
Flags:
      --opengl string       The OpenGL version specified here is only relevant for external texture plugin (i.e. video_plugin).
                            If 'none' is provided, texture won't be supported. Note: the Flutter Engine still needs a OpenGL compatible context. (default "3.3")

OpenGL is used in 2 way.

  • One: through GLFW, used to draw your flutter app handle event, etc…
  • Two: through OpenGL-bindings directly, ONLY for textures (as the above flag description says). But the OpenGL-bindings version used here affect GLFW internally.

By default, we use GLFW/3.2 and OpenGL-bindings 3.3, so your system must be compatible with those versions (at least OpenGL 3.3 or above).

But if you don’t have support for OpenGL 3.3. you could use the --opengl=none flag. This flag will use OpenGL in one way:

  • through GLFW, used to draw your flutter app handle event, etc…
    GLFW will internally choose the min OpenGL compatible version to use.
  • Texture plugin won’t be supported and panic the app (no OpenGL-bindings used).

@ykmnkmi I cannot go lower than 3.2:

panic: InvalidValue: Context profiles are only defined for OpenGL version 3.2 and above

OpenGL is only needed for texture plugins (i.e.: video_player). I’m working on adding hover flag to choose at compile-time whether or not you want to support texture plugins (and thus, having to compile go-flutter with a reference to OpenGL)

the flag will look somethings like this hover run --opengl=none

@Drakirus I’ll try ASAP