summaryrefslogtreecommitdiff
path: root/indra/llwindow
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2007-03-02 21:25:50 +0000
committerSteven Bennetts <steve@lindenlab.com>2007-03-02 21:25:50 +0000
commit4dabd9c0472deb49573fdafef2fa413e59703f19 (patch)
tree06c680d6a2047e03838d6548bccd26c7baf9d652 /indra/llwindow
parentd4462963c6ba5db2088723bbedc7b60f1184c594 (diff)
merge release@58699 beta-1-14-0@58707 -> release
Diffstat (limited to 'indra/llwindow')
-rw-r--r--indra/llwindow/llwindow.h1
-rw-r--r--indra/llwindow/llwindowmacosx.cpp17
-rw-r--r--indra/llwindow/llwindowwin32.cpp87
-rw-r--r--indra/llwindow/llwindowwin32.h1
4 files changed, 20 insertions, 86 deletions
diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h
index 442f4c9667..bbe530c906 100644
--- a/indra/llwindow/llwindow.h
+++ b/indra/llwindow/llwindow.h
@@ -298,6 +298,7 @@ public:
//
// helper funcs
//
+extern BOOL gDebugWindowProc;
// Protocols, like "http" and "https" we support in URLs
extern const S32 gURLProtocolWhitelistCount;
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index a32013a5ee..c18e72b706 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -11,6 +11,7 @@
#include "linden_common.h"
#include <Carbon/Carbon.h>
+#include <OpenGL/OpenGL.h>
#include "llwindowmacosx.h"
#include "llkeyboardmacosx.h"
@@ -719,6 +720,22 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits
}
aglSetInteger(mContext, AGL_SWAP_INTERVAL, &frames_per_swap);
+#if 0 // SJB: Got a compile error. Plus I don't want to test this along with everything else ; save it for later
+ //enable multi-threaded OpenGL
+ CGLError cgl_err;
+ CGLContextObj ctx = CGLGetCurrentContext();
+
+ cgl_err = CGLEnable( ctx, kCGLCEMPEngine);
+
+ if (cgl_err != kCGLNoError )
+ {
+ llinfos << "Multi-threaded OpenGL not available." << llendl;
+ }
+ else
+ {
+ llinfos << "Multi-threaded OpenGL enabled." << llendl;
+ }
+#endif
// Don't need to get the current gamma, since there's a call that restores it to the system defaults.
return TRUE;
}
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index c79a39c513..4efa173fc4 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -55,61 +55,6 @@ void show_window_creation_error(const char* title)
{
llwarns << title << llendl;
shell_open( "help/window_creation_error.html");
- /*
- OSMessageBox(
- "Second Life is unable to run because it can't set up your display.\n"
- "We need to be able to make a 32-bit color window at 1024x768, with\n"
- "an 8 bit alpha channel.\n"
- "\n"
- "First, be sure your monitor is set to True Color (32-bit) in\n"
- "Start -> Control Panels -> Display -> Settings.\n"
- "\n"
- "Otherwise, this may be due to video card driver issues.\n"
- "Please make sure you have the latest video card drivers installed.\n"
- "ATI drivers are available at http://www.ati.com/\n"
- "nVidia drivers are available at http://www.nvidia.com/\n"
- "\n"
- "If you continue to receive this message, contact customer service.",
- title,
- OSMB_OK);
- */
-}
-
-BOOL check_for_card(const char* RENDERER, const char* bad_card)
-{
- if(bad_card == NULL)
- {
- return FALSE;
- }
- if (!strnicmp(RENDERER, bad_card, strlen(bad_card))) /* Flawfinder: ignore */
- {
- char buffer[1024]; /* Flawfinder: ignore */
- snprintf(buffer, sizeof(buffer), /* Flawfinder: ignore */
- "Your video card appears to be a %s, which Second Life does not support.\n"
- "\n"
- "Second Life requires a video card with 32 Mb of memory or more, as well as\n"
- "multitexture support. We explicitly support nVidia GeForce 2 or better, \n"
- "and ATI Radeon 8500 or better.\n"
- "\n"
- "If you own a supported card and continue to receive this message, try \n"
- "updating to the latest video card drivers. Otherwise look in the\n"
- "secondlife.com support section or e-mail technical support\n"
- "\n"
- "You can try to run Second Life, but it will probably crash or run\n"
- "very slowly. Try anyway?",
- bad_card);
- S32 button = OSMessageBox(buffer, "Unsupported video card", OSMB_YESNO);
- if (OSBTN_YES == button)
- {
- return FALSE;
- }
- else
- {
- return TRUE;
- }
- }
-
- return FALSE;
}
//static
@@ -132,6 +77,7 @@ LLWindowWin32::LLWindowWin32(char *title, char *name, S32 x, S32 y, S32 width,
BOOL ignore_pixel_depth)
: LLWindow(fullscreen, flags)
{
+ S32 i = 0;
mIconResource = gIconResource;
mOverrideAspectRatio = 0.f;
mNativeAspectRatio = 0.f;
@@ -500,37 +446,6 @@ LLWindowWin32::LLWindowWin32(char *title, char *name, S32 x, S32 y, S32 width,
return;
}
- // Check for some explicitly unsupported cards.
- const char* RENDERER = (const char*) glGetString(GL_RENDERER);
-
- const char* CARD_LIST[] =
- { "RAGE 128",
- "RIVA TNT2",
- "Intel 810",
- "3Dfx/Voodoo3",
- "Radeon 7000",
- "Radeon 7200",
- "Radeon 7500",
- "Radeon DDR",
- "Radeon VE",
- "GDI Generic" };
- const S32 CARD_COUNT = sizeof(CARD_LIST)/sizeof(char*);
-
- // Future candidates:
- // ProSavage/Twister
- // SuperSavage
-
- S32 i;
- for (i = 0; i < CARD_COUNT; i++)
- {
- if (check_for_card(RENDERER, CARD_LIST[i]))
- {
- close();
- shell_open( "help/unsupported_card.html" );
- return;
- }
- }
-
gGLManager.initWGL();
if (gGLManager.mHasWGLARBPixelFormat && (wglChoosePixelFormatARB != NULL))
diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h
index 0b6fd5157a..ba944ca900 100644
--- a/indra/llwindow/llwindowwin32.h
+++ b/indra/llwindow/llwindowwin32.h
@@ -182,6 +182,7 @@ private:
};
extern LLW32MsgCallback gAsyncMsgCallback;
+extern LPWSTR gIconResource;
static void handleMessage( const MSG& msg );