Re: [osg-users] (no subject)

2015-05-25 Thread Robert Osfield
Hi Joshua,

I'm not sure what you mean by video canvas.  If you want to render a
video as a texture on a geometry then the osgmovie example is the place to
look.

Robert.

On 24 May 2015 at 21:39, Joshua Robinson shooki.robin...@gmail.com wrote:


 Howdy OSG-Users  Volcans,

 I am a newbie to OSG and need help to do :

 Add a video canvas to scale the video. It should do :
 1) Create a video canvas.
 2) Assign texture coordinates to the video canvas, I prefer manually, it
 can be automatically (function).
 Specify the number of columns and rows on your own, need to have more
 than 2.
 3) Use texture coordinate  video image rendering.

 I have no idea how, a small sample(s) code will be appreciate .

 Cheers, (oyori),
 -Joshua Robinson
 PS.  Live long and prosper.

 ___
 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] Shadows : Creating multiple osgShadow::ShadowedScene

2015-05-25 Thread Robert Osfield
Hi Robert,

osgShadow doesn't currently have an ShadowTechniques that support
multiple light sources, the closest to this is the
ViewDependentShadowMap with it's support for multiple shadow maps,
which currently is related to it's support of depth partitioning of
the shadow map, but I've had it in mind that this would be generalized
at a later date to support multiple light sources as well.   This
would require support in the shaders as well as the .cpp.

Have a look at how it's implemented.  You could implement your own
ShadowTechinque using a similar approach, or subclass from
ViewDependentShadowMap.  I wouldn't recommend the approach you are
suggesting though, using multiple ShadowedScene's would just
complicate implementation and usage.

Robert.

On 25 May 2015 at 02:26, Robert Graf muzzlebu...@gmail.com wrote:
 Howdy all,

 What is a way to have a ShadowedScene update just its shadow texture unit in 
 the pre-render for its children, and not have its children rendered during 
 the main viewer pass?

 I'd like to set up multiple lights, each with its own shadow map. Each 
 light/shadowmap combination will be a ShadowedScene. These ShadowedScene's 
 will be pre-rendered, each in their own shadow map texture unit. Then in the 
 main viewer pass, a custom fragment shader will use the different shadow map 
 texture units for shadowing. For the main viewer pass, only the regular scene 
 will be rendered, not any of the shadowed_scene's.

 The scene would look something like this:

 - root
 |--- shadowed_scene1
 | |--- scene
 |--- shadowed_scene2
 | |--- scene
 |--- shadowed_scene3
 | |--- scene
 |--- scene

 Thanks!
 -Robert

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=63804#63804





 ___
 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] Android osgPlugins

2015-05-25 Thread Christian Kehl
Hi,

I still didn't get it to work. I spoke with an Android developer the recent 
days, told him the problem. His suggestion: move the requested library files in 
the libs-folder of your project, which is how the Android jni usually works. 
Said and done, I created a folder in osgSimple called libs and copied the 
OpenSceneGraph 3.3.8 library files (static libraries) into the libs folder. 
Unfortunately, I still get the same error, the app searches for the dynamic 
library (at least according to LogCat). Any further ideas ? I can still try a 
dynamic compile of OSG 3.3.8 and compile osgAndroid from there on again, but I 
don't know how promising that may be. Thing is: the osgAndroid compile itself 
is fine because the gray render window is created. It is just that the plugins 
are not found by the Android system ...

Thank you!

Cheers,
Christian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63808#63808



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


[osg-users] Android + multiple views

2015-05-25 Thread Robert Gosztyla
Hi,

I'm developing simple Android app, with two separate views using osg. Got 
problem with simultaneously running these two. Whole code is based on existing 
examples in osg distribution (osgAndroidExampleGLES1 and 
osgAndroidExampleGLES2). Ii'm putting on layout two views (like ELGView class 
from above examples) and got application crash. I was trying to adopt somehow 
osgcompositeviewer example, but it isn't working even with single view. Anyone 
can direct me to working example with two separate GL views, both using OSG on 
the same layout? Hints are also highly welcome.

Thank you!

Cheers,
Robert

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63809#63809





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


Re: [osg-users] Android osgPlugins

