aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llwindow/llwindowmacosx.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:34 -0500
committerJacek Antonelli2008-08-15 23:45:34 -0500
commitcd17687f01420952712a500107e0f93e7ab8d5f8 (patch)
treece48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/llwindow/llwindowmacosx.cpp
parentSecond Life viewer sources 1.19.0.5 (diff)
downloadmeta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz
Second Life viewer sources 1.19.1.0
Diffstat (limited to 'linden/indra/llwindow/llwindowmacosx.cpp')
-rw-r--r--linden/indra/llwindow/llwindowmacosx.cpp38
1 files changed, 25 insertions, 13 deletions
diff --git a/linden/indra/llwindow/llwindowmacosx.cpp b/linden/indra/llwindow/llwindowmacosx.cpp
index b458d7f..b616595 100644
--- a/linden/indra/llwindow/llwindowmacosx.cpp
+++ b/linden/indra/llwindow/llwindowmacosx.cpp
@@ -42,6 +42,7 @@
42#include "llgl.h" 42#include "llgl.h"
43#include "llstring.h" 43#include "llstring.h"
44#include "lldir.h" 44#include "lldir.h"
45#include "llviewercontrol.h"
45 46
46#include "llglheaders.h" 47#include "llglheaders.h"
47 48
@@ -800,22 +801,24 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits
800 } 801 }
801 aglSetInteger(mContext, AGL_SWAP_INTERVAL, &frames_per_swap); 802 aglSetInteger(mContext, AGL_SWAP_INTERVAL, &frames_per_swap);
802 803
803#if 0 // SJB: Got a compile error. Plus I don't want to test this along with everything else ; save it for later
804 //enable multi-threaded OpenGL 804 //enable multi-threaded OpenGL
805 CGLError cgl_err; 805 if (gSavedSettings.getBOOL("RenderAppleUseMultGL"))
806 CGLContextObj ctx = CGLGetCurrentContext();
807
808 cgl_err = CGLEnable( ctx, kCGLCEMPEngine);
809
810 if (cgl_err != kCGLNoError )
811 {
812 llinfos << "Multi-threaded OpenGL not available." << llendl;
813 }
814 else
815 { 806 {
816 llinfos << "Multi-threaded OpenGL enabled." << llendl; 807 CGLError cgl_err;
808 CGLContextObj ctx = CGLGetCurrentContext();
809
810 cgl_err = CGLEnable( ctx, kCGLCEMPEngine);
811
812 if (cgl_err != kCGLNoError )
813 {
814 llinfos << "Multi-threaded OpenGL not available." << llendl;
815 }
816 else
817 {
818 llinfos << "Multi-threaded OpenGL enabled." << llendl;
819 }
817 } 820 }
818#endif 821
819 // Don't need to get the current gamma, since there's a call that restores it to the system defaults. 822 // Don't need to get the current gamma, since there's a call that restores it to the system defaults.
820 return TRUE; 823 return TRUE;
821} 824}
@@ -2740,6 +2743,9 @@ const char* cursorIDToName(int id)
2740 case UI_CURSOR_TOOLBUY: return "UI_CURSOR_TOOLBUY"; 2743 case UI_CURSOR_TOOLBUY: return "UI_CURSOR_TOOLBUY";
2741 case UI_CURSOR_TOOLPAY: return "UI_CURSOR_TOOLPAY"; 2744 case UI_CURSOR_TOOLPAY: return "UI_CURSOR_TOOLPAY";
2742 case UI_CURSOR_TOOLOPEN: return "UI_CURSOR_TOOLOPEN"; 2745 case UI_CURSOR_TOOLOPEN: return "UI_CURSOR_TOOLOPEN";
2746 case UI_CURSOR_TOOLPLAY: return "UI_CURSOR_TOOLPLAY";
2747 case UI_CURSOR_TOOLPAUSE: return "UI_CURSOR_TOOLPAUSE";
2748 case UI_CURSOR_TOOLMEDIAOPEN: return "UI_CURSOR_TOOLMEDIAOPEN";
2743 case UI_CURSOR_PIPETTE: return "UI_CURSOR_PIPETTE"; 2749 case UI_CURSOR_PIPETTE: return "UI_CURSOR_PIPETTE";
2744 } 2750 }
2745 2751
@@ -2836,6 +2842,9 @@ void LLWindowMacOSX::setCursor(ECursorType cursor)
2836 case UI_CURSOR_TOOLBUY: 2842 case UI_CURSOR_TOOLBUY:
2837 case UI_CURSOR_TOOLPAY: 2843 case UI_CURSOR_TOOLPAY:
2838 case UI_CURSOR_TOOLOPEN: 2844 case UI_CURSOR_TOOLOPEN:
2845 case UI_CURSOR_TOOLPLAY:
2846 case UI_CURSOR_TOOLPAUSE:
2847 case UI_CURSOR_TOOLMEDIAOPEN:
2839 result = setImageCursor(gCursors[cursor]); 2848 result = setImageCursor(gCursors[cursor]);
2840 break; 2849 break;
2841 2850
@@ -2878,6 +2887,9 @@ void LLWindowMacOSX::initCursors()
2878 initPixmapCursor(UI_CURSOR_TOOLBUY, 1, 1); 2887 initPixmapCursor(UI_CURSOR_TOOLBUY, 1, 1);
2879 initPixmapCursor(UI_CURSOR_TOOLPAY, 1, 1); 2888 initPixmapCursor(UI_CURSOR_TOOLPAY, 1, 1);
2880 initPixmapCursor(UI_CURSOR_TOOLOPEN, 1, 1); 2889 initPixmapCursor(UI_CURSOR_TOOLOPEN, 1, 1);
2890 initPixmapCursor(UI_CURSOR_TOOLPLAY, 1, 1);
2891 initPixmapCursor(UI_CURSOR_TOOLPAUSE, 1, 1);
2892 initPixmapCursor(UI_CURSOR_TOOLMEDIAOPEN, 1, 1);
2881 2893
2882 initPixmapCursor(UI_CURSOR_SIZENWSE, 10, 10); 2894 initPixmapCursor(UI_CURSOR_SIZENWSE, 10, 10);
2883 initPixmapCursor(UI_CURSOR_SIZENESW, 10, 10); 2895 initPixmapCursor(UI_CURSOR_SIZENESW, 10, 10);