mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 08:44:19 -04:00
Merge branch 'master' of github.com:panda3d/panda3d
This commit is contained in:
commit
89b6ccf887
@ -45,6 +45,10 @@
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
static ofstream logfile;
|
||||
@ -230,9 +234,29 @@ initialize(int api_version, const string &contents_filename,
|
||||
_supported_platforms.push_back("win_i386");
|
||||
_supported_platforms.push_back("win32");
|
||||
}
|
||||
#elif defined(__APPLE__)
|
||||
if (_platform == "osx_amd64") {
|
||||
_supported_platforms.push_back("osx_amd64");
|
||||
_supported_platforms.push_back("osx_i386");
|
||||
|
||||
} else if (_platform == "osx_i386") {
|
||||
// This is a 32-bit process, but determine if the underlying OS
|
||||
// supports 64-bit.
|
||||
|
||||
int mib[2] = { CTL_HW, HW_MACHINE };
|
||||
char machine[512];
|
||||
size_t len = 511;
|
||||
if (sysctl(mib, 2, (void *)machine, &len, NULL, 0) == 0) {
|
||||
if (strcmp(machine, "x86_64") == 0) {
|
||||
_supported_platforms.push_back("osx_amd64");
|
||||
}
|
||||
}
|
||||
|
||||
_supported_platforms.push_back("osx_i386");
|
||||
}
|
||||
#endif // _WIN32
|
||||
|
||||
// TODO: OSX, Linux multiplatform support. Just add the
|
||||
// TODO: Linux multiplatform support. Just add the
|
||||
// appropriate platform strings to _supported_platforms.
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ OpenALAudioManager() {
|
||||
alcGetError(_device); // clear errors
|
||||
_context = alcCreateContext(_device, NULL);
|
||||
alc_audio_errcheck("alcCreateContext(_device, NULL)",_device);
|
||||
if (_context!=NULL) {
|
||||
if (_context != NULL) {
|
||||
_openal_active = true;
|
||||
}
|
||||
}
|
||||
@ -142,20 +142,24 @@ OpenALAudioManager() {
|
||||
} else {
|
||||
alcGetError(_device); // clear errors
|
||||
alcMakeContextCurrent(_context);
|
||||
alc_audio_errcheck("alcMakeContextCurrent(_context)",_device);
|
||||
|
||||
alc_audio_errcheck("alcMakeContextCurrent(_context)", _device);
|
||||
|
||||
// set 3D sound characteristics as they are given in the configrc
|
||||
audio_3d_set_doppler_factor(audio_doppler_factor);
|
||||
audio_3d_set_distance_factor(audio_distance_factor);
|
||||
audio_3d_set_drop_off_factor(audio_drop_off_factor);
|
||||
|
||||
if (audio_cat.is_debug()) {
|
||||
audio_cat->debug()
|
||||
<< "ALC_DEVICE_SPECIFIER:" << alcGetString(_device, ALC_DEVICE_SPECIFIER) << endl;
|
||||
}
|
||||
}
|
||||
|
||||
audio_cat->debug() << "ALC_DEVICE_SPECIFIER:" << alcGetString(_device, ALC_DEVICE_SPECIFIER) << endl;
|
||||
audio_cat->debug() << "AL_RENDERER:" << alGetString(AL_RENDERER) << endl;
|
||||
audio_cat->debug() << "AL_VENDOR:" << alGetString(AL_VENDOR) << endl;
|
||||
audio_cat->debug() << "AL_VERSION:" << alGetString(AL_VERSION) << endl;
|
||||
|
||||
if (audio_cat.is_debug()) {
|
||||
audio_cat->debug() << "AL_RENDERER:" << alGetString(AL_RENDERER) << endl;
|
||||
audio_cat->debug() << "AL_VENDOR:" << alGetString(AL_VENDOR) << endl;
|
||||
audio_cat->debug() << "AL_VERSION:" << alGetString(AL_VERSION) << endl;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
@ -159,7 +159,7 @@ begin_frame(FrameMode mode, Thread *current_thread) {
|
||||
// Set the drawable.
|
||||
if (_properties.get_fullscreen()) {
|
||||
// Fullscreen.
|
||||
[cocoagsg->_context setFullScreen];
|
||||
CGLSetFullScreenOnDisplay((CGLContextObj) [cocoagsg->_context CGLContextObj], CGDisplayIDToOpenGLDisplayMask(_display));
|
||||
} else {
|
||||
// Although not recommended, it is technically possible to
|
||||
// use the same context with multiple different-sized windows.
|
||||
|
Loading…
x
Reference in New Issue
Block a user