mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 00:06:44 -04:00
Support building pandagles2 on Android
This commit is contained in:
parent
0122c07e10
commit
c594ab38ef
@ -4631,7 +4631,7 @@ if GetTarget() != 'android' and not PkgSkip("EGL") and not PkgSkip("GLES"):
|
||||
# DIRECTORY: panda/src/egldisplay/
|
||||
#
|
||||
|
||||
if not PkgSkip("EGL") and not PkgSkip("GLES2"):
|
||||
if GetTarget() != 'android' and not PkgSkip("EGL") and not PkgSkip("GLES2"):
|
||||
DefSymbol('GLES2', 'OPENGLES_2', '')
|
||||
OPTS=['DIR:panda/src/egldisplay', 'DIR:panda/src/glstuff', 'BUILDING:PANDAGLES2', 'GLES2', 'EGL', 'X11']
|
||||
TargetAdd('pandagles2_egldisplay_composite1.obj', opts=OPTS, input='p3egldisplay_composite1.cxx')
|
||||
@ -4892,6 +4892,20 @@ if GetTarget() == 'android' and not PkgSkip("EGL") and not PkgSkip("GLES"):
|
||||
TargetAdd('libpandagles.dll', input=COMMON_PANDA_LIBS)
|
||||
TargetAdd('libpandagles.dll', opts=['MODULE', 'GLES', 'EGL'])
|
||||
|
||||
if GetTarget() == 'android' and not PkgSkip("EGL") and not PkgSkip("GLES2"):
|
||||
DefSymbol('GLES2', 'OPENGLES_2', '')
|
||||
OPTS=['DIR:panda/src/androiddisplay', 'DIR:panda/src/glstuff', 'BUILDING:PANDAGLES2', 'GLES2', 'EGL']
|
||||
TargetAdd('pandagles2_androiddisplay_composite1.obj', opts=OPTS, input='p3androiddisplay_composite1.cxx')
|
||||
OPTS=['DIR:panda/metalibs/pandagles2', 'BUILDING:PANDAGLES2', 'GLES2', 'EGL']
|
||||
TargetAdd('pandagles2_pandagles2.obj', opts=OPTS, input='pandagles2.cxx')
|
||||
TargetAdd('libpandagles2.dll', input='pandagles2_pandagles2.obj')
|
||||
TargetAdd('libpandagles2.dll', input='p3gles2gsg_config_gles2gsg.obj')
|
||||
TargetAdd('libpandagles2.dll', input='p3gles2gsg_gles2gsg.obj')
|
||||
TargetAdd('libpandagles2.dll', input='pandagles2_androiddisplay_composite1.obj')
|
||||
TargetAdd('libpandagles2.dll', input='libp3android.dll')
|
||||
TargetAdd('libpandagles2.dll', input=COMMON_PANDA_LIBS)
|
||||
TargetAdd('libpandagles2.dll', opts=['MODULE', 'GLES2', 'EGL'])
|
||||
|
||||
#
|
||||
# DIRECTORY: panda/src/tinydisplay/
|
||||
#
|
||||
|
@ -9,8 +9,13 @@
|
||||
#define OPENGLES_2
|
||||
#include "config_gles2gsg.h"
|
||||
|
||||
#if defined(ANDROID)
|
||||
#include "config_androiddisplay.h"
|
||||
#include "androidGraphicsPipe.h"
|
||||
#else
|
||||
#include "config_egldisplay.h"
|
||||
#include "eglGraphicsPipe.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Initializes the library. This must be called at least once before any of
|
||||
@ -21,7 +26,12 @@
|
||||
void
|
||||
init_libpandagles2() {
|
||||
init_libgles2gsg();
|
||||
|
||||
#if defined(ANDROID)
|
||||
init_libandroiddisplay();
|
||||
#else
|
||||
init_libegldisplay();
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@ -30,5 +40,9 @@ init_libpandagles2() {
|
||||
*/
|
||||
int
|
||||
get_pipe_type_pandagles2() {
|
||||
#if defined(ANDROID)
|
||||
return AndroidGraphicsPipe::get_class_type().get_index();
|
||||
#else
|
||||
return eglGraphicsPipe::get_class_type().get_index();
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user