mirror of
https://github.com/glest/glest-source.git
synced 2025-08-13 20:03:58 +02:00
Added support for OpenAL in win32
This commit is contained in:
Binary file not shown.
@@ -133,7 +133,7 @@
|
|||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
FavorSizeOrSpeed="1"
|
FavorSizeOrSpeed="1"
|
||||||
OmitFramePointers="true"
|
OmitFramePointers="true"
|
||||||
AdditionalIncludeDirectories="../../../deps/include/lua;../../../deps/include;../../source/shared_lib/include/graphics;../../source/shared_lib/include/graphics/gl;../../source/shared_lib/include/platform;../../source/shared_lib/include/platform/win32;../../source/shared_lib/include/sound;../../source/shared_lib/include/sound/ds8;../../source/shared_lib/include/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/shared_lib/include/tinyxml;../../source/glest_game/ai;../../source/glest_game/facilities;../../source/glest_game/game;../../source/glest_game/global;../../source/glest_game/graphics;../../source/glest_game/gui;../../source/glest_game/main;../../source/glest_game/menu;../../source/glest_game/network;../../source/glest_game/sound;../../source/glest_game/type_instances;../../source/glest_game/types;../../source/glest_game/world;../../source/win32_deps/include;"../../source/win32_deps/xerces-c-3.0.1/src";"../../source/win32_deps/SDL-1.2.14/include";../../source/shared_lib/include/platform/sdl"
|
AdditionalIncludeDirectories="../../../deps/include/lua;../../../deps/include;../../source/shared_lib/include/graphics;../../source/shared_lib/include/graphics/gl;../../source/shared_lib/include/platform;../../source/shared_lib/include/platform/win32;../../source/shared_lib/include/sound;../../source/shared_lib/include/sound/ds8;../../source/shared_lib/include/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/shared_lib/include/tinyxml;../../source/glest_game/ai;../../source/glest_game/facilities;../../source/glest_game/game;../../source/glest_game/global;../../source/glest_game/graphics;../../source/glest_game/gui;../../source/glest_game/main;../../source/glest_game/menu;../../source/glest_game/network;../../source/glest_game/sound;../../source/glest_game/type_instances;../../source/glest_game/types;../../source/glest_game/world;../../source/win32_deps/include;"../../source/win32_deps/xerces-c-3.0.1/src";"../../source/win32_deps/SDL-1.2.14/include";../../source/shared_lib/include/platform/sdl;../../source/shared_lib/include/sound/openal;"../../source/win32_deps/openal-soft-1.12.854/include""
|
||||||
AdditionalUsingDirectories=""
|
AdditionalUsingDirectories=""
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;XML_LIBRARY;USE_PCH=1;_CRT_SECURE_NO_WARNINGS"
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;XML_LIBRARY;USE_PCH=1;_CRT_SECURE_NO_WARNINGS"
|
||||||
StringPooling="true"
|
StringPooling="true"
|
||||||
@@ -155,7 +155,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="dsound.lib dxguid.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib opengl32.lib glu32.lib wsock32.lib libglest.lib mmc.lib lua5.1.lib xerces-c_3.lib Dbghelp.lib libpng.lib jpeg.lib zlib.lib sdl.lib sdlmain.lib winmm.lib"
|
AdditionalDependencies="dsound.lib dxguid.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib opengl32.lib glu32.lib wsock32.lib libglest.lib mmc.lib lua5.1.lib xerces-c_3.lib Dbghelp.lib libpng.lib jpeg.lib zlib.lib sdl.lib sdlmain.lib winmm.lib openal32.lib"
|
||||||
AdditionalLibraryDirectories="../../source/win32_deps/lib;"../../build/$(ConfigurationName)/libglest""
|
AdditionalLibraryDirectories="../../source/win32_deps/lib;"../../build/$(ConfigurationName)/libglest""
|
||||||
IgnoreDefaultLibraryNames=""
|
IgnoreDefaultLibraryNames=""
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
|
@@ -113,7 +113,7 @@
|
|||||||
InlineFunctionExpansion="2"
|
InlineFunctionExpansion="2"
|
||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
FavorSizeOrSpeed="1"
|
FavorSizeOrSpeed="1"
|
||||||
AdditionalIncludeDirectories="../../../deps/include/lua;../../../deps/include;../../source/shared_lib/include;../../source/shared_lib/include/graphics;../../source/shared_lib/include/graphics/gl;../../source/shared_lib/include/platform;../../source/shared_lib/include/platform/win32;../../source/shared_lib/include/sound;../../source/shared_lib/include/sound/ds8;../../source/shared_lib/include/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/win32_deps/include;"../../source/win32_deps/xerces-c-3.0.1/src";"../../source/win32_deps/xerces-c-3.0.1/src/xercesc/xinclude";../../source/win32_deps/libpng141;"../../source/win32_deps/jpeg-8a";"../../source/win32_deps/SDL-1.2.14/include";../../source/shared_lib/include/platform/sdl"
|
AdditionalIncludeDirectories="../../../deps/include/lua;../../../deps/include;../../source/shared_lib/include;../../source/shared_lib/include/graphics;../../source/shared_lib/include/graphics/gl;../../source/shared_lib/include/platform;../../source/shared_lib/include/platform/win32;../../source/shared_lib/include/sound;../../source/shared_lib/include/sound/ds8;../../source/shared_lib/include/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/win32_deps/include;"../../source/win32_deps/xerces-c-3.0.1/src";"../../source/win32_deps/xerces-c-3.0.1/src/xercesc/xinclude";../../source/win32_deps/libpng141;"../../source/win32_deps/jpeg-8a";"../../source/win32_deps/SDL-1.2.14/include";../../source/shared_lib/include/platform/sdl;"../../source/win32_deps/openal-soft-1.12.854/include";../../source/shared_lib/include/sound/openal"
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;USE_PCH=1"
|
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;USE_PCH=1"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
EnableFunctionLevelLinking="true"
|
EnableFunctionLevelLinking="true"
|
||||||
@@ -359,6 +359,10 @@
|
|||||||
RelativePath="..\..\source\shared_lib\sources\sound\sound_player.cpp"
|
RelativePath="..\..\source\shared_lib\sources\sound\sound_player.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\source\shared_lib\sources\sound\openal\sound_player_openal.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<Filter
|
<Filter
|
||||||
Name="ds8"
|
Name="ds8"
|
||||||
>
|
>
|
||||||
@@ -668,10 +672,6 @@
|
|||||||
<Filter
|
<Filter
|
||||||
Name="win32"
|
Name="win32"
|
||||||
>
|
>
|
||||||
<File
|
|
||||||
RelativePath="..\..\source\shared_lib\include\platform\win32\factory_repository.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\source\shared_lib\include\platform\win32\platform_definitions.h"
|
RelativePath="..\..\source\shared_lib\include\platform\win32\platform_definitions.h"
|
||||||
>
|
>
|
||||||
|
@@ -24,12 +24,10 @@
|
|||||||
#include "graphics_factory_gl2.h"
|
#include "graphics_factory_gl2.h"
|
||||||
#include "sound_factory_ds8.h"
|
#include "sound_factory_ds8.h"
|
||||||
|
|
||||||
#else
|
#endif
|
||||||
|
|
||||||
#include "sound_factory_openal.h"
|
#include "sound_factory_openal.h"
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
||||||
using Shared::Graphics::GraphicsFactory;
|
using Shared::Graphics::GraphicsFactory;
|
||||||
@@ -41,12 +39,10 @@ using Shared::Graphics::Gl::GraphicsFactoryGl;
|
|||||||
using Shared::Graphics::Gl::GraphicsFactoryGl2;
|
using Shared::Graphics::Gl::GraphicsFactoryGl2;
|
||||||
using Shared::Sound::Ds8::SoundFactoryDs8;
|
using Shared::Sound::Ds8::SoundFactoryDs8;
|
||||||
|
|
||||||
#else
|
#endif
|
||||||
|
|
||||||
using Shared::Sound::OpenAL::SoundFactoryOpenAL;
|
using Shared::Sound::OpenAL::SoundFactoryOpenAL;
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace Shared{ namespace Platform{
|
namespace Shared{ namespace Platform{
|
||||||
|
|
||||||
// =====================================================
|
// =====================================================
|
||||||
@@ -67,12 +63,10 @@ private:
|
|||||||
GraphicsFactoryGl2 graphicsFactoryGl2;
|
GraphicsFactoryGl2 graphicsFactoryGl2;
|
||||||
SoundFactoryDs8 soundFactoryDs8;
|
SoundFactoryDs8 soundFactoryDs8;
|
||||||
|
|
||||||
#else
|
#endif
|
||||||
|
|
||||||
SoundFactoryOpenAL soundFactoryOpenAL;
|
SoundFactoryOpenAL soundFactoryOpenAL;
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static FactoryRepository &getInstance();
|
static FactoryRepository &getInstance();
|
||||||
|
|
||||||
|
@@ -0,0 +1,49 @@
|
|||||||
|
// ==============================================================
|
||||||
|
// This file is part of Glest Shared Library (www.glest.org)
|
||||||
|
//
|
||||||
|
// Copyright (C) 2001-2008 Marti<74>o Figueroa
|
||||||
|
//
|
||||||
|
// You can redistribute this code and/or modify it under
|
||||||
|
// the terms of the GNU General Public License as published
|
||||||
|
// by the Free Software Foundation; either version 2 of the
|
||||||
|
// License, or (at your option) any later version
|
||||||
|
// ==============================================================
|
||||||
|
|
||||||
|
#include "factory_repository.h"
|
||||||
|
|
||||||
|
#include "leak_dumper.h"
|
||||||
|
|
||||||
|
namespace Shared{ namespace Platform{
|
||||||
|
|
||||||
|
// =====================================================
|
||||||
|
// class FactoryRepository
|
||||||
|
// =====================================================
|
||||||
|
|
||||||
|
FactoryRepository &FactoryRepository::getInstance(){
|
||||||
|
static FactoryRepository factoryRepository;
|
||||||
|
return factoryRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
GraphicsFactory *FactoryRepository::getGraphicsFactory(const string &name){
|
||||||
|
if(name == "OpenGL"){
|
||||||
|
return &graphicsFactoryGl;
|
||||||
|
}
|
||||||
|
else if(name == "OpenGL2"){
|
||||||
|
return &graphicsFactoryGl2;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw runtime_error("Unknown graphics factory: " + name);
|
||||||
|
}
|
||||||
|
|
||||||
|
SoundFactory *FactoryRepository::getSoundFactory(const string &name){
|
||||||
|
if(name == "DirectSound8"){
|
||||||
|
return &soundFactoryDs8;
|
||||||
|
}
|
||||||
|
if(name == "OpenAL") {
|
||||||
|
return &soundFactoryOpenAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw runtime_error("Unknown sound factory: " + name);
|
||||||
|
}
|
||||||
|
|
||||||
|
}}//end namespace
|
Reference in New Issue
Block a user