diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index 7d258ac9a3..7440079192 100644 --- a/indra/llwindow/llopenglview-objc.mm +++ b/indra/llwindow/llopenglview-objc.mm @@ -203,13 +203,25 @@ attributedStringInfo getSegments(NSAttributedString *str) [glContext makeCurrentContext]; + // setValues needs a real pointer, not some integer that is castet into one + + // if (vsync) + // { + // [glContext setValues:(const GLint*)1 forParameter:NSOpenGLCPSwapInterval]; + // } else { + // [glContext setValues:(const GLint*)0 forParameter:NSOpenGLCPSwapInterval]; + // } + + GLint glVsync = 0; if (vsync) { - [glContext setValues:(const GLint*)1 forParameter:NSOpenGLCPSwapInterval]; - } else { - [glContext setValues:(const GLint*)0 forParameter:NSOpenGLCPSwapInterval]; + glVsync = 1; } + [glContext setValues:&glVsync forParameter:NSOpenGLCPSwapInterval]; + + // + return self; }