Skip to content

Commit

Permalink
Fixed android compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
deveee committed Apr 5, 2017
1 parent 1d39030 commit 240041f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/irrlicht/source/Irrlicht/CContextEGL.cpp
Expand Up @@ -10,6 +10,10 @@
#include "os.h"
#include "fast_atof.h"

#if defined(_IRR_COMPILE_WITH_ANDROID_DEVICE_)
#include "android_native_app_glue.h"
#endif

#if defined(_IRR_COMPILE_WITH_EGL_)

namespace irr
Expand Down
3 changes: 2 additions & 1 deletion lib/irrlicht/source/Irrlicht/CIrrDeviceAndroid.cpp
Expand Up @@ -10,6 +10,7 @@

#include <assert.h>
#include "os.h"
#include "CContextEGL.h"
#include "CFileSystem.h"
#include "COGLES2Driver.h"

Expand Down Expand Up @@ -306,7 +307,7 @@ void CIrrDeviceAndroid::handleAndroidCommand(android_app* app, int32_t cmd)
device->CreationParams.DriverType == video::EDT_OGLES2)
{
video::COGLES2Driver* driver = (video::COGLES2Driver*)(device->VideoDriver);
driver->reloadEGLSurface(app->window);
driver->getEGLContext()->reloadEGLSurface(app->window);
}
}

Expand Down
4 changes: 4 additions & 0 deletions lib/irrlicht/source/Irrlicht/COGLES2Driver.h
Expand Up @@ -369,6 +369,10 @@ namespace video

//! Get bridge calls.
COGLES2CallBridge* getBridgeCalls() const;

#if defined(_IRR_COMPILE_WITH_EGL_)
ContextEGL* getEGLContext() {return EglContext;}
#endif

private:
// Bridge calls.
Expand Down

0 comments on commit 240041f

Please sign in to comment.