[Gtkradiant] Mac OS X Changes committed to new CVS branch

EvilTypeGuy gtkradiant@zerowing.idsoftware.com
11 Nov 2002 19:52:36 -0600


--=-9c10Sx5gCAz7uOS69Y13
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Per TTimo, I've committed a cleaned up version of Tigital's Mac OS X
changes to a new cvs branch:

Stable-1_2-Apple

Since the cvs diff mailer barfed on my commit (due to a unescaped
character in the message), I've attached what I think is the most recent
diff of the changes I just committed.

-eviltypeguy




--=-9c10Sx5gCAz7uOS69Y13
Content-Description: 
Content-Disposition: inline; filename=osx.patch
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=ISO-8859-1

? .tm_project.cache
? GtkRadiant_1_2_Apple.prj
? GtkRadiant_1_2_Apple.pws
? osx.patch
Index: include/qerplugin.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/GtkRadiant/include/qerplugin.h,v
retrieving revision 1.25.2.5
diff -u -r1.25.2.5 qerplugin.h
--- include/qerplugin.h	9 Oct 2002 12:11:45 -0000	1.25.2.5
+++ include/qerplugin.h	12 Nov 2002 01:48:54 -0000
@@ -67,13 +67,22 @@
 #define QER_PLUG_GAME_SURFACEFLAGS  0x0010      // renames surface/content=
 names
=20
 // basics
+#ifndef __APPLE__					//tigital
 #define QERPLUG_INIT "QERPlug_Init"
 #define QERPLUG_GETNAME "QERPlug_GetName"
 #define QERPLUG_GETCOMMANDLIST "QERPlug_GetCommandList"
 #define QERPLUG_DISPATCH "QERPlug_Dispatch"
 #define QERPLUG_GETFUNCTABLE "QERPlug_GetFuncTable"
+#else
+#define QERPLUG_INIT "_QERPlug_Init"
+#define QERPLUG_GETNAME "_QERPlug_GetName"
+#define QERPLUG_GETCOMMANDLIST "_QERPlug_GetCommandList"
+#define QERPLUG_DISPATCH "_QERPlug_Dispatch"
+#define QERPLUG_GETFUNCTABLE "_QERPlug_GetFuncTable"
+#endif
=20
 // FIXME: not used, probably should remove
+#ifndef __APPLE__					//tigital
 #define QERPLUG_GETSERVICETPE "QERPlug_GetServiceType"
=20
 // game stuff
@@ -85,7 +94,19 @@
 #define QERPLUG_DOSURFACEDLG  "QERPlug_DoSurfaceDlg"      // runs the surf=
ace dialog in a plugin
                                                           // this is going=
 to get icky
 #define QERPLUG_GETSURFACEFLAGS "QERPlug_GetSurfaceFlags" // gets a list o=
f surface/content flag names from a plugin
+#else
+#define QERPLUG_GETSERVICETPE "_QERPlug_GetServiceType"
=20
+// game stuff
+#define QERPLUG_GETTEXTUREINFO "_QERPlug_GetTextureInfo"   // gets a textu=
re info structure
+#define QERPLUG_LOADTEXTURE    "_QERPlug_LoadTexture"      // loads a text=
ure, will return an RGBA structure
+                                                          // and any surfa=
ce flags/contents for it
+#define QERPLUG_GETTMODELINFO "_QERPlug_GetModelInfo"      // gets a model=
 info structure
+#define QERPLUG_LOADMODEL     "_QERPlug_LoadModel"         // loads model =
data from a plugin
+#define QERPLUG_DOSURFACEDLG  "_QERPlug_DoSurfaceDlg"      // runs the sur=
face dialog in a plugin
+                                                          // this is going=
 to get icky
+#define QERPLUG_GETSURFACEFLAGS "_QERPlug_GetSurfaceFlags" // gets a list =
of surface/content flag names from a plugin
+#endif
 struct _QERTextureInfo
 {
   char m_TextureExtension[QER_MAX_NAMELEN];   // the extension these textu=
res have
@@ -176,15 +197,27 @@
 // the plugin can register the EClasses he wants to handle
 //++timo TODO: this has got to move into the table, and be requested by QE=
RPlug_RequestInterface
 //++timo FIXME: the LPVOID parameter must be casted to an IEpair interface
+#ifndef __APPLE__			//tigital
 #define QERPLUG_REGISTERPLUGINENTITIES "QERPlug_RegisterPluginEntities"
+#else
+#define QERPLUG_REGISTERPLUGINENTITIES "_QERPlug_RegisterPluginEntities"
+#endif
 typedef void (WINAPI * PFN_QERPLUG_REGISTERPLUGINENTITIES)( void* );
 // if exists in plugin, gets called between INIT and GETCOMMANDLIST
 // the plugin can Init all it needs for surface properties
+#ifndef __APPLE__	//tigital
 #define QERPLUG_INITSURFACEPROPERTIES "QERPlug_InitSurfaceProperties"
+#else
+#define QERPLUG_INITSURFACEPROPERTIES "_QERPlug_InitSurfaceProperties"
+#endif
 typedef void (WINAPI * PFN_QERPLUG_INITSURFACEPROPERTIES)();
 // if Radiant needs to use a particular set of commands, it can request th=
e plugin to fill a func table
 // this is similar to PFN_QERAPP_REQUESTINTERFACE
+#ifndef __APPLE__
 #define QERPLUG_REQUESTINTERFACE "QERPlug_RequestInterface"
+#else
+#define QERPLUG_REQUESTINTERFACE "_QERPlug_RequestInterface"
+#endif
 typedef int (WINAPI * PFN_QERPLUG_REQUESTINTERFACE) (REFGUID refGUID, void=
* pInterface, const char *version_name);
 // Load an image file
 typedef void (WINAPI* PFN_QERAPP_LOADIMAGE) (const char *name, unsigned ch=
ar **pic, int *width, int *height);
@@ -206,7 +239,11 @@
   const char* version_name;=20
 } moduleentry_t;
=20
+#ifndef __APPLE__	//tigital
 #define QERPLUG_LISTINTERFACES "QERPlug_ListInterfaces"
+#else
+#define QERPLUG_LISTINTERFACES "_QERPlug_ListInterfaces"
+#endif
 #define MAX_QERPLUG_INTERFACES 10
 typedef int (WINAPI* PFN_QERPLUG_LISTINTERFACES) (moduleentry_t table[MAX_=
QERPLUG_INTERFACES]);
=20
@@ -280,6 +317,7 @@
 //++timo NOTE : the #defines here are never used, but can help finding whe=
re things are done in the editor
=20
 // brush manipulation routines
+#ifndef __APPLE__		//tigital
 #define QERAPP_CREATEBRUSH "QERApp_CreateBrush"
 #define QERAPP_CREATEBRUSHHANDLE "QERApp_CreateBrushHandle"
 #define QERAPP_DELETEBRUSHHANDLE "QERApp_DeleteBrushHandle"
@@ -391,6 +429,119 @@
 // v1.80
 #define QERAPP_GETDISPATCHPARAMS "QERApp_GetDispatchParams"
