diff options
Diffstat (limited to 'platform/osx')
-rw-r--r-- | platform/osx/SCsub | 2 | ||||
-rw-r--r-- | platform/osx/export/export.cpp | 6 | ||||
-rw-r--r-- | platform/osx/joypad_osx.cpp (renamed from platform/osx/joystick_osx.cpp) | 93 | ||||
-rw-r--r-- | platform/osx/joypad_osx.h (renamed from platform/osx/joystick_osx.h) | 36 | ||||
-rw-r--r-- | platform/osx/os_osx.h | 9 | ||||
-rw-r--r-- | platform/osx/os_osx.mm | 45 | ||||
-rw-r--r-- | platform/osx/platform_config.h | 3 |
7 files changed, 97 insertions, 97 deletions
diff --git a/platform/osx/SCsub b/platform/osx/SCsub index c8e0e17612..00f23687cf 100644 --- a/platform/osx/SCsub +++ b/platform/osx/SCsub @@ -9,7 +9,7 @@ files = [ 'sem_osx.cpp', # 'context_gl_osx.cpp', 'dir_access_osx.mm', - 'joystick_osx.cpp', + 'joypad_osx.cpp', ] env.Program('#bin/godot', files) diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp index d8298eee73..1cb41cede2 100644 --- a/platform/osx/export/export.cpp +++ b/platform/osx/export/export.cpp @@ -324,8 +324,8 @@ Error EditorExportPlatformOSX::export_project(const String& p_path, bool p_debug String pkg_name; if (app_name!="") pkg_name=app_name; - else if (String(Globals::get_singleton()->get("application/name"))!="") - pkg_name=String(Globals::get_singleton()->get("application/name")); + else if (String(GlobalConfig::get_singleton()->get("application/name"))!="") + pkg_name=String(GlobalConfig::get_singleton()->get("application/name")); else pkg_name="Unnamed"; @@ -371,7 +371,7 @@ Error EditorExportPlatformOSX::export_project(const String& p_path, bool p_debug if (file=="Contents/Resources/icon.icns") { //see if there is an icon - String iconpath = Globals::get_singleton()->get("application/icon"); + String iconpath = GlobalConfig::get_singleton()->get("application/icon"); print_line("icon? "+iconpath); if (iconpath!="") { Image icon; diff --git a/platform/osx/joystick_osx.cpp b/platform/osx/joypad_osx.cpp index 740c349fe1..5d25017aa6 100644 --- a/platform/osx/joystick_osx.cpp +++ b/platform/osx/joypad_osx.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* joystick_osx.cpp */ +/* joypad_osx.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -26,14 +26,15 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#include "joystick_osx.h" +#include "joypad_osx.h" + #include <machine/endian.h> -#define GODOT_JOY_LOOP_RUN_MODE CFSTR("GodotJoystick") +#define GODOT_JOY_LOOP_RUN_MODE CFSTR("GodotJoypad") -static JoystickOSX* self = NULL; +static JoypadOSX* self = NULL; -joystick::joystick() { +joypad::joypad() { device_ref = NULL; ff_device = NULL; ff_axes = NULL; @@ -56,7 +57,7 @@ joystick::joystick() { ff_effect.dwSize = sizeof(ff_effect); } -void joystick::free() { +void joypad::free() { if (device_ref) { IOHIDDeviceUnscheduleFromRunLoop(device_ref, CFRunLoopGetCurrent(), GODOT_JOY_LOOP_RUN_MODE); } @@ -68,7 +69,7 @@ void joystick::free() { } } -bool joystick::has_element(IOHIDElementCookie p_cookie, Vector<rec_element> *p_list) const { +bool joypad::has_element(IOHIDElementCookie p_cookie, Vector<rec_element> *p_list) const { for (int i = 0; i < p_list->size(); i++) { if (p_cookie == p_list->get(i).cookie) { return true; @@ -77,7 +78,7 @@ bool joystick::has_element(IOHIDElementCookie p_cookie, Vector<rec_element> *p_l return false; } -int joystick::get_hid_element_state(rec_element *p_element) const { +int joypad::get_hid_element_state(rec_element *p_element) const { int value = 0; if (p_element && p_element->ref) { IOHIDValueRef valueRef; @@ -95,7 +96,7 @@ int joystick::get_hid_element_state(rec_element *p_element) const { } return value; } -void joystick::add_hid_element(IOHIDElementRef p_element) { +void joypad::add_hid_element(IOHIDElementRef p_element) { const CFTypeID elementTypeID = p_element ? CFGetTypeID(p_element) : 0; if (p_element && (elementTypeID == IOHIDElementGetTypeID())) { @@ -198,26 +199,26 @@ void joystick::add_hid_element(IOHIDElementRef p_element) { } static void hid_element_added(const void *p_value, void *p_parameter) { - joystick *joy = (joystick*) p_parameter; + joypad *joy = (joypad*) p_parameter; joy->add_hid_element((IOHIDElementRef) p_value); } -void joystick::add_hid_elements(CFArrayRef p_array) { +void joypad::add_hid_elements(CFArrayRef p_array) { CFRange range = { 0, CFArrayGetCount(p_array) }; CFArrayApplyFunction(p_array, range,hid_element_added,this); } -static void joystick_removed_callback(void *ctx, IOReturn result, void *sender) { +static void joypad_removed_callback(void *ctx, IOReturn result, void *sender) { int id = (intptr_t) ctx; self->_device_removed(id); } -static void joystick_added_callback(void *ctx, IOReturn res, void *sender, IOHIDDeviceRef ioHIDDeviceObject) { +static void joypad_added_callback(void *ctx, IOReturn res, void *sender, IOHIDDeviceRef ioHIDDeviceObject) { self->_device_added(res, ioHIDDeviceObject); } -static bool is_joystick(IOHIDDeviceRef p_device_ref) { +static bool is_joypad(IOHIDDeviceRef p_device_ref) { CFTypeRef refCF = NULL; int usage_page = 0; int usage = 0; @@ -241,32 +242,32 @@ static bool is_joystick(IOHIDDeviceRef p_device_ref) { return true; } -void JoystickOSX::_device_added(IOReturn p_res, IOHIDDeviceRef p_device) { +void JoypadOSX::_device_added(IOReturn p_res, IOHIDDeviceRef p_device) { if (p_res != kIOReturnSuccess || have_device(p_device)) { return; } - joystick new_joystick; - if (is_joystick(p_device)) { - configure_joystick(p_device, &new_joystick); + joypad new_joypad; + if (is_joypad(p_device)) { + configure_joypad(p_device, &new_joypad); #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060 if (IOHIDDeviceGetService != NULL) { #endif const io_service_t ioservice = IOHIDDeviceGetService(p_device); - if ((ioservice) && (FFIsForceFeedback(ioservice) == FF_OK) && new_joystick.config_force_feedback(ioservice)) { - new_joystick.ffservice = ioservice; + if ((ioservice) && (FFIsForceFeedback(ioservice) == FF_OK) && new_joypad.config_force_feedback(ioservice)) { + new_joypad.ffservice = ioservice; } #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060 } #endif - device_list.push_back(new_joystick); + device_list.push_back(new_joypad); } - IOHIDDeviceRegisterRemovalCallback(p_device, joystick_removed_callback, (void*) (intptr_t) new_joystick.id); + IOHIDDeviceRegisterRemovalCallback(p_device, joypad_removed_callback, (void*) (intptr_t) new_joypad.id); IOHIDDeviceScheduleWithRunLoop(p_device, CFRunLoopGetCurrent(), GODOT_JOY_LOOP_RUN_MODE); } -void JoystickOSX::_device_removed(int p_id) { +void JoypadOSX::_device_removed(int p_id) { int device = get_joy_index(p_id); ERR_FAIL_COND(device == -1); @@ -289,7 +290,7 @@ static String _hex_str(uint8_t p_byte) { return ret; } -bool JoystickOSX::configure_joystick(IOHIDDeviceRef p_device_ref, joystick* p_joy) { +bool JoypadOSX::configure_joypad(IOHIDDeviceRef p_device_ref, joypad* p_joy) { CFTypeRef refCF = NULL; @@ -302,7 +303,7 @@ bool JoystickOSX::configure_joystick(IOHIDDeviceRef p_device_ref, joystick* p_jo refCF = IOHIDDeviceGetProperty(p_device_ref, CFSTR(kIOHIDManufacturerKey)); } if ((!refCF) || (!CFStringGetCString((CFStringRef) refCF, c_name, sizeof (c_name), kCFStringEncodingUTF8))) { - name = "Unidentified Joystick"; + name = "Unidentified Joypad"; } name = c_name; @@ -345,7 +346,7 @@ bool JoystickOSX::configure_joystick(IOHIDDeviceRef p_device_ref, joystick* p_jo } #define FF_ERR() { if (ret != FF_OK) { FFReleaseDevice(ff_device); return false; } } -bool joystick::config_force_feedback(io_service_t p_service) { +bool joypad::config_force_feedback(io_service_t p_service) { HRESULT ret = FFCreateDevice(p_service, &ff_device); ERR_FAIL_COND_V(ret != FF_OK, false); @@ -367,7 +368,7 @@ bool joystick::config_force_feedback(io_service_t p_service) { #undef FF_ERR #define TEST_FF(ff) (features.supportedEffects & (ff)) -bool joystick::check_ff_features() { +bool joypad::check_ff_features() { FFCAPABILITIES features; HRESULT ret = FFDeviceGetForceFeedbackCapabilities(ff_device, &features); @@ -432,7 +433,7 @@ static int process_hat_value(int p_min, int p_max, int p_value) { return hat_value; } -void JoystickOSX::poll_joysticks() const { +void JoypadOSX::poll_joypads() const { while (CFRunLoopRunInMode(GODOT_JOY_LOOP_RUN_MODE,0,TRUE) == kCFRunLoopRunHandledSource) { /* no-op. Pending callbacks will fire. */ } @@ -454,11 +455,11 @@ static const InputDefault::JoyAxis axis_correct(int p_value, int p_min, int p_ma return jx; } -uint32_t JoystickOSX::process_joysticks(uint32_t p_last_id){ - poll_joysticks(); +uint32_t JoypadOSX::process_joypads(uint32_t p_last_id){ + poll_joypads(); for (int i = 0; i < device_list.size(); i++) { - joystick &joy = device_list[i]; + joypad &joy = device_list[i]; for (int j = 0; j < joy.axis_elements.size(); j++) { rec_element &elem = joy.axis_elements[j]; @@ -482,11 +483,11 @@ uint32_t JoystickOSX::process_joysticks(uint32_t p_last_id){ Vector2 strength = input->get_joy_vibration_strength(joy.id); float duration = input->get_joy_vibration_duration(joy.id); if (strength.x == 0 && strength.y == 0) { - joystick_vibration_stop(joy.id, timestamp); + joypad_vibration_stop(joy.id, timestamp); } else { float gain = MAX(strength.x, strength.y); - joystick_vibration_start(joy.id, gain, duration, timestamp); + joypad_vibration_start(joy.id, gain, duration, timestamp); } } } @@ -494,8 +495,8 @@ uint32_t JoystickOSX::process_joysticks(uint32_t p_last_id){ return p_last_id; } -void JoystickOSX::joystick_vibration_start(int p_id, float p_magnitude, float p_duration, uint64_t p_timestamp) { - joystick *joy = &device_list[get_joy_index(p_id)]; +void JoypadOSX::joypad_vibration_start(int p_id, float p_magnitude, float p_duration, uint64_t p_timestamp) { + joypad *joy = &device_list[get_joy_index(p_id)]; joy->ff_timestamp = p_timestamp; joy->ff_effect.dwDuration = p_duration * FF_SECONDS; joy->ff_effect.dwGain = p_magnitude * FF_FFNOMINALMAX; @@ -503,14 +504,14 @@ void JoystickOSX::joystick_vibration_start(int p_id, float p_magnitude, float p_ FFEffectStart(joy->ff_object, 1, 0); } -void JoystickOSX::joystick_vibration_stop(int p_id, uint64_t p_timestamp) { - joystick* joy = &device_list[get_joy_index(p_id)]; +void JoypadOSX::joypad_vibration_stop(int p_id, uint64_t p_timestamp) { + joypad* joy = &device_list[get_joy_index(p_id)]; joy->ff_timestamp = p_timestamp; FFEffectStop(joy->ff_object); } -int JoystickOSX::get_free_joy_id() { - for (int i = 0; i < JOYSTICKS_MAX; i++) { +int JoypadOSX::get_free_joy_id() { + for (int i = 0; i < JOYPADS_MAX; i++) { if (!attached_devices[i]) { attached_devices[i] = true; return i; @@ -519,14 +520,14 @@ int JoystickOSX::get_free_joy_id() { return -1; } -int JoystickOSX::get_joy_index(int p_id) const { +int JoypadOSX::get_joy_index(int p_id) const { for (int i = 0; i < device_list.size(); i++) { if (device_list[i].id == p_id) return i; } return -1; } -bool JoystickOSX::have_device(IOHIDDeviceRef p_device) const { +bool JoypadOSX::have_device(IOHIDDeviceRef p_device) const { for (int i = 0; i < device_list.size(); i++) { if (device_list[i].device_ref == p_device) { return true; @@ -561,14 +562,14 @@ static CFDictionaryRef create_match_dictionary(const UInt32 page, const UInt32 u return retval; } -void JoystickOSX::config_hid_manager(CFArrayRef p_matching_array) const { +void JoypadOSX::config_hid_manager(CFArrayRef p_matching_array) const { CFRunLoopRef runloop = CFRunLoopGetCurrent(); IOReturn ret = IOHIDManagerOpen(hid_manager, kIOHIDOptionsTypeNone); ERR_FAIL_COND(ret != kIOReturnSuccess); IOHIDManagerSetDeviceMatchingMultiple(hid_manager, p_matching_array); - IOHIDManagerRegisterDeviceMatchingCallback(hid_manager, joystick_added_callback, NULL); + IOHIDManagerRegisterDeviceMatchingCallback(hid_manager, joypad_added_callback, NULL); IOHIDManagerScheduleWithRunLoop(hid_manager, runloop, GODOT_JOY_LOOP_RUN_MODE); while (CFRunLoopRunInMode(GODOT_JOY_LOOP_RUN_MODE,0,TRUE) == kCFRunLoopRunHandledSource) { @@ -576,12 +577,12 @@ void JoystickOSX::config_hid_manager(CFArrayRef p_matching_array) const { } } -JoystickOSX::JoystickOSX() +JoypadOSX::JoypadOSX() { self = this; input = (InputDefault*)Input::get_singleton(); - for (int i = 0; i < JOYSTICKS_MAX; i++) { + for (int i = 0; i < JOYPADS_MAX; i++) { attached_devices[i] = false; } @@ -609,7 +610,7 @@ JoystickOSX::JoystickOSX() } } -JoystickOSX::~JoystickOSX() { +JoypadOSX::~JoypadOSX() { for (int i = 0; i < device_list.size(); i++) { device_list[i].free(); diff --git a/platform/osx/joystick_osx.h b/platform/osx/joypad_osx.h index ec745fe5d1..aafd82880d 100644 --- a/platform/osx/joystick_osx.h +++ b/platform/osx/joypad_osx.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* joystick_osx.h */ +/* joypad_osx.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -26,8 +26,8 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef JOYSTICKOSX_H -#define JOYSTICKOSX_H +#ifndef JOYPADOSX_H +#define JOYPADOSX_H #ifdef MACOS_10_0_4 #include <IOKit/hidsystem/IOHIDUsageTables.h> @@ -54,7 +54,7 @@ struct rec_element { }; }; -struct joystick { +struct joypad { IOHIDDeviceRef device_ref; Vector<rec_element> axis_elements; @@ -82,44 +82,44 @@ struct joystick { int get_hid_element_state(rec_element *p_element) const; void free(); - joystick(); + joypad(); }; -class JoystickOSX { +class JoypadOSX { enum { - JOYSTICKS_MAX = 16, + JOYPADS_MAX = 16, }; private: InputDefault *input; IOHIDManagerRef hid_manager; - bool attached_devices[JOYSTICKS_MAX]; - Vector<joystick> device_list; + bool attached_devices[JOYPADS_MAX]; + Vector<joypad> device_list; bool have_device(IOHIDDeviceRef p_device) const; - bool configure_joystick(IOHIDDeviceRef p_device_ref, joystick *p_joy); + bool configure_joypad(IOHIDDeviceRef p_device_ref, joypad *p_joy); int get_free_joy_id(); int get_joy_index(int p_id) const; - void poll_joysticks() const; - void setup_joystick_objects(); + void poll_joypads() const; + void setup_joypad_objects(); void config_hid_manager(CFArrayRef p_matching_array) const; - void joystick_vibration_start(int p_id, float p_magnitude, float p_duration, uint64_t p_timestamp); - void joystick_vibration_stop(int p_id, uint64_t p_timestamp); + void joypad_vibration_start(int p_id, float p_magnitude, float p_duration, uint64_t p_timestamp); + void joypad_vibration_stop(int p_id, uint64_t p_timestamp); public: - uint32_t process_joysticks(uint32_t p_last_id); + uint32_t process_joypads(uint32_t p_last_id); void _device_added(IOReturn p_res, IOHIDDeviceRef p_device); void _device_removed(int p_id); - JoystickOSX(); - ~JoystickOSX(); + JoypadOSX(); + ~JoypadOSX(); }; -#endif // JOYSTICKOSX_H +#endif // JOYPADOSX_H diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h index 8c4eb28ff0..fc64c2b867 100644 --- a/platform/osx/os_osx.h +++ b/platform/osx/os_osx.h @@ -31,11 +31,11 @@ #include "os/input.h" -#include "joystick_osx.h" +#include "joypad_osx.h" #include "drivers/unix/os_unix.h" #include "main/input_default.h" #include "servers/visual_server.h" -#include "servers/visual/visual_server_wrap_mt.h" +// #include "servers/visual/visual_server_wrap_mt.h" #include "servers/visual/rasterizer.h" #include "servers/physics_server.h" #include "servers/audio/audio_server_sw.h" @@ -58,7 +58,8 @@ class OS_OSX : public OS_Unix { public: bool force_quit; - Rasterizer *rasterizer; +// rasterizer seems to no longer be given to visual server, its using GLES3 directly? +// Rasterizer *rasterizer; VisualServer *visual_server; List<String> args; @@ -77,7 +78,7 @@ public: SpatialSound2DServerSW *spatial_sound_2d_server; InputDefault *input; - JoystickOSX *joystick_osx; + JoypadOSX *joypad_osx; /* objc */ diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index d5b870bc7d..a66f6abba5 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -38,13 +38,14 @@ #include "servers/visual/visual_server_raster.h" //#include "drivers/opengl/rasterizer_gl.h" //#include "drivers/gles2/rasterizer_gles2.h" +#include "drivers/gles3/rasterizer_gles3.h" #include "os_osx.h" #include <stdio.h> #include <stdlib.h> #include "print_string.h" #include "servers/physics/physics_server_sw.h" -#include "drivers/gles2/rasterizer_instance_gles2.h" -#include "servers/visual/visual_server_wrap_mt.h" +// #include "drivers/gles2/rasterizer_instance_gles2.h" +// #include "servers/visual/visual_server_wrap_mt.h" #include "main/main.h" #include "os/keyboard.h" #include "dir_access_osx.h" @@ -986,13 +987,11 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi window_size.width = p_desired.width; window_size.height = p_desired.height; -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6 && display_scale>1) { [window_view setWantsBestResolutionOpenGLSurface:YES]; //if (current_videomode.resizable) [window_object setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary]; } -#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/ // [window_object setTitle:[NSString stringWithUTF8String:"GodotEnginies"]]; [window_object setContentView:window_view]; @@ -1000,10 +999,8 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi [window_object setAcceptsMouseMovedEvents:YES]; [window_object center]; -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6) [window_object setRestorable:NO]; -#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/ unsigned int attributeCount = 0; @@ -1022,10 +1019,8 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi ADD_ATTR(NSOpenGLPFADoubleBuffer); ADD_ATTR(NSOpenGLPFAClosestPolicy); -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 - if (false/* use gl3*/) - ADD_ATTR2(NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core); -#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/ +// we now need OpenGL 3 or better, maybe even change this to 3_3Core ? + ADD_ATTR2(NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core); ADD_ATTR2(NSOpenGLPFAColorSize, colorBits); @@ -1084,15 +1079,19 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi AudioDriverManagerSW::add_driver(&audio_driver_osx); + // only opengl support here... + RasterizerGLES3::register_config(); + RasterizerGLES3::make_current(); - rasterizer = instance_RasterizerGLES2(); - - visual_server = memnew( VisualServerRaster(rasterizer) ); - - if (get_render_thread_mode()!=RENDER_THREAD_UNSAFE) { +// rasterizer = instance_RasterizerGLES2(); +// visual_server = memnew( VisualServerRaster(rasterizer) ); - visual_server =memnew(VisualServerWrapMT(visual_server,get_render_thread_mode()==RENDER_SEPARATE_THREAD)); - } + visual_server = memnew( VisualServerRaster ); + // FIXME: Reimplement threaded rendering? Or remove? +// if (get_render_thread_mode()!=RENDER_THREAD_UNSAFE) { +// +// visual_server =memnew(VisualServerWrapMT(visual_server,get_render_thread_mode()==RENDER_SEPARATE_THREAD)); +// } visual_server->init(); visual_server->cursor_set_visible(false, 0); @@ -1123,7 +1122,7 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi physics_2d_server->init(); input = memnew( InputDefault ); - joystick_osx = memnew( JoystickOSX ); + joypad_osx = memnew( JoypadOSX ); _ensure_data_dir(); @@ -1166,7 +1165,7 @@ void OS_OSX::finalize() { spatial_sound_2d_server->finish(); memdelete(spatial_sound_2d_server); - memdelete(joystick_osx); + memdelete(joypad_osx); memdelete(input); memdelete(sample_manager); @@ -1176,7 +1175,7 @@ void OS_OSX::finalize() { visual_server->finish(); memdelete(visual_server); - memdelete(rasterizer); +// memdelete(rasterizer); physics_server->finish(); memdelete(physics_server); @@ -1328,8 +1327,8 @@ void OS_OSX::set_icon(const Image& p_icon) { uint8_t *pixels = [imgrep bitmapData]; int len = img.get_width()*img.get_height(); - DVector<uint8_t> data = img.get_data(); - DVector<uint8_t>::Read r = data.read(); + PoolVector<uint8_t> data = img.get_data(); + PoolVector<uint8_t>::Read r = data.read(); /* Premultiply the alpha channel */ for (int i = 0; i<len ; i++) { @@ -1739,7 +1738,7 @@ void OS_OSX::run() { while (!force_quit) { process_events(); // get rid of pending events - last_id = joystick_osx->process_joysticks(last_id); + last_id = joypad_osx->process_joypads(last_id); if (Main::iteration()==true) break; }; diff --git a/platform/osx/platform_config.h b/platform/osx/platform_config.h index e3c1ee031c..834d0141a3 100644 --- a/platform/osx/platform_config.h +++ b/platform/osx/platform_config.h @@ -28,6 +28,5 @@ /*************************************************************************/ #include <alloca.h> -#define GLES2_INCLUDE_H "GL/glew.h" -#define GLES3_INCLUDE_H "GL/glew.h" +#define GLES3_INCLUDE_H "glad/glad.h" #define PTHREAD_RENAME_SELF |