Commit b5270f9d authored by hybrid's avatar hybrid

Changed the OpenGL header include scheme for OSX. I hope that it does not...

Changed the OpenGL header include scheme for OSX. I hope that it does not break anything as I cannot compile it under OSX. Also some indentation for the OSX stuff.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@865 dfc29bdd-3216-0410-991c-e03cc46cb475
parent d6f8edae
...@@ -24,11 +24,15 @@ ...@@ -24,11 +24,15 @@
#pragma comment(lib, "GLu32.lib") #pragma comment(lib, "GLu32.lib")
#endif #endif
#elif defined(MACOSX) #elif defined(MACOSX)
#define GL_EXT_texture_env_combine 1
#include "CIrrDeviceMacOSX.h" #include "CIrrDeviceMacOSX.h"
#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
#define GL_GLEXT_LEGACY 1
#endif
#include <OpenGL/gl.h> #include <OpenGL/gl.h>
#include <OpenGL/glu.h> #include <OpenGL/glu.h>
#include <OpenGL/glext.h> #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
#include "glext.h"
#endif
#elif defined(_IRR_USE_SDL_DEVICE_) #elif defined(_IRR_USE_SDL_DEVICE_)
#if defined(_IRR_OPENGL_USE_EXTPOINTER_) #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
#define GL_GLEXT_LEGACY 1 #define GL_GLEXT_LEGACY 1
......
...@@ -21,11 +21,15 @@ ...@@ -21,11 +21,15 @@
#pragma comment(lib, "GLu32.lib") #pragma comment(lib, "GLu32.lib")
#endif #endif
#elif defined(MACOSX) #elif defined(MACOSX)
#define GL_EXT_texture_env_combine 1
#include "CIrrDeviceMacOSX.h" #include "CIrrDeviceMacOSX.h"
#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
#define GL_GLEXT_LEGACY 1
#endif
#include <OpenGL/gl.h> #include <OpenGL/gl.h>
#include <OpenGL/glu.h> #include <OpenGL/glu.h>
#include <OpenGL/glext.h> #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
#include "glext.h"
#endif
#elif defined(_IRR_USE_SDL_DEVICE_) #elif defined(_IRR_USE_SDL_DEVICE_)
#if defined(_IRR_OPENGL_USE_EXTPOINTER_) #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
#define GL_GLEXT_LEGACY 1 #define GL_GLEXT_LEGACY 1
......
...@@ -9,20 +9,21 @@ ...@@ -9,20 +9,21 @@
#ifdef _IRR_COMPILE_WITH_OPENGL_ #ifdef _IRR_COMPILE_WITH_OPENGL_
#ifdef _IRR_WINDOWS_API_ #ifdef _IRR_WINDOWS_API_
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
#include <GL/gl.h> #include <GL/gl.h>
#include "glext.h" #include "glext.h"
#elif defined(MACOSX)
#include <OpenGL/gl.h>
#include <OpenGL/glext.h>
#else #else
#if defined(_IRR_OPENGL_USE_EXTPOINTER_) #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
#define GL_GLEXT_LEGACY 1 #define GL_GLEXT_LEGACY 1
#endif
#if defined(MACOSX)
#include <OpenGL/gl.h>
#else
#include <GL/gl.h>
#endif #endif
#include <GL/gl.h>
#if defined(_IRR_OPENGL_USE_EXTPOINTER_) #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
#include "glext.h" #include "glext.h"
#endif #endif
#endif #endif
......
...@@ -9,19 +9,20 @@ ...@@ -9,19 +9,20 @@
#ifdef _IRR_COMPILE_WITH_OPENGL_ #ifdef _IRR_COMPILE_WITH_OPENGL_
#ifdef _IRR_WINDOWS_API_ #ifdef _IRR_WINDOWS_API_
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
#include <GL/gl.h> #include <GL/gl.h>
#elif defined(MACOSX)
#include <OpenGL/gl.h>
#include <OpenGL/glext.h>
#else #else
#if defined(_IRR_OPENGL_USE_EXTPOINTER_) #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
#define GL_GLEXT_LEGACY 1 #define GL_GLEXT_LEGACY 1
#endif
#if defined(MACOSX)
#include <OpenGL/gl.h>
#else
#include <GL/gl.h>
#endif #endif
#include <GL/gl.h>
#if defined(_IRR_OPENGL_USE_EXTPOINTER_) #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
#include "glext.h" #include "glext.h"
#endif #endif
#endif #endif
......
...@@ -22,19 +22,20 @@ ...@@ -22,19 +22,20 @@
#pragma comment(lib, "OpenGL32.lib") #pragma comment(lib, "OpenGL32.lib")
#pragma comment(lib, "GLu32.lib") #pragma comment(lib, "GLu32.lib")
#endif #endif
#elif defined(MACOSX)
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#include <OpenGL/glext.h>
#else #else
#if defined(_IRR_OPENGL_USE_EXTPOINTER_) #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
#define GL_GLEXT_LEGACY 1 #define GL_GLEXT_LEGACY 1
#endif #endif
#include <GL/gl.h> #if defined(MACOSX)
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#else
#include <GL/gl.h>
#include <GL/glu.h>
#endif
#if defined(_IRR_OPENGL_USE_EXTPOINTER_) #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
#include "glext.h" #include "glext.h"
#endif #endif
#include <GL/glu.h>
#endif #endif
......
...@@ -25,12 +25,12 @@ namespace irr ...@@ -25,12 +25,12 @@ namespace irr
public: public:
//! constructor //! constructor
CIrrDeviceMacOSX(video::E_DRIVER_TYPE driverType, CIrrDeviceMacOSX(video::E_DRIVER_TYPE driverType,
const core::dimension2d<s32>& windowSize, const core::dimension2d<s32>& windowSize,
u32 bits, bool fullscreen, u32 bits, bool fullscreen,
bool sbuffer, bool vsync, bool sbuffer, bool vsync,
bool antiAlias, IEventReceiver* receiver, bool antiAlias, IEventReceiver* receiver,
const char* version); const char* version);
//! destructor //! destructor
virtual ~CIrrDeviceMacOSX(); virtual ~CIrrDeviceMacOSX();
...@@ -60,10 +60,10 @@ namespace irr ...@@ -60,10 +60,10 @@ namespace irr
//! Sets if the window should be resizeable in windowed mode. //! Sets if the window should be resizeable in windowed mode.
virtual void setResizeAble(bool resize); virtual void setResizeAble(bool resize);
void flush(); void flush();
void setMouseLocation(int x,int y); void setMouseLocation(int x,int y);
void setResize(int width,int height); void setResize(int width,int height);
void setCursorVisible(bool visible); void setCursorVisible(bool visible);
private: private:
...@@ -112,7 +112,7 @@ namespace irr ...@@ -112,7 +112,7 @@ namespace irr
//! Sets the new position of the cursor. //! Sets the new position of the cursor.
virtual void setPosition(const core::position2d<s32> &pos) virtual void setPosition(const core::position2d<s32> &pos)
{ {
if (CursorPos.X != pos.X || CursorPos.Y != pos.Y) if (CursorPos.X != pos.X || CursorPos.Y != pos.Y)
setPosition(pos.X, pos.Y); setPosition(pos.X, pos.Y);
} }
...@@ -169,7 +169,7 @@ namespace irr ...@@ -169,7 +169,7 @@ namespace irr
} }
//! Updates the internal cursor position //! Updates the internal cursor position
void updateInternalCursorPosition(int x,int y) void updateInternalCursorPosition(int x,int y)
{ {
CursorPos.X = x; CursorPos.X = x;
CursorPos.Y = y; CursorPos.Y = y;
...@@ -186,12 +186,12 @@ namespace irr ...@@ -186,12 +186,12 @@ namespace irr
core::rect<s32> ReferenceRect; core::rect<s32> ReferenceRect;
}; };
bool createWindow(const irr::core::dimension2d<irr::s32>& windowSize, irr::u32 bits, bool fullscreen, bool vsync, bool stencilBuffer); bool createWindow(const irr::core::dimension2d<irr::s32>& windowSize, irr::u32 bits, bool fullscreen, bool vsync, bool stencilBuffer);
void initKeycodes(); void initKeycodes();
void storeMouseLocation(); void storeMouseLocation();
void postMouseEvent(void *event,irr::SEvent &ievent); void postMouseEvent(void *event,irr::SEvent &ievent);
void postKeyEvent(void *event,irr::SEvent &ievent,bool pressed); void postKeyEvent(void *event,irr::SEvent &ievent,bool pressed);
video::E_DRIVER_TYPE DriverType; video::E_DRIVER_TYPE DriverType;
bool stencilbuffer; bool stencilbuffer;
......
This diff is collapsed.
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