=20
+#else
+
+#define QERAPP_CREATEBRUSH "_QERApp_CreateBrush"
+#define QERAPP_CREATEBRUSHHANDLE "_QERApp_CreateBrushHandle"
+#define QERAPP_DELETEBRUSHHANDLE "_QERApp_DeleteBrushHandle"
+#define QERAPP_COMMITBRUSHHANDLETOMAP "_QERApp_CommitBrushHandleToMap"
+//++timo not implemented .. remove
+// #define QERAPP_BINDHANDLESTOENTITY "QERApp_BindHandlesToEntity"
+#define QERAPP_ADDFACE "_QERApp_AddFace"
+#define QERAPP_ADDFACEDATA "_QERApp_AddFaceData"
+#define QERAPP_GETFACECOUNT "_QERApp_GetFaceCount"
+#define QERAPP_GETFACEDATA "_QERApp_GetFaceData"
+#define QERAPP_SETFACEDATA "_QERApp_SetFaceData"
+#define QERAPP_DELETEFACE "_QERApp_DeleteFace"
+#define QERAPP_TEXTUREBRUSH "_QERApp_TextureBrush"
+#define QERAPP_BUILDBRUSH "_QERApp_BuildBrush"					// PGM
+#define QERAPP_SELECTEDBRUSHCOUNT "_QERApp_SelectedBrushCount"
+#define QERAPP_ALLOCATESELECTEDBRUSHHANDLES "_QERApp_AllocateSelectedBrush=
Handles"
+#define QERAPP_RELEASESELECTEDBRUSHHANDLES "_QERApp_ReleaseSelectedBrushHa=
ndles"
+#define QERAPP_GETSELECTEDBRUSHHANDLE "_QERApp_GetSelectedBrushHandle"
+#define QERAPP_ACTIVEBRUSHCOUNT "_QERApp_ActiveBrushCount"
+#define QERAPP_ALLOCATEACTIVEBRUSHHANDLES "_QERApp_AllocateActiveBrushHand=
les"
+#define QERAPP_RELEASEACTIVEBRUSHHANDLES "_QERApp_ReleaseActiveBrushHandle=
s"
+#define QERAPP_GETACTIVEBRUSHHANDLE "_QERApp_GetActiveBrushHandle"
+
+// texture stuff
+#define QERAPP_TEXTURECOUNT "_QERApp_TextureCount"
+#define QERAPP_GETTEXTURE "_QERApp_GetTexture"
+#define QERAPP_GETCURRENTTEXTURE "_QERApp_GetCurrentTexture"
+#define QERAPP_SETCURRENTTEXTURE "_QERApp_SetCurrentTexture"
+
+// selection=20
+#define QERAPP_DELETESELECTION "_QERApp_DeleteSelection"
+#define QERAPP_SELECTBRUSH "_QERApp_SelectBrush"					// PGM
+#define QERAPP_DESELECTBRUSH "_QERApp_DeselectBrush"				// PGM
+#define QERAPP_DESELECTALLBRUSHES "_QERApp_DeselectAllBrushes"	// PGM
+
+// data gathering
+#define QERAPP_GETPOINTS "_QERApp_GetPoints"
+#define QERAPP_SELECTBRUSHES "_QERApp_GetBrushes"
+
+// entity class stuff
+// the entity handling is very basic for 1.0
+#define QERAPP_GETECLASSCOUNT "_QERApp_GetEClassCount"
+#define QERAPP_GETECLASS "_QERApp_GetEClass"
+
+// misc
+#define QERAPP_SYSMSG "_QERApp_SysMsg"
+#define QERAPP_INFOMSG "_QERApp_InfoMsg"
+#define QERAPP_HIDEINFOMSG "_QERApp_HideInfoMsg"
+#define QERAPP_RESET_PLUGINS "_QERApp_ResetPlugins"
+
+// texture loading
+#define QERAPP_LOADTEXTURERGBA "_QERApp_LoadTextureRGBA"
+
+// FIXME: the following are not implemented yet
+// hook registrations
+#define QERAPP_REGISTER_MAPLOADFUNC "_QERApp_Register_MapLoadFunc"
+#define QERAPP_REGISTER_MAPSAVEFUNC "_QERApp_Register_MapSaveFunc"
+
+// FIXME: the following are not implemented yet
+#define QERAPP_REGISTER_PROJECTLOADFUNC "_QERApp_Register_ProjectLoadFunc"
+#define QERAPP_REGISTER_MOUSEHANDLER "_QERApp_Register_MouseHandler"
+#define QERAPP_REGISTER_KEYHANDLER "_QERApp_Register_KeyHandler"
+
+// FIXME: new primtives do not work in v1.00
+// primitives are new types of things in the map
+// for instance, the Q3 curves could have been done as=20
+// primitives instead of being built in=20
+// it will be a plugins responsibility to hook the map load and save funcs=
 to load
+// and/or save any additional data (like new primitives of some type)
+// the editor will call each registered renderer during the rendering proc=
ess to repaint
+// any primitives the plugin owns
+// each primitive object has a temporary sibling brush that lives in the m=
ap
+// FIXME: go backwards on this a bit.. orient it more towards the temp bru=
sh mode as it will be cleaner
+// basically a plugin will hook the map load and save and will add the pri=
mitives to the map.. this will
+// produce a temporary 'primitive' brush and the appropriate renderer will=
 be called as well as the=20
+// edit handler (for edge drags, sizes, rotates, etc.. ) and the vertex ma=
ker will be called when vertex
+// mode is attemped on the brush.. there will need to be a GetPrimitiveBou=
nds callback in the edit handler
+// so the brush can resize appropriately as needed.. this might be the plu=
gins responsibility to set the=20
+// sibling brushes size.. it will then be the plugins responsibility to ho=
ok map save to save the primitives
+// as the editor will discard any temp primitive brushes.. (there probably=
 needs to be some kind of sanity check
