Re: [osg-users] [osg-submissions] Android Development Plans

2011-03-10 Thread Mourad Boufarguine
Hi all,

I gave osg android port a try on Windows using cygwin, and it worked like a
charm (only a tiny problem with osgViewer, when cross compiling for android
using cygwin, the windows path in osgViewer/CMakeLists.txt is used rather
than the android one, fix attached).
For the moment I only compiled all the osg libs and plugins that don't rely
on a 3rdParty lib. I will let you know when I succeed to build an app for my
nexus S :) (the test apk Jorge sent, works for me)

Thanks for your efforts.

Mourad


On Tue, Mar 8, 2011 at 5:37 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Rafa, Jorge and all ;-)

 On Mon, Mar 7, 2011 at 11:53 AM, Rafa Gaitan rafa.gai...@gmail.com
 wrote:
  Finally Jorge and me have finished a first approach to build OSG under
  Android using the android NDK.
 
  Attached you will find all required code and cmake modifications (They
  are based on a previous submissions I sent last week).

 Many thanks for your efforts.  I have now merged and checked in
 changes to OpenSceneGraph svn/trunk.  I haven't tested the Android
 build at all yet, only the normal Linux build side.

 Would it be possible for you to put up a documentation page on the
 wiki to show how to set up to build the OSG on Android?

 Thanks,
 Robert.
 ___
 osg-submissions mailing list
 osg-submissi...@lists.openscenegraph.org

 http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

# FIXME: For OS X, need flag for Framework or dylib
IF(DYNAMIC_OPENSCENEGRAPH)
ADD_DEFINITIONS(-DOSGVIEWER_LIBRARY)
ELSE()
ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
ENDIF()

SET(LIB_NAME osgViewer)

SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME})
SET(TARGET_H
${HEADER_PATH}/CompositeViewer
${HEADER_PATH}/Export
${HEADER_PATH}/GraphicsWindow
${HEADER_PATH}/Renderer
${HEADER_PATH}/Scene
${HEADER_PATH}/Version
${HEADER_PATH}/View
${HEADER_PATH}/Viewer
${HEADER_PATH}/ViewerBase
${HEADER_PATH}/ViewerEventHandlers
)

SET(LIB_COMMON_FILES
CompositeViewer.cpp
HelpHandler.cpp
Renderer.cpp
Scene.cpp
ScreenCaptureHandler.cpp
StatsHandler.cpp
Version.cpp
View.cpp
Viewer.cpp
ViewerBase.cpp
ViewerEventHandlers.cpp
${OPENSCENEGRAPH_VERSIONINFO_RC}
)

SET(LIB_EXTRA_LIBS)

IF(WIN32 AND NOT ANDROID)
#
# Enable workaround for OpenGL driver issues when used in 
multithreaded/multiscreen with NVidia drivers on Windows XP 
# For example: osgviewer dumptruck.osg was showing total garbage (screen 
looked like shattered, splashed hedgehog) 
# There were also serious issues with render to texture cameras.
# Workaround repeats makeCurrentContext call as it was found that this 
causes the problems to dissapear.
#
OPTION(OSG_MULTIMONITOR_MULTITHREAD_WIN32_NVIDIA_WORKAROUND Set to ON if 
you have NVidia board and drivers earlier than 177.92 ver OFF)
MARK_AS_ADVANCED(OSG_MULTIMONITOR_MULTITHREAD_WIN32_NVIDIA_WORKAROUND)
IF(OSG_MULTIMONITOR_MULTITHREAD_WIN32_NVIDIA_WORKAROUND)
ADD_DEFINITIONS(-DOSG_MULTIMONITOR_MULTITHREAD_WIN32_NVIDIA_WORKAROUND)
ENDIF()

SET(TARGET_H ${TARGET_H}
${HEADER_PATH}/api/Win32/GraphicsHandleWin32
${HEADER_PATH}/api/Win32/GraphicsWindowWin32
${HEADER_PATH}/api/Win32/PixelBufferWin32
)

SET(LIB_COMMON_FILES ${LIB_COMMON_FILES} 
GraphicsWindowWin32.cpp
PixelBufferWin32.cpp
)
ELSE()
IF(APPLE)

IF(OSG_BUILD_PLATFORM_IPHONE OR OSG_BUILD_PLATFORM_IPHONE_SIMULATOR)
SET(OSG_WINDOWING_SYSTEM IOS CACHE STRING Windowing system type 
for graphics window creation, options only IOS.)
ELSE()
SET(OSG_WINDOWING_SYSTEM Carbon CACHE STRING Windowing system 
type for graphics window creation, options Carbon, Cocoa or X11.)
ENDIF()

