Commit dd15cecd authored by nadro's avatar nadro

- Fixed OSX compilation issues.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4411 dfc29bdd-3216-0410-991c-e03cc46cb475
parent ff8e5073
...@@ -21,6 +21,12 @@ ...@@ -21,6 +21,12 @@
#include <SDL/SDL.h> #include <SDL/SDL.h>
#endif #endif
#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
// Objective-C++ code part
#import "MacOSX/CIrrDeviceMacOSX.h"
// End of objective-C++ code part
#endif
namespace irr namespace irr
{ {
namespace video namespace video
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#endif #endif
#elif defined(_IRR_COMPILE_WITH_OSX_DEVICE_) #elif defined(_IRR_COMPILE_WITH_OSX_DEVICE_)
#include "CIrrDeviceMacOSX.h"
#if defined(_IRR_OPENGL_USE_EXTPOINTER_) #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
#define GL_GLEXT_LEGACY 1 #define GL_GLEXT_LEGACY 1
#endif #endif
...@@ -2387,7 +2386,7 @@ inline void COpenGLExtensionHandler::extGlProgramParameteri(GLhandleARB program, ...@@ -2387,7 +2386,7 @@ inline void COpenGLExtensionHandler::extGlProgramParameteri(GLhandleARB program,
#elif defined(GL_ARB_geometry_shader4) #elif defined(GL_ARB_geometry_shader4)
glProgramParameteriARB(program, pname, value); glProgramParameteriARB(program, pname, value);
#elif defined(GL_EXT_geometry_shader4) #elif defined(GL_EXT_geometry_shader4)
glProgramParameteriEXT((long GLuint)program, pname, value); glProgramParameteriEXT((long unsigned int)program, pname, value);
#elif defined(GL_NV_geometry_program4) || defined(GL_NV_geometry_shader4) #elif defined(GL_NV_geometry_program4) || defined(GL_NV_geometry_shader4)
glProgramParameteriNV(program, pname, value); glProgramParameteriNV(program, pname, value);
#else #else
......
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
#include <OpenGL/OpenGL.h> #include <OpenGL/OpenGL.h>
#include <map> #include <map>
class NSWindow; @class NSWindow;
class NSOpenGLContext; @class NSOpenGLContext;
class NSBitmapImageRep; @class NSBitmapImageRep;
namespace irr namespace irr
{ {
......
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
#import <Carbon/Carbon.h> #import <Carbon/Carbon.h>
#endif #endif
#include "CIrrDeviceMacOSX.h" #import "CIrrDeviceMacOSX.h"
#include "IEventReceiver.h" #include "IEventReceiver.h"
#include "irrList.h" #include "irrList.h"
#include "os.h" #include "os.h"
...@@ -512,7 +513,7 @@ CIrrDeviceMacOSX::CIrrDeviceMacOSX(const SIrrlichtCreationParameters& param) ...@@ -512,7 +513,7 @@ CIrrDeviceMacOSX::CIrrDeviceMacOSX(const SIrrlichtCreationParameters& param)
initKeycodes(); initKeycodes();
VideoModeList.setDesktop(CreationParams.Bits, core::dimension2d<u32>([[NSScreen mainScreen] frame].size.width, [[NSScreen mainScreen] frame].size.height)); VideoModeList->setDesktop(CreationParams.Bits, core::dimension2d<u32>([[NSScreen mainScreen] frame].size.width, [[NSScreen mainScreen] frame].size.height));
bool success = true; bool success = true;
if (CreationParams.DriverType != video::EDT_NULL) if (CreationParams.DriverType != video::EDT_NULL)
...@@ -1828,7 +1829,7 @@ void CIrrDeviceMacOSX::pollJoysticks() ...@@ -1828,7 +1829,7 @@ void CIrrDeviceMacOSX::pollJoysticks()
video::IVideoModeList* CIrrDeviceMacOSX::getVideoModeList() video::IVideoModeList* CIrrDeviceMacOSX::getVideoModeList()
{ {
if (!VideoModeList.getVideoModeCount()) if (!VideoModeList->getVideoModeCount())
{ {
CGDirectDisplayID display; CGDirectDisplayID display;
display = CGMainDisplayID(); display = CGMainDisplayID();
...@@ -1858,7 +1859,7 @@ video::IVideoModeList* CIrrDeviceMacOSX::getVideoModeList() ...@@ -1858,7 +1859,7 @@ video::IVideoModeList* CIrrDeviceMacOSX::getVideoModeList()
unsigned int Width = CGDisplayModeGetWidth(CurrentMode); unsigned int Width = CGDisplayModeGetWidth(CurrentMode);
unsigned int Height = CGDisplayModeGetHeight(CurrentMode); unsigned int Height = CGDisplayModeGetHeight(CurrentMode);
VideoModeList.addMode(core::dimension2d<u32>(Width, Height), Depth); VideoModeList->addMode(core::dimension2d<u32>(Width, Height), Depth);
} }
} }
#else #else
...@@ -1883,7 +1884,7 @@ video::IVideoModeList* CIrrDeviceMacOSX::getVideoModeList() ...@@ -1883,7 +1884,7 @@ video::IVideoModeList* CIrrDeviceMacOSX::getVideoModeList()
} }
#endif #endif
} }
return &VideoModeList; return VideoModeList;
} }
} // end namespace } // end namespace
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment