HI Mike,

Thanks for the clarification.

Configuring using the OPENGL_PROFILE cmake variable is the right thing to
do, but looking at the relevant code for Apple it currently hardwires to
the standard Apple headers rather than the Android target that you are
needing.  You may well be the first to experiment with building for Android
under OSX so these problems are just a symptom of doing something untried
before.  As you have the specific platform combination in front of you, you
will be best placed to help fix these issue (I don't have a Apple machine
so can't test personally.)

Looking at OpenSceneGraph/CMakeLists.txt the block foe GLES1+GLES2 looks
like:

ELSEIF(OSG_GLES1_AVAILABLE)
    IF (APPLE)
        SET(OPENGL_HEADER1 "#include \"TargetConditionals.h\"" CACHE STRING
"#include<> line for OpenGL Header")
        SET(OPENGL_HEADER2 "#include <OpenGLES/ES1/gl.h>" CACHE STRING
"#include<> line for additional OpenGL Headers if required")
    ELSE()
        SET(OPENGL_HEADER1 "#include <GLES/gl.h>" CACHE STRING "#include<>
line for OpenGL Header")
        SET(OPENGL_HEADER2 "" CACHE STRING "#include<> line for additional
OpenGL Headers if required")
    ENDIF()
ELSEIF(OSG_GLES2_AVAILABLE)
    IF (APPLE)
        SET(OPENGL_HEADER1 "#include \"TargetConditionals.h\"" CACHE STRING
"#include<> line for OpenGL Header")
        SET(OPENGL_HEADER2 "#include <OpenGLES/ES2/gl.h>" CACHE STRING
"#include<> line for additional OpenGL Headers if required")
    ELSE()
        SET(OPENGL_HEADER1 "#include <GLES2/gl2.h>" CACHE STRING
"#include<> line for OpenGL Header")
        SET(OPENGL_HEADER2 "" CACHE STRING "#include<> line for additional
OpenGL Headers if required")
    ENDIF()
ELSE()

My guess is that the IF (APPLE) part would need changing to IF (APPLE AND
NOT ANDROID)

Could you modify your CMakeLists.txt, remove the CMakeCache.txt and re-run
the configure to see what happens.

Robert.



On 7 August 2014 17:31, Mike Strean <[email protected]> wrote:

> Greetings, Robert. Sorry - this is with the latest svn.
>
> I also tried configuring with OPENGL_PROFILE=GLES2 ( also GLES1 ) with the
> same result.
>
>
> Code:
> cmake ../OpenSceneGraph -DOSG_BUILD_PLATFORM_ANDROID=ON
> -DANDROID_NDK=/Users/mike/Development/android-ndk -DDYNAMIC_OPENTHREADS=OFF
> -DDYNAMIC_OPENSCENEGRAPH=OFF -DOPENGL_PROFILE=GLES2 -DANDROID_PLATFORM=16
> -DANDROID_STL="gnustl_static" -DCMAKE_INSTALL_PREFIX=/usr/local/android
>
>
>
>
> Best,
> Mike
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=60583#60583
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to