ELSE()
IF(ANDROID)
SET(OSG_WINDOWING_SYSTEM None CACHE STRING None Windowing system 
type for graphics window creation.)
ELSE()
SET(OSG_WINDOWING_SYSTEM X11 CACHE STRING Windowing system type 
for graphics window creation. options only X11)
ENDIF()
ENDIF()

IF(${OSG_WINDOWING_SYSTEM} STREQUAL Cocoa)
ADD_DEFINITIONS(-DUSE_DARWIN_COCOA_IMPLEMENTATION)
 
IF(OSG_COMPILE_FRAMEWORKS)
   SET(LIB_COMMON_FILES ${LIB_COMMON_FILES} 
 ${HEADER_PATH}/api/Cocoa/GraphicsHandleCocoa
 ${HEADER_PATH}/api/Cocoa/GraphicsWindowCocoa
 ${HEADER_PATH}/api/Cocoa/PixelBufferCocoa
 )
SET_PROPERTY(SOURCE ${HEADER_PATH}/api/Cocoa/GraphicsHandleCocoa 
PROPERTY MACOSX_PACKAGE_LOCATION Headers/api/Cocoa) 
SET_PROPERTY(SOURCE ${HEADER_PATH}/api/Cocoa/GraphicsWindowCocoa 
PROPERTY MACOSX_PACKAGE_LOCATION Headers/api/Cocoa)
SET_PROPERTY(SOURCE ${HEADER_PATH}/api/Cocoa/PixelBufferCocoa 
PROPERTY MACOSX_PACKAGE_LOCATION Headers/api/Cocoa)

Re: [osg-users] [osg-submissions] Android Development Plans

2011-03-10 Thread Robert Osfield
Thanks Mourad, fix now merged and submitted to svn/trunk.

On Thu, Mar 10, 2011 at 2:30 PM, Mourad Boufarguine
mourad.boufargu...@gmail.com wrote:
 Hi all,

 I gave osg android port a try on Windows using cygwin, and it worked like a
 charm (only a tiny problem with osgViewer, when cross compiling for android
 using cygwin, the windows path in osgViewer/CMakeLists.txt is used rather
 than the android one, fix attached).
 For the moment I only compiled all the osg libs and plugins that don't rely
 on a 3rdParty lib. I will let you know when I succeed to build an app for my
 nexus S :) (the test apk Jorge sent, works for me)

 Thanks for your efforts.

 Mourad


 On Tue, Mar 8, 2011 at 5:37 PM, Robert Osfield robert.osfi...@gmail.com
 wrote:

 Hi Rafa, Jorge and all ;-)

 On Mon, Mar 7, 2011 at 11:53 AM, Rafa Gaitan rafa.gai...@gmail.com
 wrote:
  Finally Jorge and me have finished a first approach to build OSG under
  Android using the android NDK.
 
  Attached you will find all required code and cmake modifications (They
  are based on a previous submissions I sent last week).

 Many thanks for your efforts.  I have now merged and checked in
 changes to OpenSceneGraph svn/trunk.  I haven't tested the Android
 build at all yet, only the normal Linux build side.

 Would it be possible for you to put up a documentation page on the
 wiki to show how to set up to build the OSG on Android?

 Thanks,
 Robert.
 ___
 osg-submissions mailing list
 osg-submissi...@lists.openscenegraph.org

 http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org


 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osg-submissions] Android Development Plans

2011-03-08 Thread Rafa Gaitan
Hi Robert,

Thank you very much for reviewing!, We will include some documentation
on the wiki, but I have some work trips this weeks so probably Jorge
will do the most part.

Rafa.


2011/3/8 Robert Osfield robert.osfi...@gmail.com:
 Hi Rafa, Jorge and all ;-)

 On Mon, Mar 7, 2011 at 11:53 AM, Rafa Gaitan rafa.gai...@gmail.com wrote:
 Finally Jorge and me have finished a first approach to build OSG under
 Android using the android NDK.

 Attached you will find all required code and cmake modifications (They
 are based on a previous submissions I sent last week).

 Many thanks for your efforts.  I have now merged and checked in
 changes to OpenSceneGraph svn/trunk.  I haven't tested the Android
 build at all yet, only the normal Linux build side.

 Would it be possible for you to put up a documentation page on the
 wiki to show how to set up to build the OSG on Android?

 Thanks,
 Robert.
 ___
 osg-submissions mailing list
 osg-submissi...@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org




-- 
Rafael Gaitán Linares
Instituto de Automática e Informática Industrial  http://www.ai2.upv.es
http://gvsig3d.blogspot.com
Ciudad Politécnica de la Innovación
Universidad Politécnica de Valencia
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org