+// here as far as keeping the brushes and the plugin in sync.. i suppose t=
he edit handler can deal with all of that
+// crap but it looks like a nice place for a mess)
+#define QERAPP_REGISTER_PRIMITIVE "_QERApp_Register_Primitive"
+#define QERAPP_REGISTER_RENDERER "_QERApp_Register_Renderer"
+#define QERAPP_REGISTER_EDITHANDLER "_QERApp_Register_EditHandler"
+#define QERAPP_REGISTER_VERTEXMAKER "_QERApp_Register_VertexMaker"
+#define QERAPP_ADDPRIMITIVE "_QERApp_AddPrimitive"
+
+// v1.70
+#define QERAPP_GETENTITYCOUNT "_QERApp_GetEntityCount"
+#define QERAPP_GETENTITYHANDLE "_QERApp_GetEntityHandle"
+//++timo not implemented for the moment
+// #define QERAPP_GETENTITYINFO "QERApp_GetEntityInfo"
+//++timo does the keyval need some more funcs to add/remove ?
+// get the pointer and do the changes yourself
+#define QERAPP_GETENTITYKEYVALLIST "_QERApp_GetKeyValList"
+#define QERAPP_ALLOCATEEPAIR "_QERApp_AllocateEpair"
+// will check current KeyVal list is NULL, otherwise use GetKeyValList
+#define QERAPP_SETENTITYKEYVALLIST "_QERApp_SetKeyValList"
+#define QERAPP_ALLOCATEENTITYBRUSHHANDLES "_QERApp_AllocateEntityBrushHand=
les"
+#define QERAPP_RELEASEENTITYBRUSHHANDLES "_QERApp_ReleaseEntityBrushHandle=
s"
+#define QERAPP_GETENTITYBRUSHHANDLE "_QERApp_GetEntityBrushHandle"
+#define QERAPP_CREATEENTITYHANDLE "_QERApp_CreateEntityHandle"
+#define QERAPP_COMMITBRUSHHANDLETOENTITY "_QERApp_CommitBrushHandleToEntit=
y"
+#define QERAPP_COMMITENTITYHANDLETOMAP "_QERApp_CommitEntityHandleToMap"
+#define QERAPP_SETSCREENUPDATE "_QERApp_SetScreenUpdate"
+#define QERAPP_BUILDBRUSH2 "_QERApp_BuildBrush2"
+
+// v1.80
+#define QERAPP_GETDISPATCHPARAMS "_QERApp_GetDispatchParams"
+#endif
 struct _QERPointData
 {
   int     m_nCount;
Index: libs/mathlib/linear.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/GtkRadiant/libs/mathlib/linear.c,v
retrieving revision 1.2
diff -u -r1.2 linear.c
--- libs/mathlib/linear.c	3 Dec 2001 14:26:11 -0000	1.2
+++ libs/mathlib/linear.c	12 Nov 2002 01:48:54 -0000
@@ -1,4 +1,9 @@
+// ETG-FIXME: Is this really necessary?
+#ifndef __APPLE__
 #include <malloc.h>
+#else
+#include <stdlib.h>
+#endif
 #include <limits.h>
 #include <float.h>
=20
Index: plugins/imagepng/plugin.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/GtkRadiant/plugins/imagepng/Attic/plugin.cpp,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 plugin.cpp
--- plugins/imagepng/plugin.cpp	6 Jul 2002 14:58:48 -0000	1.1.2.2
+++ plugins/imagepng/plugin.cpp	12 Nov 2002 01:48:54 -0000
@@ -25,6 +25,11 @@
 #include "plugin.h"
 #include "png.h"
=20
+// ETG-FIXME: Is this really necessary?
+#ifdef __APPLE__	//tigital
+#include <stdlib.h>
+#endif
+
 _QERFuncTable_1 g_FuncTable; // Radiant function table
 _QERFileSystemTable g_FileSystemTable;
 static const char *PLUGIN_NAME =3D "Image"; // plugin name
Index: radiant/gtkfilesel-darwin.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/GtkRadiant/radiant/gtkfilesel-darwin.c,v
retrieving revision 1.2
diff -u -r1.2 gtkfilesel-darwin.c
--- radiant/gtkfilesel-darwin.c	27 May 2001 13:40:55 -0000	1.2
+++ radiant/gtkfilesel-darwin.c	12 Nov 2002 01:48:55 -0000
@@ -519,11 +519,11 @@
 }
=20
 static void
-gtk_file_selection_class_init (GtkFileSelectionClass *class)
+gtk_file_selection_class_init (GtkFileSelectionClass *klass)	//tigital
 {
   GtkObjectClass *object_class;
=20
-  object_class =3D (GtkObjectClass*) class;
+  object_class =3D (GtkObjectClass*) klass;
=20
   parent_class =3D gtk_type_class (GTK_TYPE_WINDOW);
=20
Index: radiant/main.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/GtkRadiant/radiant/main.cpp,v
retrieving revision 1.40.2.13
diff -u -r1.40.2.13 main.cpp
--- radiant/main.cpp	28 Oct 2002 23:24:29 -0000	1.40.2.13
+++ radiant/main.cpp	12 Nov 2002 01:48:55 -0000
@@ -520,10 +520,14 @@
   libgl =3D "opengl32.dll";
 #endif
=20
-#if defined (__linux__) || defined (__APPLE__)
+#if defined (__linux__)
   libgl =3D "libGL.so.1";
 #endif
=20
+#ifdef __APPLE__
+  libgl =3D "/usr/X11R6/lib/libGL.1.dylib";
+#endif
+
   gtk_init(&argc, &argv);
=20
   if ((ptr =3D getenv ("Q3R_LIBGL")) !=3D NULL)
@@ -643,7 +647,13 @@
   realpath (loki_getdatapath(), real);
   if (real[strlen(real)-1] !=3D '/')
     strcat(real, "/");
+#ifndef __APPLE__					//tigital
   g_strAppPath =3D real;
+#else
+  // ETG-FIXME: This needs to be handled by the eventual setup package for=
 MacOSX?
+  g_strAppPath =3D "/Applications/quake3/";
+#endif
+
 #if 0
   printf("g_strAppPath: %s\n", g_strAppPath.GetBuffer());
 #endif
Index: radiant/mainframe.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/GtkRadiant/radiant/mainframe.cpp,v
retrieving revision 1.77.2.19
diff -u -r1.77.2.19 mainframe.cpp
--- radiant/mainframe.cpp	4 Nov 2002 12:30:05 -0000	1.77.2.19
+++ radiant/mainframe.cpp	12 Nov 2002 01:48:57 -0000
@@ -912,7 +912,12 @@
=20
   for (iGame =3D g_PrefsDlg.mGamesDialog.mGames.begin(); iGame !=3D g_Pref=
sDlg.mGamesDialog.mGames.end(); iGame++)
   {
+// ETG-FIXME: This needs to be handled by the eventual MacOS X setup packa=
ge?
+#ifndef __APPLE__			//tigital
     FileName =3D (*iGame)->mGameToolsPath;
+#else
+    FileName =3D "/Applications/quake3/gametools/";
+#endif
     FileName +=3D "game.xlink";
     process_xlink(FileName, (*iGame)->mGameName, (*iGame)->mGameToolsPath.=
GetBuffer(), menu, accel, menu_accel);
   }
Index: radiant/plugin.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/GtkRadiant/radiant/Attic/plugin.cpp,v
retrieving revision 1.17.12.1
diff -u -r1.17.12.1 plugin.cpp
--- radiant/plugin.cpp	9 Oct 2002 12:11:46 -0000	1.17.12.1
+++ radiant/plugin.cpp	12 Nov 2002 01:48:57 -0000
@@ -38,6 +38,9 @@
 }
 #endif
 #endif
+#ifdef __APPLE__
+#include <mach-o/dyld.h>
+#endif
 #include "stdafx.h"
 //#include "qe3.h"
 #include "plugin.h"
