Android build fixes wip.

This commit is contained in:
bkaradzic 2013-04-15 23:10:32 -07:00
parent 6ed7b6fe14
commit d3a526a92b
4 changed files with 77 additions and 3 deletions

View file

@ -0,0 +1,45 @@
/*
* Copyright 2011-2013 Branimir Karadzic. All rights reserved.
* License: http://www.opensource.org/licenses/BSD-2-Clause
*/
#include <bx/bx.h>
#if BX_PLATFORM_ANDROID
#include <stdio.h>
#include "entry.h"
namespace entry
{
const Event* poll()
{
return NULL;
}
void release(const Event* _event)
{
}
void setWindowSize(uint32_t _width, uint32_t _height)
{
}
void toggleWindowFrame()
{
}
void setMouseLock(bool _lock)
{
}
} // namespace entry
extern int _main_(int _argc, char** _argv);
int main(int _argc, char** _argv)
{
_main_(_argc, _argv);
}
#endif // BX_PLATFORM_ANDROID

View file

@ -12,7 +12,15 @@
#include <bx/bx.h>
#if BX_PLATFORM_LINUX
#if BX_PLATFORM_ANDROID
struct android_app;
namespace bgfx
{
androidSetAndroidApp(struct android_app* _app);
} // namespace bgfx
#elif BX_PLATFORM_LINUX
# include <X11/Xlib.h>
namespace bgfx

View file

@ -6,17 +6,30 @@
all:
premake4 --file=premake/premake4.lua vs2008
premake4 --file=premake/premake4.lua vs2010
premake4 --file=premake/premake4.lua --gcc=android-arm gmake
premake4 --file=premake/premake4.lua --gcc=emscripten gmake
premake4 --file=premake/premake4.lua --gcc=nacl gmake
premake4 --file=premake/premake4.lua --gcc=nacl-arm gmake
premake4 --file=premake/premake4.lua --gcc=pnacl gmake
premake4 --file=premake/premake4.lua --gcc=mingw gmake
premake4 --file=premake/premake4.lua --gcc=linux gmake
premake4 --file=premake/premake4.lua --gcc=emscripten gmake
premake4 --file=premake/premake4.lua --gcc=osx gmake
premake4 --file=premake/premake4.lua --gcc=qnx-arm gmake
premake4 --file=premake/premake4.lua xcode4
make -s --no-print-directory -C src
android-arm-debug:
make -R -C .build/projects/gmake-android-arm config=debug
android-arm-release:
make -R -C .build/projects/gmake-android-arm config=release
android-arm: android-arm-debug android-arm-release
emscripten-debug:
make -R -C .build/projects/gmake-emscripten config=debug
emscripten-arm-release:
make -R -C .build/projects/gmake-emscripten config=release
emscripten-arm: emscripten-arm-debug emscripten-arm-release
linux-debug32:
make -R -C .build/projects/gmake-linux config=debug32
linux-release32:

View file

@ -86,7 +86,7 @@
# include <GLES3/gl3ext.h>
# endif // BGFX_CONFIG_RENDERER_
# if BX_PLATFORM_EMSCRIPTEN || BX_PLATFORM_WINDOWS || BX_PLATFORM_QNX
# if BX_PLATFORM_ANDROID || BX_PLATFORM_EMSCRIPTEN || BX_PLATFORM_WINDOWS || BX_PLATFORM_QNX
# undef BGFX_USE_EGL
# define BGFX_USE_EGL 1
# include "glcontext_egl.h"
@ -108,10 +108,18 @@ typedef void (*PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC)(GLuint shader, GLsizei b
# define GL_BGRA_EXT 0x80E1
# endif // GL_BGRA_EXT
# ifndef GL_R16F_EXT
# define GL_R16F_EXT 0x822D
# endif // GL_R16F_EXT
# ifndef GL_R32F_EXT
# define GL_R32F_EXT 0x822E
# endif // GL_R32F_EXT
# ifndef GL_RGB10_A2_EXT
# define GL_RGB10_A2_EXT 0x8059
# endif // GL_RGB10_A2_EXT
# ifndef GL_COMPRESSED_RGBA_S3TC_DXT1_EXT
# define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
# endif // GL_COMPRESSED_RGBA_S3TC_DXT1_EXT