From fcc517f8e168c9563fdcc244fef97c17ef8f46c7 Mon Sep 17 00:00:00 2001 From: Nicky Date: Thu, 29 May 2014 19:07:03 +0200 Subject: [PATCH] More OSX cocoa fixes. Call function with correct types instead of hacking around the type system to make the compiler happy. --- indra/llwindow/llopenglview-objc.mm | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) 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; }