@@ -96,7 +99,12 @@
=20
   if (m_hDLL !=3D NULL)
   {
+#ifndef __APPLE__
+    m_pfnInit =3D (PFN_QERPLUG_INIT)dlsym(m_hDLL, "_QERPlug_Init");
+#else
     m_pfnInit =3D (PFN_QERPLUG_INIT)dlsym(m_hDLL, QERPLUG_INIT);
+#endif
+
     if (m_pfnInit !=3D NULL)
     {
 #ifdef WIN32
Index: radiant/pluginmanager.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/GtkRadiant/radiant/pluginmanager.cpp,v
retrieving revision 1.59.2.9
diff -u -r1.59.2.9 pluginmanager.cpp
--- radiant/pluginmanager.cpp	2 Nov 2002 03:18:00 -0000	1.59.2.9
+++ radiant/pluginmanager.cpp	12 Nov 2002 01:48:57 -0000
@@ -294,7 +294,11 @@
       if ((ext =3D=3D NULL) || (strcmp (ext, ".so") !=3D 0))
         continue;
 #endif
+#ifndef __APPLE__
       strPath.Format("%s/%s", path, dirlist->d_name);
+#else
+      strPath.Format("%s%s", path, dirlist->d_name);
+#endif
       CPlugIn *pPlug =3D new CPlugIn();
       if (pPlug->Load(strPath))
       {
Index: radiant/preferences.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/GtkRadiant/radiant/preferences.cpp,v
retrieving revision 1.37.2.20
diff -u -r1.37.2.20 preferences.cpp
--- radiant/preferences.cpp	10 Nov 2002 14:52:53 -0000	1.37.2.20
+++ radiant/preferences.cpp	12 Nov 2002 01:48:58 -0000
@@ -396,8 +396,10 @@
     // default
 #ifdef WIN32
     mEngine =3D "quake3.exe";
-#else
+#elif __linux__
     mEngine =3D "quake3";
+#elif __APPLE__
+    mEngine =3D "Quake3";
 #endif
   }
 #if defined (__linux__) || defined (__APPLE__)
@@ -804,7 +806,12 @@
   CString strPath;
   struct dirent *dirlist;
   DIR *dir;
+#ifndef __APPLE__					//tigital
   CString strGamesPath =3D g_strAppPath.GetBuffer();
+#else
+  // ETG-FIXME: This needs to be handled by the eventual Mac OS X setup?
+  CString strGamesPath =3D "/Applications/quake3/";
+#endif
   strGamesPath +=3D "games";
   const char *path =3D strGamesPath.GetBuffer();
=20
Index: radiant/qgl.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/GtkRadiant/radiant/qgl.c,v
retrieving revision 1.14.22.2
diff -u -r1.14.22.2 qgl.c
--- radiant/qgl.c	21 Oct 2002 22:34:16 -0000	1.14.22.2
+++ radiant/qgl.c	12 Nov 2002 01:48:58 -0000
@@ -35,7 +35,7 @@
 #include <stdio.h>
 #include <float.h>
 #include <string.h>
-#ifdef __linux__
+#if defined (__linux__) || defined (__APPLE__)
 #include <dlfcn.h>
 #endif
=20
@@ -86,7 +86,7 @@
 #define WINAPI
 #endif
=20
-#ifdef __linux__
+#if defined (__linux__) || defined (__APPLE__)
 void* g_hGLDLL;
=20
 XVisualInfo* (*qglXChooseVisual)(Display *dpy, int screen, int *attribList=
);
@@ -489,7 +489,11 @@
=20
 // glu stuff
 void (APIENTRY * qgluPerspective) (GLdouble fovy, GLdouble aspect, GLdoubl=
e zNear, GLdouble zFar);
+
+#if 0 // ETG-FIXME: Doesn't appear to be used anywhere
 int  (APIENTRY * qgluBuild2DMipmaps) (GLenum target, GLint components, GLi=
nt width, GLint height, GLenum format, GLenum      type, const void  *data)=
;
+#endif
+
 // added for plugins
 void (APIENTRY * qgluLookAt)(
   GLdouble eyex,
@@ -518,7 +522,7 @@
     FreeLibrary(g_hGLDLL);
 #endif
=20
-#ifdef __linux__
+#if defined (__linux__) || defined (__APPLE__)
     dlclose (g_hGLDLL);
 #endif
=20
@@ -929,7 +933,7 @@
   qwglSetDeviceGammaRampEXT    =3D NULL;
 #endif
=20
-#ifdef __linux__
+#if defined (__linux__) || defined (__APPLE__)
   qglXChooseVisual             =3D NULL;
   qglXCreateContext            =3D NULL;
   qglXDestroyContext           =3D NULL;
@@ -951,7 +955,9 @@
 #endif
=20
   qgluPerspective =3D NULL;
+#if 0 // ETG-FIXME: Doesn't appear to be used anywhere.
   qgluBuild2DMipmaps =3D NULL;
+#endif
   qgluErrorString =3D NULL;
   qgluLookAt =3D NULL;
 }
@@ -974,13 +980,17 @@
   return GetProcAddress (handle, symbol);
 #endif
=20
-#ifdef __linux__
+#if defined (__linux__) || defined (__APPLE__)
   void* ret =3D dlsym (handle, symbol);
   char *err =3D dlerror();
   if (err)
   {
     init_error =3D 1;
+#ifndef __APPLE__
     printf ("Error loading OpenGL libraries: %s\n", err);
+#else
+    printf ("Error loading OpenGL libraries: %s %s\n", err, symbol);
+#endif
   }
   return ret;
 #endif
@@ -1048,8 +1058,11 @@
 {
   int i, j;
   float sx, sy;
-
+#ifndef __APPLE__
   GLubyte* new_image =3D malloc (destw*desth*4*sizeof(GLubyte));
+#else
+  GLubyte* new_image =3D (GLubyte *)malloc (destw*desth*4*sizeof(GLubyte))=
;
+#endif
   if (new_image =3D=3D NULL)
     return NULL;
=20
@@ -1084,6 +1097,9 @@
 #define CEILING(A, B)  ( (A) % (B) =3D=3D 0 ? (A)/(B) : (A)/(B)+1 )
=20
 // NOTE: only supports RGBA, UNSIGNED_BYTE images.
+// ETG-FIXME: This function doesn't appear to be used anywhere,
+// #if 0'ing for now.
+#if 0
 GLint WINAPI gluBuild2DMipmaps2 (GLenum target, GLint components, GLsizei =
width, GLsizei height, GLenum format,
 			  GLenum type, const void *data)
 {
@@ -1197,6 +1213,7 @@
=20
   return 0;
 }
+#endif
=20
 typedef struct glu_error_struct
 {
@@ -1232,11 +1249,9 @@
   g_hGLDLL =3D LoadLibrary(dllname);=20
 #endif
=20
-#ifdef __linux__
+#if defined (__linux__) || (__APPLE__)
   char* err;
=20
-  Sys_Printf ("Loading GL library: %s ...", dllname);
-
   // NOTE TTimo
   // I don't like RTLD_LAZY|RTLD_GLOBAL too much .. it's dangerous
   // maybe try RTLD_NOW? or would that break compatibility .. you never kn=
ow when that stuff is going to explode
@@ -1250,11 +1265,17 @@
   if (g_hGLDLL =3D=3D NULL)
     return 0;
=20
+  Sys_Printf ("Loading GL library: %s ...", dllname);
+
   qgluPerspective              =3D &gluPerspective2;
+
+#if 0 // ETG-FIXME: Doesn't appear to be used anywhere.
   qgluBuild2DMipmaps           =3D &gluBuild2DMipmaps2;
+#endif
+
   qgluLookAt                   =3D &gluLookAt2;
   qgluErrorString              =3D &gluErrorString;
-
+#ifndef __APPLE__
   qglAccum                     =3D safe_dlsym (g_hGLDLL, "glAccum" );
   qglAlphaFunc                 =3D safe_dlsym (g_hGLDLL, "glAlphaFunc" );
   qglAreTexturesResident       =3D safe_dlsym (g_hGLDLL, "glAreTexturesRes=
ident" );
@@ -1331,7 +1352,7 @@
   qglEnableClientState         =3D safe_dlsym (g_hGLDLL, "glEnableClientSt=
ate" );
   qglEnd                       =3D safe_dlsym (g_hGLDLL, "glEnd" );
   qglEndList                   =3D safe_dlsym (g_hGLDLL, "glEndList" );
-  qglEvalCoord1d	       =3D safe_dlsym (g_hGLDLL, "glEvalCoord1d" );
+  qglEvalCoord1d               =3D safe_dlsym (g_hGLDLL, "glEvalCoord1d" )=
;
   qglEvalCoord1dv              =3D safe_dlsym (g_hGLDLL, "glEvalCoord1dv" =
);
   qglEvalCoord1f               =3D safe_dlsym (g_hGLDLL, "glEvalCoord1f" )=
;
   qglEvalCoord1fv              =3D safe_dlsym (g_hGLDLL, "glEvalCoord1fv" =
);
@@ -1591,7 +1612,344 @@
   qglVertex4sv                 =3D safe_dlsym (g_hGLDLL, "glVertex4sv" );
   qglVertexPointer             =3D safe_dlsym (g_hGLDLL, "glVertexPointer"=
 );
   qglViewport                  =3D safe_dlsym (g_hGLDLL, "glViewport" );
-
+#else
+  qglAccum                     =3D glAccum;
+  qglAlphaFunc                 =3D glAlphaFunc;
+  qglAreTexturesResident       =3D glAreTexturesResident;
+  qglArrayElement              =3D glArrayElement;
+  qglBegin                     =3D glBegin;
+  qglBindTexture               =3D glBindTexture;
+  qglBitmap                    =3D glBitmap;
+  qglBlendFunc                 =3D glBlendFunc;
+  qglCallList                  =3D glCallList;
+  qglCallLists                 =3D glCallLists;
+  qglClear                     =3D glClear;
+  qglClearAccum                =3D glClearAccum;
+  qglClearColor                =3D glClearColor;
+  qglClearDepth                =3D glClearDepth;
+  qglClearIndex                =3D glClearIndex;
+  qglClearStencil              =3D glClearStencil;
+  qglClipPlane                 =3D glClipPlane;
+  qglColor3b                   =3D glColor3b;
+  qglColor3bv                  =3D glColor3bv;
+  qglColor3d                   =3D glColor3d;
+  qglColor3dv                  =3D glColor3dv;
+  qglColor3f                   =3D glColor3f;
+  qglColor3fv                  =3D glColor3fv;
+  qglColor3i                   =3D glColor3i;
+  qglColor3iv                  =3D glColor3iv;
+  qglColor3s                   =3D glColor3s;
+  qglColor3sv                  =3D glColor3sv;
+  qglColor3ub                  =3D glColor3ub;
+  qglColor3ubv                 =3D glColor3ubv;
+  qglColor3ui                  =3D glColor3ui;
+  qglColor3uiv                 =3D glColor3uiv;
+  qglColor3us                  =3D glColor3us;
+  qglColor3usv                 =3D glColor3usv;
+  qglColor4b                   =3D glColor4b;
+  qglColor4bv                  =3D glColor4bv;
+  qglColor4d                   =3D glColor4d;
+  qglColor4dv                  =3D glColor4dv;
+  qglColor4f                   =3D glColor4f;
+  qglColor4fv                  =3D glColor4fv;
+  qglColor4i                   =3D glColor4i;
+  qglColor4iv                  =3D glColor4iv;
+  qglColor4s                   =3D glColor4s;
+  qglColor4sv                  =3D glColor4sv;
+  qglColor4ub                  =3D glColor4ub;
+  qglColor4ubv                 =3D glColor4ubv;
+  qglColor4ui                  =3D glColor4ui;
+  qglColor4uiv                 =3D glColor4uiv;
+  qglColor4us                  =3D glColor4us;
+  qglColor4usv                 =3D glColor4usv;
+  qglColorMask                 =3D glColorMask;
+  qglColorMaterial             =3D glColorMaterial;
+  qglColorPointer              =3D glColorPointer;
+  qglCopyPixels                =3D glCopyPixels;
+  qglCopyTexImage1D            =3D glCopyTexImage1D;
+  qglCopyTexImage2D            =3D glCopyTexImage2D;
+  qglCopyTexSubImage1D         =3D glCopyTexSubImage1D;
+  qglCopyTexSubImage2D         =3D glCopyTexSubImage2D;
+  qglCullFace                  =3D glCullFace;
+  qglDeleteLists               =3D glDeleteLists;
+  qglDeleteTextures            =3D glDeleteTextures;
+  qglDepthFunc                 =3D glDepthFunc;
+  qglDepthMask                 =3D glDepthMask;
+  qglDepthRange                =3D glDepthRange;
+  qglDisable                   =3D glDisable;
+  qglDisableClientState        =3D glDisableClientState;
+  qglDrawArrays                =3D glDrawArrays;
+  qglDrawBuffer                =3D glDrawBuffer;
+  qglDrawElements              =3D glDrawElements;
+  qglDrawPixels                =3D glDrawPixels;
+  qglEdgeFlag                  =3D glEdgeFlag;
+  qglEdgeFlagPointer           =3D glEdgeFlagPointer;
+  qglEdgeFlagv                 =3D glEdgeFlagv;
+  qglEnable                    =3D glEnable;
+  qglEnableClientState         =3D glEnableClientState;
+  qglEnd                       =3D glEnd;
+  qglEndList                   =3D glEndList;
+  qglEvalCoord1d               =3D glEvalCoord1d;
+  qglEvalCoord1dv              =3D glEvalCoord1dv;
+  qglEvalCoord1f               =3D glEvalCoord1f;
+  qglEvalCoord1fv              =3D glEvalCoord1fv;
+  qglEvalCoord2d               =3D glEvalCoord2d;
+  qglEvalCoord2dv              =3D glEvalCoord2dv;
+  qglEvalCoord2f               =3D glEvalCoord2f;
+  qglEvalCoord2fv              =3D glEvalCoord2fv;
+  qglEvalMesh1                 =3D glEvalMesh1;
+  qglEvalMesh2                 =3D glEvalMesh2;
+  qglEvalPoint1                =3D glEvalPoint1;
+  qglEvalPoint2                =3D glEvalPoint2;
+  qglFeedbackBuffer            =3D glFeedbackBuffer;
+  qglFinish                    =3D glFinish;
+  qglFlush                     =3D glFlush;
+  qglFogf                      =3D glFogf;
+  qglFogfv                     =3D glFogfv;
+  qglFogi                      =3D glFogi;
+  qglFogiv                     =3D glFogiv;
+  qglFrontFace                 =3D glFrontFace;
+  qglFrustum                   =3D glFrustum;
+  qglGenLists                  =3D glGenLists;
+  qglGenTextures               =3D glGenTextures;
+  qglGetBooleanv               =3D glGetBooleanv;
+  qglGetClipPlane              =3D glGetClipPlane;
+  qglGetDoublev                =3D glGetDoublev;
+  qglGetError                  =3D glGetError;
+  qglGetFloatv                 =3D glGetFloatv;
+  qglGetIntegerv               =3D glGetIntegerv;
+  qglGetLightfv                =3D glGetLightfv;
+  qglGetLightiv                =3D glGetLightiv;
+  qglGetMapdv                  =3D glGetMapdv;
+  qglGetMapfv                  =3D glGetMapfv;
+  qglGetMapiv                  =3D glGetMapiv;
+  qglGetMaterialfv             =3D glGetMaterialfv;
+  qglGetMaterialiv             =3D glGetMaterialiv;
+  qglGetPixelMapfv             =3D glGetPixelMapfv;
+  qglGetPixelMapuiv            =3D glGetPixelMapuiv;
+  qglGetPixelMapusv            =3D glGetPixelMapusv;
+  qglGetPointerv               =3D glGetPointerv;
+  qglGetPolygonStipple         =3D glGetPolygonStipple;
+  qglGetString                 =3D glGetString;
+  qglGetTexEnvfv               =3D glGetTexEnvfv;
+  qglGetTexEnviv               =3D glGetTexEnviv;
+  qglGetTexGendv               =3D glGetTexGendv;
+  qglGetTexGenfv               =3D glGetTexGenfv;
+  qglGetTexGeniv               =3D glGetTexGeniv;
+  qglGetTexImage               =3D glGetTexImage;
+  qglGetTexLevelParameterfv    =3D glGetTexLevelParameterfv;
+  qglGetTexLevelParameteriv    =3D glGetTexLevelParameteriv;
+  qglGetTexParameterfv         =3D glGetTexParameterfv;
+  qglGetTexParameteriv         =3D glGetTexParameteriv;
+  qglHint                      =3D glHint;
+  qglIndexMask                 =3D glIndexMask;
+  qglIndexPointer              =3D glIndexPointer;
+  qglIndexd                    =3D glIndexd;
+  qglIndexdv                   =3D glIndexdv;
+  qglIndexf                    =3D glIndexf;
+  qglIndexfv                   =3D glIndexfv;
+  qglIndexi                    =3D glIndexi;
+  qglIndexiv                   =3D glIndexiv;
+  qglIndexs                    =3D glIndexs;
+  qglIndexsv                   =3D glIndexsv;
+  qglIndexub                   =3D glIndexub;
+  qglIndexubv                  =3D glIndexubv;
+  qglInitNames                 =3D glInitNames;
+  qglInterleavedArrays         =3D glInterleavedArrays;
+  qglIsEnabled                 =3D glIsEnabled;
+  qglIsList                    =3D glIsList;
+  qglIsTexture                 =3D glIsTexture;
+  qglLightModelf               =3D glLightModelf;
+  qglLightModelfv              =3D glLightModelfv;
+  qglLightModeli               =3D glLightModeli;
+  qglLightModeliv              =3D glLightModeliv;
+  qglLightf                    =3D glLightf;
+  qglLightfv                   =3D glLightfv;
+  qglLighti                    =3D glLighti;
+  qglLightiv                   =3D glLightiv;
+  qglLineStipple               =3D glLineStipple;
+  qglLineWidth                 =3D glLineWidth;
+  qglListBase                  =3D glListBase;
+  qglLoadIdentity              =3D glLoadIdentity;
+  qglLoadMatrixd               =3D glLoadMatrixd;
+  qglLoadMatrixf               =3D glLoadMatrixf;
+  qglLoadName                  =3D glLoadName;
+  qglLogicOp                   =3D glLogicOp;
+  qglMap1d                     =3D glMap1d;
+  qglMap1f                     =3D glMap1f;
+  qglMap2d                     =3D glMap2d;
+  qglMap2f                     =3D glMap2f;
+  qglMapGrid1d                 =3D glMapGrid1d;
+  qglMapGrid1f                 =3D glMapGrid1f;
+  qglMapGrid2d                 =3D glMapGrid2d;
+  qglMapGrid2f                 =3D glMapGrid2f;
+  qglMaterialf                 =3D glMaterialf;
+  qglMaterialfv                =3D glMaterialfv;
+  qglMateriali                 =3D glMateriali;
+  qglMaterialiv                =3D glMaterialiv;
+  qglMatrixMode                =3D glMatrixMode;
+  qglMultMatrixd               =3D glMultMatrixd;
+  qglMultMatrixf               =3D glMultMatrixf;
+  qglNewList                   =3D glNewList;
+  qglNormal3b                  =3D glNormal3b;
+  qglNormal3bv                 =3D glNormal3bv;
+  qglNormal3d                  =3D glNormal3d;
+  qglNormal3dv                 =3D glNormal3dv;
+  qglNormal3f                  =3D glNormal3f;
+  qglNormal3fv                 =3D glNormal3fv;
+  qglNormal3i                  =3D glNormal3i;
+  qglNormal3iv                 =3D glNormal3iv;
+  qglNormal3s                  =3D glNormal3s;
+  qglNormal3sv                 =3D glNormal3sv;
+  qglNormalPointer             =3D glNormalPointer;
+  qglOrtho                     =3D glOrtho;
+  qglPassThrough               =3D glPassThrough;
+  qglPixelMapfv                =3D glPixelMapfv;
+  qglPixelMapuiv               =3D glPixelMapuiv;
+  qglPixelMapusv               =3D glPixelMapusv;
+  qglPixelStoref               =3D glPixelStoref;
+  qglPixelStorei               =3D glPixelStorei;
+  qglPixelTransferf            =3D glPixelTransferf;
+  qglPixelTransferi            =3D glPixelTransferi;
+  qglPixelZoom                 =3D glPixelZoom;
+  qglPointSize                 =3D glPointSize;
+  qglPolygonMode               =3D glPolygonMode;
+  qglPolygonOffset             =3D glPolygonOffset;
+  qglPolygonStipple            =3D glPolygonStipple;
+  qglPopAttrib                 =3D glPopAttrib;
+  qglPopClientAttrib           =3D glPopClientAttrib;
+  qglPopMatrix                 =3D glPopMatrix;
+  qglPopName                   =3D glPopName;
+  qglPrioritizeTextures        =3D glPrioritizeTextures;
+  qglPushAttrib                =3D glPushAttrib;
+  qglPushClientAttrib          =3D glPushClientAttrib;
+  qglPushMatrix                =3D glPushMatrix;
+  qglPushName                  =3D glPushName;
+  qglRasterPos2d               =3D glRasterPos2d;
+  qglRasterPos2dv              =3D glRasterPos2dv;
+  qglRasterPos2f               =3D glRasterPos2f;
+  qglRasterPos2fv              =3D glRasterPos2fv;
+  qglRasterPos2i               =3D glRasterPos2i;
+  qglRasterPos2iv              =3D glRasterPos2iv;
+  qglRasterPos2s               =3D glRasterPos2s;
+  qglRasterPos2sv              =3D glRasterPos2sv;
+  qglRasterPos3d               =3D glRasterPos3d;
+  qglRasterPos3dv              =3D glRasterPos3dv;
+  qglRasterPos3f               =3D glRasterPos3f;
+  qglRasterPos3fv              =3D glRasterPos3fv;
+  qglRasterPos3i               =3D glRasterPos3i;
+  qglRasterPos3iv              =3D glRasterPos3iv;
+  qglRasterPos3s               =3D glRasterPos3s;
+  qglRasterPos3sv              =3D glRasterPos3sv;
+  qglRasterPos4d               =3D glRasterPos4d;
+  qglRasterPos4dv              =3D glRasterPos4dv;
+  qglRasterPos4f               =3D glRasterPos4f;
+  qglRasterPos4fv              =3D glRasterPos4fv;
+  qglRasterPos4i               =3D glRasterPos4i;
+  qglRasterPos4iv              =3D glRasterPos4iv;
+  qglRasterPos4s               =3D glRasterPos4s;
+  qglRasterPos4sv              =3D glRasterPos4sv;
+  qglReadBuffer                =3D glReadBuffer;
+  qglReadPixels                =3D glReadPixels;
+  qglRectd                     =3D glRectd;
+  qglRectdv                    =3D glRectdv;
+  qglRectf                     =3D glRectf;
+  qglRectfv                    =3D glRectfv;
+  qglRecti                     =3D glRecti;
+  qglRectiv                    =3D glRectiv;
+  qglRects                     =3D glRects;
+  qglRectsv                    =3D glRectsv;
+  qglRenderMode                =3D glRenderMode;
+  qglRotated                   =3D glRotated;
+  qglRotatef                   =3D glRotatef;
+  qglScaled                    =3D glScaled;
+  qglScalef                    =3D glScalef;
+  qglScissor                   =3D glScissor;
+  qglSelectBuffer              =3D glSelectBuffer;
+  qglShadeModel                =3D glShadeModel;
+  qglStencilFunc               =3D glStencilFunc;
+  qglStencilMask               =3D glStencilMask;
+  qglStencilOp                 =3D glStencilOp;
+  qglTexCoord1d                =3D glTexCoord1d;
+  qglTexCoord1dv               =3D glTexCoord1dv;
+  qglTexCoord1f                =3D glTexCoord1f;
+  qglTexCoord1fv               =3D glTexCoord1fv;
+  qglTexCoord1i                =3D glTexCoord1i;
+  qglTexCoord1iv               =3D glTexCoord1iv;
+  qglTexCoord1s                =3D glTexCoord1s;
+  qglTexCoord1sv               =3D glTexCoord1sv;
+  qglTexCoord2d                =3D glTexCoord2d;
+  qglTexCoord2dv               =3D glTexCoord2dv;
+  qglTexCoord2f                =3D glTexCoord2f;
+  qglTexCoord2fv               =3D glTexCoord2fv;
+  qglTexCoord2i                =3D glTexCoord2i;
+  qglTexCoord2iv               =3D glTexCoord2iv;
+  qglTexCoord2s                =3D glTexCoord2s;
+  qglTexCoord2sv               =3D glTexCoord2sv;
+  qglTexCoord3d                =3D glTexCoord3d;
+  qglTexCoord3dv               =3D glTexCoord3dv;
+  qglTexCoord3f                =3D glTexCoord3f;
+  qglTexCoord3fv               =3D glTexCoord3fv;
+  qglTexCoord3i                =3D glTexCoord3i;
+  qglTexCoord3iv               =3D glTexCoord3iv;
+  qglTexCoord3s                =3D glTexCoord3s;
+  qglTexCoord3sv               =3D glTexCoord3sv;
+  qglTexCoord4d                =3D glTexCoord4d;
+  qglTexCoord4dv               =3D glTexCoord4dv;
+  qglTexCoord4f                =3D glTexCoord4f;
+  qglTexCoord4fv               =3D glTexCoord4fv;
+  qglTexCoord4i                =3D glTexCoord4i;
+  qglTexCoord4iv               =3D glTexCoord4iv;
+  qglTexCoord4s                =3D glTexCoord4s;
+  qglTexCoord4sv               =3D glTexCoord4sv;
+  qglTexCoordPointer           =3D glTexCoordPointer;
+  qglTexEnvf                   =3D glTexEnvf;
+  qglTexEnvfv                  =3D glTexEnvfv;
+  qglTexEnvi                   =3D glTexEnvi;
+  qglTexEnviv                  =3D glTexEnviv;
+  qglTexGend                   =3D glTexGend;
+  qglTexGendv                  =3D glTexGendv;
+  qglTexGenf                   =3D glTexGenf;
+  qglTexGenfv                  =3D glTexGenfv;
+  qglTexGeni                   =3D glTexGeni;
+  qglTexGeniv                  =3D glTexGeniv;
+  qglTexImage1D                =3D glTexImage1D;
+  qglTexImage2D                =3D glTexImage2D;
+  qglTexParameterf             =3D glTexParameterf;
+  qglTexParameterfv            =3D glTexParameterfv;
+  qglTexParameteri             =3D glTexParameteri;
+  qglTexParameteriv            =3D glTexParameteriv;
+  qglTexSubImage1D             =3D glTexSubImage1D;
+  qglTexSubImage2D             =3D glTexSubImage2D;
+  qglTranslated                =3D glTranslated;
+  qglTranslatef                =3D glTranslatef;
+  qglVertex2d                  =3D glVertex2d;
+  qglVertex2dv                 =3D glVertex2dv;
+  qglVertex2f                  =3D glVertex2f;
+  qglVertex2fv                 =3D glVertex2fv;
+  qglVertex2i                  =3D glVertex2i;
+  qglVertex2iv                 =3D glVertex2iv;
+  qglVertex2s                  =3D glVertex2s;
+  qglVertex2sv                 =3D glVertex2sv;
+  qglVertex3d                  =3D glVertex3d;
+  qglVertex3dv                 =3D glVertex3dv;
+  qglVertex3f                  =3D glVertex3f;
+  qglVertex3fv                 =3D glVertex3fv;
+  qglVertex3i                  =3D glVertex3i;
+  qglVertex3iv                 =3D glVertex3iv;
+  qglVertex3s                  =3D glVertex3s;
+  qglVertex3sv                 =3D glVertex3sv;
+  qglVertex4d                  =3D glVertex4d;
+  qglVertex4dv                 =3D glVertex4dv;
+  qglVertex4f                  =3D glVertex4f;
+  qglVertex4fv                 =3D glVertex4fv;
+  qglVertex4i                  =3D glVertex4i;
+  qglVertex4iv                 =3D glVertex4iv;
+  qglVertex4s                  =3D glVertex4s;
+  qglVertex4sv                 =3D glVertex4sv;
+  qglVertexPointer             =3D glVertexPointer;
+  qglViewport                  =3D glViewport;
+#endif
   // must be init with an active context
   qglActiveTextureARB =3D NULL;
   qglClientActiveTextureARB =3D NULL;
@@ -1660,7 +2018,7 @@
     qglMTexCoord2fSGIS =3D 0;
 #endif
=20
-#ifdef __linux__
+#if defined (__linux__)
   qglXChooseVisual             =3D safe_dlsym (g_hGLDLL, "glXChooseVisual"=
);
   qglXCreateContext            =3D safe_dlsym (g_hGLDLL, "glXCreateContext=
");
   qglXDestroyContext           =3D safe_dlsym (g_hGLDLL, "glXDestroyContex=
t");
@@ -1678,7 +2036,27 @@
   qglXWaitGL                   =3D safe_dlsym (g_hGLDLL, "glXWaitGL");
   qglXWaitX                    =3D safe_dlsym (g_hGLDLL, "glXWaitX");
   qglXUseXFont                 =3D safe_dlsym (g_hGLDLL, "glXUseXFont");
-  qglXGetProcAddressARB        =3D dlsym (g_hGLDLL, "glXGetProcAddressARB"=
); // Utah-GLX fix
+//  qglXGetProcAddressARB        =3D dlsym (g_hGLDLL, "glXGetProcAddressAR=
B"); // Utah-GLX fix
+#endif
+#if defined (__APPLE__)
+  qglXChooseVisual             =3D glXChooseVisual;
+  qglXCreateContext            =3D glXCreateContext;
+  qglXDestroyContext           =3D glXDestroyContext;
+  qglXMakeCurrent              =3D glXMakeCurrent;
+  qglXCopyContext              =3D glXCopyContext;
+  qglXSwapBuffers              =3D glXSwapBuffers;
+  qglXCreateGLXPixmap          =3D glXCreateGLXPixmap;
+  qglXDestroyGLXPixmap         =3D glXDestroyGLXPixmap;
+  qglXQueryExtension           =3D glXQueryExtension;
+  qglXQueryVersion             =3D glXQueryVersion;
+  qglXIsDirect                 =3D glXIsDirect;
+  qglXGetConfig                =3D glXGetConfig;
+  qglXGetCurrentContext        =3D glXGetCurrentContext;
+  qglXGetCurrentDrawable       =3D glXGetCurrentDrawable;
+  qglXWaitGL                   =3D glXWaitGL;
+  qglXWaitX                    =3D glXWaitX;
+  qglXUseXFont                 =3D glXUseXFont;
+//  qglXGetProcAddressARB        =3D glXGetProcAddressARB; // Utah-GLX fix
 #endif
=20
   qglPointParameterfEXT =3D 0;
@@ -1687,9 +2065,8 @@
   qglSelectTextureSGIS =3D 0;
   qglMTexCoord2fSGIS =3D 0;
=20
-  Sys_Printf ("Done.\n");
-
   // texture compression=20
+  Sys_Printf ("Done.\n");
=20
   if (init_error =3D=3D 1)
     return 0;
@@ -1709,8 +2086,10 @@
     return 0;
=20
   extensions =3D qglGetString (GL_EXTENSIONS);
+#ifndef __APPLE__
   if (!extensions)
     return 0;
+#endif
=20
   // It takes a bit of care to be fool-proof about parsing the
   // OpenGL extensions string. Don't be fooled by sub-strings, etc.
@@ -1733,7 +2112,7 @@
=20
 void* Sys_GLGetExtension (const char *symbol)
 {
-#ifdef __linux__
+#if defined (__linux__) || defined (__APPLE__)
   if (qglXGetProcAddressARB =3D=3D NULL)
     return NULL;
   else
Index: radiant/qgl.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/GtkRadiant/radiant/qgl.h,v
retrieving revision 1.10.22.2
diff -u -r1.10.22.2 qgl.h
--- radiant/qgl.h	20 Sep 2002 23:24:33 -0000	1.10.22.2
+++ radiant/qgl.h	12 Nov 2002 01:48:58 -0000
@@ -35,6 +35,10 @@
 #include <GL/glx.h>
 #endif
=20
+#if defined (__APPLE__)
+#include <GL/glu.h>
+#endif
+
 #ifndef GL_ARB_multitexture
 #define GL_TEXTURE0_ARB                   0x84C0
 #define GL_TEXTURE1_ARB                   0x84C1
@@ -542,7 +546,10 @@
=20
=20
 // glu stuff.. radiant only uses a couple
+#if 0 // ETG-FIXME: Doesn't appear to be used anywhere.
 extern int (APIENTRY* qgluBuild2DMipmaps) (GLenum target, GLint components=
, GLint width, GLint height, GLenum format, GLenum type, const void  *data)=
;
+#endif
+
 extern void (APIENTRY* qgluPerspective) (GLdouble fovy, GLdouble aspect, G=
Ldouble zNear, GLdouble zFar);
 extern void (APIENTRY* qgluLookAt)(
   GLdouble eyex,
Index: radiant/watchbsp.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/GtkRadiant/radiant/watchbsp.cpp,v
retrieving revision 1.21.2.7
diff -u -r1.21.2.7 watchbsp.cpp
--- radiant/watchbsp.cpp	6 Jul 2002 23:22:44 -0000	1.21.2.7
+++ radiant/watchbsp.cpp	12 Nov 2002 01:48:59 -0000
@@ -517,7 +517,7 @@
                 // MP
 #if defined(WIN32)
                 cmd +=3D "WolfMP.exe";
-#elif defined(__linux__)
+#elif defined(__linux__) || defined (__APPLE__)
                 cmd +=3D "wolfmp";
 #else
 #error "WTF are you compiling on"
@@ -528,7 +528,7 @@
                 // SP
 #if defined(WIN32)
                 cmd +=3D "WolfSP.exe";
-#elif defined(__linux__)
+#elif defined(__linux__) || defined(__APPLE__)
                 cmd +=3D "wolfsp";
 #else
 #error "WTF are you compiling on"
@@ -544,7 +544,7 @@
                 // MP
 #if defined(WIN32)
                 cmd +=3D "jk2MP.exe";
-#elif defined(__linux__)
+#elif defined(__linux__) || defined(__APPLE__)
                 cmd +=3D "jk2mp";
 #else
 #error "WTF are you compiling on"
@@ -555,7 +555,7 @@
                 // SP
 #if defined(WIN32)
                 cmd +=3D "jk2SP.exe";
-#elif defined(__linux__)
+#elif defined(__linux__) || defined(__APPLE__)
                 cmd +=3D "jk2sp";
 #else
 #error "WTF are you compiling on"
@@ -571,7 +571,7 @@
                 // MP
 #if defined(WIN32)
                 cmd +=3D "stvoyHM.exe";
-#elif defined(__linux__)
+#elif defined(__linux__) || defined(__APPLE__)
                 cmd +=3D "stvoyHM";
 #else
 #error "WTF are you compiling on"
@@ -582,7 +582,7 @@
                 // SP
 #if defined(WIN32)
                 cmd +=3D "stvoy.exe";
-#elif defined(__linux__)
+#elif defined(__linux__) || defined(__APPLE__)
                 cmd +=3D "stvoy";
 #else
 #error "WTF are you compiling on"
@@ -598,7 +598,7 @@
                 // MP
 #if defined(WIN32)
                 cmd +=3D "sof2MP.exe";
-#elif defined(__linux__)
+#elif defined(__linux__) || defined(__APPLE__)
                 cmd +=3D "b00gus";
 #else
 #error "WTF are you compiling on"
@@ -609,7 +609,7 @@
                 // SP
 #if defined(WIN32)
                 cmd +=3D "sof2.exe";
-#elif defined(__linux__)
+#elif defined(__linux__) || defined (__APPLE__)
                 cmd +=3D "b00gus";
 #else
 #error "WTF are you compiling on"

--=-9c10Sx5gCAz7uOS69Y13--