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
#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
......
......@@ -41,7 +41,7 @@ CIrrDeviceMacOSX::CIrrDeviceMacOSX(video::E_DRIVER_TYPE driverType,
bool sbuffer, bool vsync,
bool antiAlias, IEventReceiver* receiver,
const char* version)
: CIrrDeviceStub(version, receiver), DriverType(driverType), stencilbuffer(sbuffer)
: CIrrDeviceStub(version, receiver), DriverType(driverType), stencilbuffer(sbuffer), _window(NULL), _active(true), _oglcontext(NULL), _cglcontext(NULL)
{
struct utsname name;
NSString *path;
......@@ -64,11 +64,6 @@ CIrrDeviceMacOSX::CIrrDeviceMacOSX(video::E_DRIVER_TYPE driverType,
chdir([path cString]);
}
_window = NULL;
_active = true;
_oglcontext = NULL;
_cglcontext = NULL;
uname(&name);
Operator = new COSOperator(name.version);
os::Printer::log(name.version,ELL_INFORMATION);
......@@ -474,8 +469,10 @@ void CIrrDeviceMacOSX::postKeyEvent(void *event,irr::SEvent &ievent,bool pressed
ievent.KeyInput.Control = ([event modifierFlags] & NSControlKeyMask) != 0;
ievent.KeyInput.Char = (irr::EKEY_CODE)mchar;
if (skipCommand) ievent.KeyInput.Control = true;
else if ([event modifierFlags] & NSCommandKeyMask) [NSApp sendEvent:(NSEvent *)event];
if (skipCommand)
ievent.KeyInput.Control = true;
else if ([event modifierFlags] & NSCommandKeyMask)
[NSApp sendEvent:(NSEvent *)event];
postEventFromUser(ievent);
}
......@@ -599,11 +596,8 @@ void CIrrDeviceMacOSX::initKeycodes()
//! Sets if the window should be resizeable in windowed mode.
void CIrrDeviceMacOSX::setResizeAble(bool resize)
{
// todo: implement resize
}
......
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