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

glfw: wglCreateContextAttribsARB failed: winapi error #3221692565 #3109

Open
1 of 11 tasks
Bagi763 opened this issue Sep 19, 2024 · 11 comments
Open
1 of 11 tasks

glfw: wglCreateContextAttribsARB failed: winapi error #3221692565 #3109

Bagi763 opened this issue Sep 19, 2024 · 11 comments

Comments

@Bagi763
Copy link

Bagi763 commented Sep 19, 2024

Ebitengine Version

lastest probabk=ly

Operating System

  • Windows
  • macOS
  • Linux
  • FreeBSD
  • OpenBSD
  • Android
  • iOS
  • Nintendo Switch
  • PlayStation 5
  • Xbox
  • Web Browsers

Go Version (go version)

1.23.1

What steps will reproduce the problem?

running the command to confirm my enviroment

What is the expected result?

image

What happens instead?

image

Anything else you feel useful to add?

maybe my pc is just bad and old, i know it doesn't run the lastest version of opengl (opengl 4.0, idk my version but is probably 2 or 3), maybe is that the problem, but there isn't a way to make it run on a older version of webgl??

@hajimehoshi
Copy link
Owner

What version of windows are you using?

@Bagi763
Copy link
Author

Bagi763 commented Sep 19, 2024

What version of windows are you using?

Windows 8.1, and I confirmed that I'm using opengl 2.1

@hajimehoshi
Copy link
Owner

Go itself no longer supports Windows 8.1. https://go.dev/wiki/Windows

Installing DirectX 11 might solve the issue.

@Bagi763
Copy link
Author

Bagi763 commented Sep 20, 2024

i installed directx 11 and didn't work i'm going to try to install directx 12 and see if works

@Bagi763
Copy link
Author

Bagi763 commented Sep 20, 2024

i couldn't find to install directx 12, so here is the screenshots
image
image

@hajimehoshi
Copy link
Owner

Could you try this command?

go run github.com/hajimehoshi/ebiten/v2/examples/windowsize@latest -graphicslibrary=directx

@Bagi763
Copy link
Author

Bagi763 commented Sep 20, 2024

worked, thanks
image

just another question, every time i will run my game i will need to add -graphicslibrary=directx at the end, or there is some way of doing that automatically??

@hajimehoshi
Copy link
Owner

Thanks!

just another question, every time i will run my game i will need to add -graphicslibrary=directx at the end, or there is some way of doing that automatically??

Well, so the problem is, Ebitengine misunderstood that OpenGL was available in your machine but the actual it was not. I'll try to fix it by checking the OpenGL availability in a more strict way.

@hajimehoshi hajimehoshi added this to the v2.8.0 milestone Sep 20, 2024
@Bagi763
Copy link
Author

Bagi763 commented Sep 20, 2024

ok thanks

@hajimehoshi
Copy link
Owner

I found this required a lot of refactoring in order to fix the issue correctly... (Related: #2714)

Until I can fix this issue, could you set an environment variable EBITENGINE_GRAPHICS_DRIVER to directx, so that every Ebitengine game would work with DirectX by default? I'm sorry for inconvenience. See https://docs.google.com/document/d/1djz7cUKPP2UTtyQD-aBb5836wPkqBDSOZYPhgCtJHRU/edit?usp=sharing (In this document, opengl is set to use OpenGL, but of course set directx in your case.)

@hajimehoshi hajimehoshi modified the milestones: v2.8.0, v2.9.0 Sep 20, 2024
@Bagi763
Copy link
Author

Bagi763 commented Sep 20, 2024

worked by default now
image
i very grateful for you responding to me, thanks

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

No branches or pull requests

2 participants