2015-05-25 Thread Jan Ciger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 05/25/2015 11:10 AM, Christian Kehl wrote:
 Hi,
 
 I still didn't get it to work. I spoke with an Android developer
 the recent days, told him the problem. His suggestion: move the
 requested library files in the libs-folder of your project, which
 is how the Android jni usually works. Said and done, I created a
 folder in osgSimple called libs and copied the OpenSceneGraph
 3.3.8 library files (static libraries) into the libs folder.

That is unlikely to work - that is used if you want to preload the
DLLs (.so files) from the Java code, not static libraries - those
cannot be loaded into the running program dynamically anyway.

To me it seems that you have OSG compiled incorrectly for some reason
and it is trying to load the plugins dynamically (that's osgDB doing
it, not Android) instead of having them statically linked. Or you
don't have them registered correctly, so it falls back to searching
for the dynamic libraries because it doesn't have any plugin to load
that file extension.

It is a weird problem, perhaps there is something broken in recent OSG
versions. I suggest that you try to step through the osgDB code with
the debugger and see why is it attempting to load a plugin dynamically.

Regards,

Jan



-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iD8DBQFVY05Cn11XseNj94gRAkBmAKCEZt5o5AzW+Z2Z3O249qIhDyGbeACeNEBN
2Vp7QdfmqxpkD68/Yxd0cUM=
=ihyv
-END PGP SIGNATURE-
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-05-25 Thread Jan Ciger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 05/25/2015 07:00 PM, Christian Kehl wrote:
 Hi Jan,
 
 I join your thinking. The compilation is done using the cmake line 
 from Rafa (see post  Sat May 02, 2015 7:48 am), and because it 
 compiles OSG as static, I somehow doubt the compilation is wrong. 
 That said, you may be right that the library is registered 
 incorrectly. Thing is: I have multiple installs of OSG, as many of
 us do. One is the osg from the package manager, the other one is
 the android 3.3.8 OSG one, and then some more local ones. The funny
 point is that the Android.mk specifies all paths as absolute paths,
 so when one calls the ndk-build, it obviously takes the right
 libraries, as it always should. But when I run the osgSimple, I do
 this from Eclipse, which usually links the resources to the
 /usr/lib libraries.

How did you determine that Eclipse usually links the resources to
/usr/lib libraries?

Those are likely for your desktop machine, unless you have installed
the Android version of OSG there. If you are using the Eclipse Android
development plugin, it will not touch those - different architecture
and all. It wouldn't even link if you were mixing architectures.

 Because there are no compilation complains and because the
 osgAndroid project is statically referred to by osgSimple, it
 obviously takes that jar-file from its absolute destination.

Uhm, how did you figure this out? I am quite not following, to be
honest. If your plugins are missing and they are compiled as dynamic,
for whatever reason, you *will not* get a compilation/linking error!

 Question is: How do I tell the Android eclipse builder to link all
 inter-dep ending library files (osgPlugins-3.3.8) from a specific
 location and NOT to get them from the global /usr/lib location ? I
 am lacking the in-depth knowledge on how to configure the apk
 builder within Eclipse to change its behaviour. Any hint would be
 very much appreciated ...

You need to modify the Android.mk file in your jni directory normally.
That's where you specify where the dependencies are and what to link.
Eclipse doesn't do any magic there - it just calls ndk-build and that
one in turn calls make.

However, I do feel that you have quite a mess on your workstation - I
would strongly suggest to remove all the various versions of OSG (e.g.
move them out of the way, rename them, etc.) to make sure you have
only the Android one present. And then try to build the thing.

Best regards,

J.


-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iD8DBQFVY1swn11XseNj94gRAghbAKCCp3SJhmU4ZjC5xLf17fS4KeJlXwCgwdlG
q69dCxNswf1mraBK5meZ6H0=
=dXi1
-END PGP SIGNATURE-
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Android osgPlugins

2015-05-25 Thread Christian Kehl
Hi Jan,

I join your thinking. The compilation is done using the cmake line from Rafa 
(see post  Sat May 02, 2015 7:48 am), and because it compiles OSG as static, I 
somehow doubt the compilation is wrong. That said, you may be right that the 
library is registered incorrectly. Thing is: I have multiple installs of OSG, 
as many of us do. One is the osg from the package manager, the other one is the 
android 3.3.8 OSG one, and then some more local ones. The funny point is that 
the Android.mk specifies all paths as absolute paths, so when one calls the 
ndk-build, it obviously takes the right libraries, as it always should. But 
when I run the osgSimple, I do this from Eclipse, which usually links the 
resources to the /usr/lib libraries. Because there are no compilation complains 
and because the osgAndroid project is statically referred to by osgSimple, it 
obviously takes that jar-file from its absolute destination. Question is: How 
do I tell the Android eclipse builder to link all inter-dep
 ending library files (osgPlugins-3.3.8) from a specific location and NOT to 
