fallback to no msaa
This commit is contained in:
parent
13127f2816
commit
34ceb96676
1 changed files with 6 additions and 1 deletions
|
@ -55,9 +55,14 @@ func CreateWindow(w, h int, title string) (*Window, *canvas.Canvas, error) {
|
||||||
|
|
||||||
// create window
|
// create window
|
||||||
window, err := sdl.CreateWindow(title, sdl.WINDOWPOS_CENTERED, sdl.WINDOWPOS_CENTERED, w, h, sdl.WINDOW_RESIZABLE|sdl.WINDOW_OPENGL)
|
window, err := sdl.CreateWindow(title, sdl.WINDOWPOS_CENTERED, sdl.WINDOWPOS_CENTERED, w, h, sdl.WINDOW_RESIZABLE|sdl.WINDOW_OPENGL)
|
||||||
|
if err != nil {
|
||||||
|
sdl.GL_SetAttribute(sdl.GL_MULTISAMPLEBUFFERS, 0)
|
||||||
|
sdl.GL_SetAttribute(sdl.GL_MULTISAMPLESAMPLES, 0)
|
||||||
|
window, err = sdl.CreateWindow(title, sdl.WINDOWPOS_CENTERED, sdl.WINDOWPOS_CENTERED, w, h, sdl.WINDOW_RESIZABLE|sdl.WINDOW_OPENGL)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, fmt.Errorf("Error creating window: %v", err)
|
return nil, nil, fmt.Errorf("Error creating window: %v", err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// create GL context
|
// create GL context
|
||||||
glContext, err := sdl.GL_CreateContext(window)
|
glContext, err := sdl.GL_CreateContext(window)
|
||||||
|
|
Loading…
Reference in a new issue