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