Fix OpenGL in Windows.
This commit is contained in:
Glenn Maynard
2003-07-23 20:51:46 +00:00
parent 541b21145e
commit 50402806d0
6 changed files with 48 additions and 14 deletions
+7 -1
View File
@@ -26,7 +26,9 @@
LoadingWindow *MakeLoadingWindow() { return new ARCH_LOADING_WINDOW; }
ErrorDialog *MakeErrorDialog() { return new ARCH_ERROR_DIALOG; }
ArchHooks *MakeArchHooks() { return new ARCH_HOOKS; }
#if defined(SUPPORT_OPENGL)
LowLevelWindow *MakeLowLevelWindow() { return new ARCH_LOW_LEVEL_WINDOW; }
#endif
void MakeInputHandlers(vector<InputHandler *> &Add)
{
@@ -34,7 +36,11 @@ void MakeInputHandlers(vector<InputHandler *> &Add)
Add.push_back(new InputHandler_DInput);
Add.push_back(new InputHandler_Win32_Pump);
// Add.push_back(new InputHandler_Win32_Para);
#else
#else if defined(_XBOX)
// Add.push_back(new InputHandler_DInput);
#endif
#if defined(SUPPORT_SDL_INPUT)
Add.push_back(new InputHandler_SDL);
#endif
}
+3
View File
@@ -14,6 +14,9 @@
#include "Sound/RageSoundDriver_DSound_Software.h"
#include "Sound/RageSoundDriver_WaveOut.h"
#define SUPPORT_D3D
#undef SUPPORT_SDL_INPUT
#endif
/*
-2
View File
@@ -13,8 +13,6 @@
#include "Sound/RageSoundDriver_QT1.h"
#include "Sound/RageSoundDriver_QT.h"
#include "LoadingWindow/LoadingWindow_Cocoa.h"
#include "InputHandler/InputHandler_SDL.h"
#include "LowLevelWindow/LowLevelWindow_SDL.h"
#include "ErrorDialog/ErrorDialog_darwin.h"
#include "ArchHooks/ArchHooks_darwin.h"
+27 -4
View File
@@ -5,17 +5,40 @@
* here. */
/* None of these SDL implementations run on Xbox, so I've commented
* out use of this header and added the #includes to each arch_*.h */
/*
* The basic design principle of arch is that a new platform can be up and running
* quickly using only arch_default, with OpenGL graphics and SDL input, and things can
* be overloaded later. That way, people don't have to learn how arch works
* until after they have the basic stuff running.
*
* For Xbox, let's leave this file alone, and special case stuff in arch_xbox.h.
*
* For LowLevelWindow, just undefine SUPPORT_OPENGL and don't link any LLW at
* all. (We'll still include the header here, but it'll never be used.) We
* can remove LowLevelWindow_Null, but I'll wait for you to confirm that there
* aren't any strange problems with this before doing that.
/* Load default fallback drivers; some of these may be overridden by arch-specific drivers. */
* For InputHandler, undef SUPPORT_SDL_INPUT and we won't create the SDL input
* handler.
*/
/* We can have any number of input drivers. By default, use SDL for keyboards
* and joysticks. If you write your own handler for these devices types, or if
* SDL input doesn't work on your platform, undef SUPPORT_SDL_INPUT in your platform
* header. */
#define SUPPORT_SDL_INPUT
#include "InputHandler/InputHandler_SDL.h"
/* Load default fallback drivers; some of these may be overridden by arch-specific
* drivers. These are all singleton drivers--we never use more than one. */
#include "LoadingWindow/LoadingWindow_SDL.h"
/* XXX: null, none, Null--pick one */
#include "ErrorDialog/ErrorDialog_null.h"
#include "ArchHooks/ArchHooks_none.h"
#include "Sound/RageSoundDriver_Null.h"
#include "LowLevelWindow/LowLevelWindow_Null.h"
#include "LowLevelWindow/LowLevelWindow_SDL.h"
// not supported on Xbox
//#include "InputHandler/InputHandler_SDL.h"
#define SUPPORT_OPENGL
#endif
+4 -6
View File
@@ -1,19 +1,17 @@
#ifndef LINUX_ARCH_H
#define LINUX_ARCH_H
#include "global.h"
#ifdef HAVE_ALSA
# include "Sound/RageSoundDriver_ALSA9.h"
#include "Sound/RageSoundDriver_ALSA9.h"
#endif
#ifdef HAVE_OSS
#include "Sound/RageSoundDriver_OSS.h"
#endif
#ifdef HAVE_GTK
# include "LoadingWindow/LoadingWindow_Gtk.h"
#include "LoadingWindow/LoadingWindow_Gtk.h"
#endif
#include "InputHandler/InputHandler_SDL.h"
#include "LowLevelWindow/LowLevelWindow_SDL.h"
#endif
/*
+7 -1
View File
@@ -2,14 +2,20 @@
#define XBOX_ARCH_H
/* Load drivers for Xbox. */
#include "LoadingWindow/LoadingWindow_Null.h"
#include "ErrorDialog/ErrorDialog_null.h"
#include "ArchHooks/ArchHooks_none.h"
/* Err, is SDL input working on Xbox? arch_default comments indicated no.
* (Best to use a custom driver for threaded input, anyway.) */
#include "InputHandler/InputHandler_SDL.h"
#include "Sound/RageSoundDriver_DSound.h"
#define SUPPORT_D3D
#undef SUPPORT_OPENGL
/* Undef this if you need no SDL input. */
// #undef SUPPORT_SDL_INPUT
#endif
/*