hajimehoshi / ebiten

Ebitengine - A dead simple 2D game engine for Go
https://ebitengine.org
Apache License 2.0
11.06k stars 662 forks source link

move GL context usages from internal/glfw to internal/graphicsdriver/opengl #2714

Open hajimehoshi opened 1 year ago

hajimehoshi commented 1 year ago

Operating System

What feature would you like to be added?

Now GLFW code is cloned into Ebitengine and under our control, we can move the GL context logics from internal/ui to internal/graphicsdriver/opengl.

Why is this needed?

No response

hajimehoshi commented 11 months ago

In other words, renderThread in internal/ui can be removed, and the notion of the GL context can be hidden in internal/graphicsdriver/opengl.

hajimehoshi commented 1 month ago

What we should do is porting OpenGL-related files to internal/graphicsdriver/opengl by modifying graphcis_glfw.go. Refer graphics_nintendosdk.go and egl_nintendosdk.go, which are already in an ideal situation.

hajimehoshi commented 1 month ago

Ha, this is pretty difficult. Maybe we should make internal/glfw pure Go first, or at least close to pure Go.