diff options
-rw-r--r-- | SConstruct | 74 | ||||
-rw-r--r-- | intern/SoundSystem/openal/SND_OpenALDevice.cpp | 10 | ||||
-rw-r--r-- | source/Makefile | 5 | ||||
-rw-r--r-- | source/nan_definitions.mk | 8 | ||||
-rw-r--r-- | source/nan_link.mk | 4 | ||||
-rw-r--r-- | tools/scons/bs/bs_libs.py | 3 |
6 files changed, 93 insertions, 11 deletions
diff --git a/SConstruct b/SConstruct index 732f3d393ec..15ae0241ce6 100644 --- a/SConstruct +++ b/SConstruct @@ -67,6 +67,7 @@ if sys.platform == 'linux2' or sys.platform == 'linux-i386': use_openal = 'false' use_fmod = 'false' use_quicktime = 'false' + use_openexr = 'true' use_sumo = 'true' use_ode = 'false' use_bullet = 'true' @@ -74,7 +75,7 @@ if sys.platform == 'linux2' or sys.platform == 'linux-i386': use_fluidsim = 'true' build_blender_dynamic = 'true' build_blender_static = 'false' - build_blender_player = 'true' + build_blender_player = 'false' build_blender_plugin = 'false' release_flags = ['-O2'] debug_flags = ['-O2', '-g'] @@ -95,6 +96,12 @@ if sys.platform == 'linux2' or sys.platform == 'linux-i386': png_lib = ['png'] png_libpath = ['/usr/lib'] png_include = ['/usr/include'] + # OpenEXR library information + if use_openexr == 'true': + defines += ['WITH_OPENEXR'] + openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath'] + openexr_libpath = ['/usr/lib'] + openexr_include = ['/usr/include/OpenEXR'] # jpeg library information jpeg_lib = ['jpeg'] jpeg_libpath = ['/usr/lib'] @@ -152,11 +159,12 @@ if sys.platform == 'linux2' or sys.platform == 'linux-i386': elif sys.platform == 'darwin': use_international = 'true' - use_gameengine = 'true' + use_gameengine = 'false' use_openal = 'true' use_fmod = 'false' use_openal = 'false' use_quicktime = 'true' + use_openexr = 'false' use_precomp = 'true' use_sumo = 'true' use_ode = 'false' @@ -165,7 +173,7 @@ elif sys.platform == 'darwin': use_fluidsim = 'true' build_blender_dynamic = 'true' build_blender_static = 'false' - build_blender_player = 'true' + build_blender_player = 'false' build_blender_plugin = 'false' # TODO: replace darwin-6.1-powerpc with the actual directiory on the # build machine @@ -198,6 +206,12 @@ elif sys.platform == 'darwin': png_lib = ['libpng'] png_libpath = [darwin_precomp + 'png/lib'] png_include = [darwin_precomp + 'png/include'] + # OpenEXR library information + if use_openexr == 'true': + defines += ['WITH_OPENEXR'] + openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath'] + openexr_libpath = ['/usr/lib'] + openexr_include = ['/usr/include/OpenEXR'] # jpeg library information jpeg_lib = ['libjpeg'] jpeg_libpath = [darwin_precomp + 'jpeg/lib'] @@ -279,6 +293,7 @@ elif sys.platform == 'cygwin': use_openal = 'false' use_fmod = 'false' use_quicktime = 'false' + use_openexr = 'true' use_sumo = 'false' use_ode = 'false' use_bullet = 'false' @@ -309,6 +324,12 @@ elif sys.platform == 'cygwin': png_lib = ['png'] png_libpath = ['#../lib/windows/png/lib'] png_include = ['#../lib/windows/png/include'] + # OpenEXR library information + if use_openexr == 'true': + defines += ['WITH_OPENEXR'] + openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath'] + openexr_libpath = ['/usr/lib'] + openexr_include = ['/usr/include/OpenEXR'] # jpeg library information jpeg_lib = ['jpeg'] jpeg_libpath = ['#../lib/windows/jpeg/lib'] @@ -365,6 +386,7 @@ elif sys.platform == 'win32': use_openal = 'true' use_fmod = 'false' use_quicktime = 'true' + use_openexr = 'false' use_bullet = 'true' use_sumo = 'true' use_ode = 'false' @@ -387,7 +409,7 @@ elif sys.platform == 'win32': platform_libs = [ 'qtmlClient', 'soundsystem', 'ws2_32', 'dxguid', 'vfw32', 'winmm', 'iconv', 'kernel32', 'user32', 'gdi32', - 'winspool', 'comdlg32', 'advapi32', 'shell32', + 'comdlg32', 'advapi32', 'shell32', 'ole32', 'oleaut32', 'uuid', 'libcmt', 'libc'] platform_libpath = ['#../lib/windows/iconv/lib', @@ -417,6 +439,12 @@ elif sys.platform == 'win32': png_lib = ['libpng_st'] png_libpath = ['#../lib/windows/png/lib'] png_include = ['#../lib/windows/png/include'] + # OpenEXR library information + if use_openexr == 'true': + defines += ['WITH_OPENEXR'] + openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath'] + openexr_libpath = ['/usr/lib'] + openexr_include = ['/usr/include/OpenEXR'] # jpeg library information jpeg_lib = ['libjpeg'] jpeg_libpath = ['#../lib/windows/jpeg/lib'] @@ -477,6 +505,7 @@ elif string.find (sys.platform, 'sunos') != -1: use_openal = 'false' use_fmod = 'false' use_quicktime = 'false' + use_openexr = 'false' use_sumo = 'false' use_ode = 'false' use_bullet = 'false' @@ -505,6 +534,12 @@ elif string.find (sys.platform, 'sunos') != -1: png_lib = ['png'] png_libpath = [] png_include = [] + # OpenEXR library information + if use_openexr == 'true': + defines += ['WITH_OPENEXR'] + openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath'] + openexr_libpath = ['/usr/lib'] + openexr_include = ['/usr/include/OpenEXR'] # jpeg library information jpeg_lib = ['jpeg'] jpeg_libpath = [] @@ -561,6 +596,7 @@ elif string.find (sys.platform, 'irix') != -1: use_openal = 'false' use_fmod = 'false' use_quicktime = 'false' + use_openexr = 'false' use_sumo = 'false' use_ode = 'false' use_bullet = 'false' @@ -597,6 +633,12 @@ elif string.find (sys.platform, 'irix') != -1: png_lib = ['png'] png_libpath = [irix_precomp + '/png/lib'] png_include = [irix_precomp + '/png/include'] + # OpenEXR library information + if use_openexr == 'true': + defines += ['WITH_OPENEXR'] + openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath'] + openexr_libpath = ['/usr/lib'] + openexr_include = ['/usr/include/OpenEXR'] # jpeg library information jpeg_lib = ['jpeg'] jpeg_libpath = [irix_precomp + '/jpeg/lib'] @@ -657,6 +699,7 @@ elif sys.platform=='openbsd3': use_openal = 'false' use_fmod = 'false' use_quicktime = 'false' + use_openexr = 'false' use_sumo = 'false' use_ode = 'false' use_bullet = 'false' @@ -684,6 +727,12 @@ elif sys.platform=='openbsd3': png_lib = ['png'] png_libpath = ['/usr/local/lib'] png_include = ['/usr/local/include/libpng'] + # OpenEXR library information + if use_openexr == 'true': + defines += ['WITH_OPENEXR'] + openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath'] + openexr_libpath = ['/usr/lib'] + openexr_include = ['/usr/include/OpenEXR'] # jpeg library information jpeg_lib = ['jpeg'] jpeg_libpath = ['/usr/local/lib'] @@ -742,6 +791,7 @@ elif sys.platform=='freebsd4' or sys.platform=='freebsd5': use_openal = 'false' use_fmod = 'false' use_quicktime = 'false' + use_openexr = 'false' use_sumo = 'false' use_ode = 'false' use_bullet = 'false' @@ -769,6 +819,12 @@ elif sys.platform=='freebsd4' or sys.platform=='freebsd5': png_lib = ['png'] png_libpath = ['/usr/local/lib'] png_include = ['/usr/local/include'] + # OpenEXR library information + if use_openexr == 'true': + defines += ['WITH_OPENEXR'] + openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath'] + openexr_libpath = ['/usr/lib'] + openexr_include = ['/usr/include/OpenEXR'] # jpeg library information jpeg_lib = ['jpeg'] jpeg_libpath = ['/usr/local/lib'] @@ -870,6 +926,7 @@ else: config.write ("USE_OPENAL = %r\n"%(use_openal)) config.write ("USE_FMOD = %r\n"%(use_fmod)) config.write ("USE_QUICKTIME = %r\n"%(use_quicktime)) + config.write ("USE_OPENEXR = %r\n"%(use_openexr)) config.write ("USE_FLUIDSIM = %r\n"%(use_fluidsim)) config.write ("\n# Compiler information.\n") config.write ("HOST_CC = %r\n"%(env_dict['CC'])) @@ -896,6 +953,9 @@ else: config.write ("PNG_INCLUDE = %r\n"%(png_include)) config.write ("PNG_LIBPATH = %r\n"%(png_libpath)) config.write ("PNG_LIBRARY = %r\n"%(png_lib)) + config.write ("OPENEXR_INCLUDE = %r\n"%(openexr_include)) + config.write ("OPENEXR_LIBPATH = %r\n"%(openexr_libpath)) + config.write ("OPENEXR_LIBRARY = %r\n"%(openexr_lib)) config.write ("JPEG_INCLUDE = %r\n"%(jpeg_include)) config.write ("JPEG_LIBPATH = %r\n"%(jpeg_libpath)) config.write ("JPEG_LIBRARY = %r\n"%(jpeg_lib)) @@ -982,6 +1042,9 @@ user_options.AddOptions ( (BoolOption ('USE_QUICKTIME', 'Set to 1 to add support for QuickTime.', 'false')), + (BoolOption ('USE_OPENEXR', + 'Set to 1 to add support for OpenEXR.', + 'false')), (BoolOption ('USE_FLUIDSIM', # NT test new 'Set to 0 to disable compilation of fluid simulation library El\'Beem.', 'true')), @@ -1008,6 +1071,9 @@ user_options.AddOptions ( ('PNG_INCLUDE', 'Include directory for png header files.'), ('PNG_LIBPATH', 'Library path where the png library is located.'), ('PNG_LIBRARY', 'png library name.'), + ('OPENEXR_INCLUDE', 'Include directory for OpenEXR header files.'), + ('OPENEXR_LIBPATH', 'Library path where the OpenEXR libraries are located.'), + ('OPENEXR_LIBRARY', 'OpenEXR library names.'), ('JPEG_INCLUDE', 'Include directory for jpeg header files.'), ('JPEG_LIBPATH', 'Library path where the jpeg library is located.'), ('JPEG_LIBRARY', 'jpeg library name.'), diff --git a/intern/SoundSystem/openal/SND_OpenALDevice.cpp b/intern/SoundSystem/openal/SND_OpenALDevice.cpp index 2a320568e2a..28421b9f2e4 100644 --- a/intern/SoundSystem/openal/SND_OpenALDevice.cpp +++ b/intern/SoundSystem/openal/SND_OpenALDevice.cpp @@ -231,7 +231,7 @@ SND_OpenALDevice::SND_OpenALDevice() m_context = alcCreateContext(dev, NULL); if (m_context) { - alcMakeContextCurrent(m_context); + alcMakeContextCurrent((ALCcontext*)m_context); m_audio = true; m_device = dev; #ifdef __linux__ @@ -339,7 +339,7 @@ SND_OpenALDevice::~SND_OpenALDevice() if (m_context) { MakeCurrent(); - alcDestroyContext(m_context); + alcDestroyContext((ALCcontext*)m_context); m_context = NULL; } @@ -410,7 +410,7 @@ SND_WaveSlot* SND_OpenALDevice::LoadSample(const STR_String& name, waveslot->SetFileSize(size); /* what was (our) buffer? */ - int buffer = waveslot->GetBuffer(); + buffer = waveslot->GetBuffer(); /* get some info out of the sample */ SND_GetSampleInfo((signed char*)memlocation, waveslot); @@ -419,9 +419,9 @@ SND_WaveSlot* SND_OpenALDevice::LoadSample(const STR_String& name, /* load the sample into openal */ #if defined(OUDE_OPENAL) || defined (__APPLE__) - alutLoadWAVMemory((char*)memlocation, &sampleformat, &data, &numberofsamples, &samplerate); // openal_2.12 + alutLoadWAVMemory((ALbyte *)memlocation, &sampleformat, &data, &numberofsamples, &samplerate); // openal_2.12 #else - alutLoadWAVMemory((signed char*)memlocation, &sampleformat, &data, &numberofsamples, &samplerate, &loop);// openal_2.14+ + alutLoadWAVMemory((ALbyte *)memlocation, &sampleformat, &data, &numberofsamples, &samplerate, &loop);// openal_2.14+ #endif /* put it in the buffer */ alBufferData(m_buffers[buffer], sampleformat, data, numberofsamples, samplerate); diff --git a/source/Makefile b/source/Makefile index 732d7fd97f6..7b073259c8b 100644 --- a/source/Makefile +++ b/source/Makefile @@ -110,6 +110,8 @@ ifneq ($(NAN_NO_KETSJI),true) COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a + COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a + COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a COMLIB += $(NAN_SOLID)/lib/libsolid.a COMLIB += $(NAN_SOLID)/lib/libsolid_broad.a COMLIB += $(NAN_SOLID)/lib/libsolid_complex.a @@ -157,6 +159,9 @@ endif ifeq ($(WITH_QUICKTIME), true) COMLIB += $(OCGDIR)/blender/blenderqt/$(DEBUG_DIR)libblenderqt.a endif + ifeq ($(WITH_OPENEXR), true) + COMLIB += $(OCGDIR)/blender/imbuf/openexr/$(DEBUG_DIR)libopenexr.a + endif ifeq ($(WITH_FREETYPE2), true) ifeq ($(OS), windows) ifeq ($(FREE_WINDOWS), true) diff --git a/source/nan_definitions.mk b/source/nan_definitions.mk index 71d59acc8db..db3d27bcb19 100644 --- a/source/nan_definitions.mk +++ b/source/nan_definitions.mk @@ -46,7 +46,6 @@ all debug:: # First generic defaults for all platforms which should be constant. # Note: ?= lets these defaults be overruled by environment variables, - export SRCHOME ?= $(NANBLENDERHOME)/source export CONFIG_GUESS := $(shell ${SRCHOME}/tools/guess/guessconfig) export OS := $(shell echo ${CONFIG_GUESS} | sed -e 's/-.*//') @@ -94,6 +93,11 @@ endif export NAN_FTGL ?= $(LCGDIR)/ftgl endif + export WITH_OPENEXR ?= true + export NAN_OPENEXR ?= /usr/local + export NAN_OPENEXR_INC ?= -I$(NAN_OPENEXR)/include -I$(NAN_OPENEXR)/include/OpenEXR + export NAN_OPENEXR_LIBS ?= $(NAN_OPENEXR)/lib/libIlmImf.a $(NAN_OPENEXR)/lib/libHalf.a $(NAN_OPENEXR)/lib/libIex.a + # Platform Dependent settings go below: ifeq ($(OS),beos) @@ -415,7 +419,7 @@ endif export ID = $(LOGNAME) export NAN_PYTHON ?= $(LCGDIR)/python export NAN_ICONV ?= $(LCGDIR)/iconv - export NAN_PYTHON_VERSION ?= 2.3 + export NAN_PYTHON_VERSION ?= 2.4 ifeq ($(FREE_WINDOWS), true) export NAN_PYTHON_BINARY ?= $(NAN_PYTHON)/bin/python$(NAN_PYTHON_VERSION) export NAN_FREETYPE ?= $(LCGDIR)/gcc/freetype diff --git a/source/nan_link.mk b/source/nan_link.mk index e8f852c94aa..1156bf383dc 100644 --- a/source/nan_link.mk +++ b/source/nan_link.mk @@ -157,3 +157,7 @@ endif ifneq ($(OS), irix) LLIBS += $(NAN_SDLLIBS) endif + +ifeq ($(WITH_OPENEXR), true) + LLIBS += $(NAN_OPENEXR_LIBS) +endif diff --git a/tools/scons/bs/bs_libs.py b/tools/scons/bs/bs_libs.py index b8a88d4d245..3cb4822cac7 100644 --- a/tools/scons/bs/bs_libs.py +++ b/tools/scons/bs/bs_libs.py @@ -33,6 +33,9 @@ def common_libs(env): 'soundsystem']) if bs_globals.user_options_dict['USE_QUICKTIME'] == 1: env.Append (LIBS=['blender_quicktime']) + if bs_globals.user_options_dict['USE_OPENEXR'] == 1: + env.Append (LIBS=['blender_openexr']) + env.Append (LIBS=['Half', 'Iex', 'IlmImf', 'Imath']) def international_libs(env): """ |