- Fixed Android compilation issues. Thanks to mchiasson for prepare this patch.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@4512 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
aec5a3afae
commit
3f5c6cafd7
|
@ -230,6 +230,8 @@ define out. */
|
|||
#ifndef IRR_OGLES2_SHADER_PATH
|
||||
#ifdef _IRR_COMPILE_WITH_IPHONE_DEVICE_
|
||||
#define IRR_OGLES2_SHADER_PATH ""
|
||||
#elif defined(_IRR_ANDROID_PLATFORM_)
|
||||
#define IRR_OGLES2_SHADER_PATH "media/Shaders/"
|
||||
#else
|
||||
#define IRR_OGLES2_SHADER_PATH "../../media/Shaders/"
|
||||
#endif
|
||||
|
|
|
@ -53,6 +53,7 @@ LOCAL_SRC_FILES := \
|
|||
CFileList.cpp \
|
||||
CFileSystem.cpp \
|
||||
CFPSCounter.cpp \
|
||||
leakHunter.cpp \
|
||||
CGeometryCreator.cpp \
|
||||
CGUIButton.cpp \
|
||||
CGUICheckBox.cpp \
|
||||
|
@ -319,7 +320,7 @@ zlib/compress.c zlib/deflate.c zlib/gzlib.c zlib/gzwrite.c zlib/inffast.c
|
|||
|
||||
LOCAL_C_INCLUDES := ../../../include
|
||||
|
||||
LOCAL_CFLAGS := -DBUILD_OGLES2 -g -D_DEBUG
|
||||
LOCAL_CFLAGS := -D_IRR_ANDROID_PLATFORM_ -g -D_DEBUG
|
||||
LOCAL_STATIC_LIBRARIES := android_native_app_glue
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
|
|
@ -89,16 +89,17 @@ CIrrDeviceAndroid::CIrrDeviceAndroid(const SIrrlichtCreationParameters& param)
|
|||
|
||||
// Create cursor control
|
||||
CursorControl = new CCursorControl(this);
|
||||
|
||||
io::CAndroidAssetFileArchive *assets = io::createAndroidAssetFileArchive(false, false);
|
||||
assets->addDirectory("media");
|
||||
FileSystem->addFileArchive(assets);
|
||||
|
||||
// Create the driver.
|
||||
createDriver();
|
||||
|
||||
if (VideoDriver)
|
||||
createGUIAndScene();
|
||||
|
||||
io::CAndroidAssetFileArchive *assets = io::createAndroidAssetFileArchive(false, false);
|
||||
assets->addDirectory("media");
|
||||
FileSystem->addFileArchive(assets);
|
||||
|
||||
// TODO
|
||||
//
|
||||
// if engine->app->savedState is not NULL then use postEventFromUser()
|
||||
|
@ -251,6 +252,11 @@ void CIrrDeviceAndroid::restoreWindow( void )
|
|||
{
|
||||
}
|
||||
|
||||
core::position2di CIrrDeviceAndroid::getWindowPosition()
|
||||
{
|
||||
return core::position2di(0, 0);
|
||||
}
|
||||
|
||||
E_DEVICE_TYPE CIrrDeviceAndroid::getType( void ) const
|
||||
{
|
||||
return( EIDT_ANDROID );
|
||||
|
|
|
@ -42,6 +42,10 @@ namespace irr
|
|||
virtual void minimizeWindow( void );
|
||||
virtual void maximizeWindow( void );
|
||||
virtual void restoreWindow( void );
|
||||
|
||||
//! Get the position of this window on screen
|
||||
virtual core::position2di getWindowPosition();
|
||||
|
||||
virtual E_DEVICE_TYPE getType( void ) const;
|
||||
|
||||
//! Implementation of the linux cursor control
|
||||
|
|
|
@ -26,6 +26,9 @@
|
|||
#else
|
||||
#include <EGL/egl.h>
|
||||
#include <GLES2/gl2.h>
|
||||
#ifdef _IRR_COMPILE_WITH_ANDROID_DEVICE_
|
||||
#include "android_native_app_glue.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace irr
|
||||
|
@ -68,6 +71,9 @@ namespace video
|
|||
EglDisplay = eglGetDisplay((NativeDisplayType)ExposedData.OpenGLLinux.X11Display);
|
||||
#elif defined(_IRR_COMPILE_WITH_IPHONE_DEVICE_)
|
||||
Device = device;
|
||||
#elif defined(_IRR_COMPILE_WITH_ANDROID_DEVICE_)
|
||||
EglWindow = ((struct android_app *)(params.PrivateData))->window;
|
||||
EglDisplay = EGL_NO_DISPLAY;
|
||||
#endif
|
||||
#ifdef EGL_VERSION_1_0
|
||||
if (EglDisplay == EGL_NO_DISPLAY)
|
||||
|
|
Loading…
Reference in New Issue