get them from the global /usr/lib location ? I am lacking the in-depth 
knowledge on how to configure the apk builder within Eclipse to change its 
behaviour. Any hint would be very much appreciated ...

Cheers,
Christian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63812#63812





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


Re: [osg-users] Android osgPlugins

2015-05-25 Thread Jan Ciger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 05/25/2015 07:00 PM, Christian Kehl wrote:
 Hi Jan,
 
 But when I run the osgSimple,

I have just realized - are you attempting to build an OSG Android app
from scratch? You shouldn't do that - take the osgAndroidExampleGLES1
or osgAndroidExampleGLES2 instead, there you have the makefiles and
path configured correctly already.

If you are trying to port osgSimple as-is, that will not work right
without a lot of work. Eclipse *will not* set your build system for
the NDK part by itself correctly.

Regards,

Jan

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iD8DBQFVY12Gn11XseNj94gRAvTqAJ9FvMC5LDmKuJ4jB9weMDBhBLadLgCgoa/6
hyuJhQf+TfTgQa4w2skhln8=
=3QaS
-END PGP SIGNATURE-
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] undefined reference

2015-05-25 Thread Joshua Robinson
Howdy Romulans  Vulcans,

Newbie to OSG, trying to compile sample program osgWidget, get the
following error ... any help is appreciated.

undefined reference to `osgWidget::Widget::addColor(float, float, float,
float, osgWidget::Widget::Corner)'

##
#cmake file - For ALL myProjects
#
cmake_minimum_required(VERSION 2.8)
set(PROJECT_VERSION 1.0)
set(EXECUTABLE_OUTPUT_PATH ./ )
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} /usr/local/lib/cmake/
/usr/lib/cmake)
set(PROJECT_NAME home-prj01)
#
project(${PROJECT_NAME})
#
include_directories(${GNULIBS_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}
${GLUT_INCLUDE_DIRS}
${AR_DIRS} ${OpenCV_INCLUDE_DIRS}
${OPENSCENEGRAPH_INCLUDE_DIRS} ./dep/include)
# Find Packages
FIND_PACKAGE(OpenGL REQUIRED)
FIND_PACKAGE(OpenSceneGraph REQUIRED)
FIND_PACKAGE(osgREQUIRED)
FIND_PACKAGE(osgDB  REQUIRED)
FIND_PACKAGE(osgGA  REQUIRED)
FIND_PACKAGE(osgViewer  REQUIRED)
FIND_PACKAGE(osgWidget  REQUIRED)
FIND_PACKAGE(osgUtilREQUIRED)
FIND_PACKAGE(OpenThreadsREQUIRED)
FIND_PACKAGE(OpenCV REQUIRED)
FIND_PACKAGE(aruco  REQUIRED)
#
file( GLOB SOURCE *.h osgWidgetCanvas.cpp )
#
set(myOGL_LIBS ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})
set(myOSG_LIBS ${OSG_LIBRARY} ${OSG_LIBS} ${OSGGA_LIBRARY} ${OSGDB_LIBRARY}
 ${OSGVIEWER_LIBRARY} ${OSGUTIL_LIBRARY} ${OSG}
 ${OPENSCENEGRAPH_LIBRARIES} ${OPENTHREADS_LIBRARY})
set(myAR_LIBS ${aruco_LIBS})
set(myOCV_LIB ${OpenCV_LIBS})
set(ALL_LIBRARIES ${myOGL_LIBS} ${myOSG_LIBS} ${myOCV_LIBS} ${myAR_LIBS})
#
link_directories(${OpenCV_LIB_DIR} ${OPENSCENEGRAPH_LIBRARY_DIR}
./dep/lib)
add_executable(${PROJECT_NAME} ${SOURCE})
target_link_libraries(${PROJECT_NAME} ${ALL_LIBRARIES})
# end



What library  am I missing ?


Cheers,
-Joshua Robinson
Live long and prosper - Spock, a volcan.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org