mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
internal/glfw: change the default client API to No-API
This commit is contained in:
parent
3184276068
commit
b73d63da29
@ -209,7 +209,7 @@ void glfwDefaultWindowHints(void)
|
||||
|
||||
// The default is OpenGL with minimum version 1.0
|
||||
memset(&_glfw.hints.context, 0, sizeof(_glfw.hints.context));
|
||||
_glfw.hints.context.client = GLFW_OPENGL_API;
|
||||
_glfw.hints.context.client = GLFW_NO_API; // This is different from the original GLFW, which uses GLFW_OPENGL_API by default.
|
||||
_glfw.hints.context.source = GLFW_NATIVE_CONTEXT_API;
|
||||
_glfw.hints.context.major = 1;
|
||||
_glfw.hints.context.minor = 0;
|
||||
|
@ -160,7 +160,7 @@ func defaultWindowHints() error {
|
||||
|
||||
// The default is OpenGL with minimum version 1.0
|
||||
_glfw.hints.context = ctxconfig{
|
||||
client: OpenGLAPI,
|
||||
client: NoAPI, // This is different from the original GLFW, which uses OpenGLAPI by default.
|
||||
source: NativeContextAPI,
|
||||
major: 1,
|
||||
minor: 0,
|
||||
|
@ -1106,11 +1106,8 @@ func (u *UserInterface) initOnMainThread(options *RunOptions) error {
|
||||
u.setGraphicsLibrary(lib)
|
||||
u.graphicsDriver.SetTransparent(options.ScreenTransparent)
|
||||
|
||||
if u.GraphicsLibrary() != GraphicsLibraryOpenGL {
|
||||
if err := glfw.WindowHint(glfw.ClientAPI, glfw.NoAPI); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
// internal/glfw is customized and the default client API is NoAPI, not OpenGLAPI.
|
||||
// Then, glfw.WindowHint(glfw.ClientAPI, glfw.NoAPI) doesn't have to be called.
|
||||
|
||||
// Before creating a window, set it unresizable no matter what u.isInitWindowResizable() is (#1987).
|
||||
// Making the window resizable here doesn't work correctly when switching to enable resizing.
|
||||
|
Loading…
Reference in New Issue
Block a user