[osg-users] Video display problem on Andoid

2013-07-25 Thread Koduri Lakshmi
Hi,

I am trying to play the video on android device.  I did the coding as follows.

in .H file.


Code:
osg::ref_ptrosg::Geode geode;
osg::ref_ptrosg::Texture2D mVideoTexture;
osg::Image* img;
osg::ref_ptrosg::ImageStream videoStream[2];
osg::ref_ptrosg::MatrixTransform mtForMarker[2];
osg::ref_ptrosg::Switch modelSwitch;




In .CPP file


Code:
int idx=0;
img = osgDB::readImageFile(1.mp4.mpeg);
videoStream[idx] = dynamic_castosg::ImageStream*(img);
if (videoStream[idx].valid())
{
LOG( Got movie);
videoStream[idx]-setLoopingMode( osg::ImageStream::NO_LOOPING);
videoStream[idx]-seek(0);
videoStream[idx]-play();
}
else
   {
  LOG( No movie!);
   }
aspectRatio = (float)img-t() / (float)img-s();
 videoWidth = img-s();
 videoHeight =videoWidth * aspectRatio;

 mVideoTexture = new osg::Texture2D;
 geode = new osg::Geode;
 mVideoTexture-setImage( videoStream[idx].get() );

 geode-addDrawable(osg::createTexturedQuadGeometry(
 osg::Vec3(0.0f, 0.0f, 0.0f),
 osg::Vec3(videoWidth, 0.0f, 0.0f),
 osg::Vec3(0.0f, 0.0f, videoHeight)

 ));
geode-getOrCreateStateSet()-setTextureAttributeAndModes(0, mVideoTexture, 
osg::StateAttribute::ON );

mtForMarker[idx] = new osg::MatrixTransform();
mtForMarker[idx]-addChild(geode.get());


 modelSwitch-addChild(mtForMarker[idx]);




With this code the video displayed in  a small size (like 50X50) around the 
centre of the device (Not exactly at the centre of the device). The original 
video size is 640X480. Video is also displaying in upside down.

I am sung ffmpeg plug in for android. 

Can you please suggest me what could be the mistake.
... 

Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] [build] How to play Video on Android

2013-02-09 Thread Koduri Lakshmi
Hi,

The log is


Code:
02-09 14:01:41.114: W/Osg Viewer(14026): FFmpegImageStream::open : 
av_open_input_file() failed
02-09 14:01:41.118: W/Osg Viewer(14026): Warning: Could not find plugin to read 
objects from file /mnt/sdcard/VideoTest/1.avi.ffmpeg.



The steps what I followed to generate osg ffmpeg plugin

Step - 1) Downloaded ffmpeg1.0 from ffmpeg site and extracted to ffmpeg 
flolder.  
  (renamed time.h to avtime.h of libavutil to avoid OSG compile 
errors)

Step - 2) Executed the following script to generate armv7 libs  (for Android 
2.2)


Code:
NDK=/home/ttpl/Android/android-ndk-r8b
PLATFORM=$NDK/platforms/android-8/arch-arm
PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86

function build_one
{
./configure --target-os=linux \
--prefix=$PREFIX \
--enable-cross-compile \
--extra-libs=-lgcc \
--arch=arm \
--cc=$PREBUILT/bin/arm-linux-androideabi-gcc \
--cross-prefix=$PREBUILT/bin/arm-linux-androideabi- \
--nm=$PREBUILT/bin/arm-linux-androideabi-nm \
--sysroot=$PLATFORM \
--extra-cflags= -O3 -fpic -DANDROID -DHAVE_SYS_UIO_H=1 
-Dipv6mr_interface=ipv6mr_ifindex -fasm -Wno-psabi -fno-short-enums 
-fno-strict-aliasing -finline-limit=300 $OPTIMIZE_CFLAGS  \
--disable-shared \
--enable-static \
--extra-ldflags=-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib 
-nostdlib -lc -lm -ldl -llog \
--disable-everything \
--enable-demuxer=mov \
--enable-demuxer=h264 \
--disable-ffplay \
--enable-protocol=file \
--enable-avformat \
--enable-avcodec \
--enable-decoder=rawvideo \
--enable-decoder=mjpeg \
--enable-decoder=h263 \
--enable-decoder=mpeg4 \
--enable-decoder=h264 \
--enable-parser=h264 \
--disable-network \
--enable-zlib \
--disable-avfilter \
--enable-avdevice \
$ADDITIONAL_CONFIGURE_FLAG

make clean
make  -j4 install
$PREBUILT/bin/arm-linux-androideabi-ar d libavcodec/libavcodec.a inverse.o
$PREBUILT/bin/arm-linux-androideabi-ld -rpath-link=$PLATFORM/usr/lib 
-L$PLATFORM/usr/lib  -soname libffmpeg.so -shared -nostdlib  -z,noexecstack 
-Bsymbolic --whole-archive --no-undefined -o $PREFIX/libffmpeg.so 
libavcodec/libavcodec.a libavformat/libavformat.a libavutil/libavutil.a 
libswscale/libswscale.a -lc -lm -lz -ldl -llog  --warn-once  
--dynamic-linker=/system/bin/linker 
$PREBUILT/lib/gcc/arm-linux-androideabi/4.4.3/libgcc.a
}

#arm v6
#CPU=armv6
#OPTIMIZE_CFLAGS=-marm -march=$CPU
#PREFIX=./android/$CPU 
#ADDITIONAL_CONFIGURE_FLAG=
#build_one

#arm v7vfpv3
CPU=armv7-a
OPTIMIZE_CFLAGS=-mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=$CPU 
PREFIX=./android/$CPU
ADDITIONAL_CONFIGURE_FLAG=
build_one



Step -3) This generated libavcodec.a, libavdevice.a, libavformate.a, 
libutil.a, libswresample.a and libswscale.a into the folder 
./android/armv7-a/lib. Also libffmpeg.so 
 in ./Android/armv7-a folder.

Step - 4) Copied all these .a files and pkconfig folder to 
/home/ttpl/Android/OSGSupport/ffmpeg folder

Step -5) Extracted OSG3.0.1 and created build directory in it. Added  
FIND_PACKAGE(FFmpeg) after ANDROID_3RD_PARTY() to CMakeList.txt file

Step -6) Gave the following cmake command


Code:
cmake .. -DOSG_BUILD_PLATFORM_ANDROID=ON -DDYNAMIC_OPENTHREADS=OFF 
-DDYNAMIC_OPENSCENEGRAPH=OFF -DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF 
-DOSG_GL_MATRICES_AVAILABLE=ON -DOSG_GL_VERTEX_FUNCS_AVAILABLE=ON 
-DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE=ON -DOSG_GL_FIXED_FUNCTION_AVAILABLE=ON 
-DOSG_CPP_EXCEPTIONS_AVAILABLE=OFF -DOSG_GL1_AVAILABLE=OFF
-DFFMPEG_LIBAVCODEC_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg 
-DFFMPEG_LIBAVCODEC_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavcodec.a 
 -DFFMPEG_LIBAVDEVICE_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg   
-DFFMPEG_LIBAVDEVICE_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavdevice.a
 -DFFMPEG_LIBAVFORMAT_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg 
-DFFMPEG_LIBAVFORMAT_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavformat.a
 -DFFMPEG_LIBAVUTIL_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg 
-DFFMPEG_LIBAVUTIL_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavutil.a 
-DFFMPEG_LIBSWSCALE_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg 
-DFFMPEG_LIBSWSCALE_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libswscale.a 
-DFFMPEG_ROOT=/home/ttpl/Android/OSGSupport/ffmpeg
-DOSG_GL2_AVAILABLE=OFF -DOSG_GL3_AVAILABLE=OFF -DOSG_GLES1_AVAILABLE=ON 
-DOSG_GLES2_AVAILABLE=OFF -DCMAKE_CXX_FLAGS=-D__STDC_CONSTANT_MACROS -DJ=4 
-DCMAKE_INSTALL_PREFIX=/home/ttpl/Android/OpenSceneGraph-3.0.1_GL/osginstall



Step -7) make installed all files to 
/home/ttpl/Android/OpenSceneGraph-3.0.1_GL/osginstall which includes 
libosgdb_ffmpeg.a plugin in both armeabi and armeabi-v7a folders

Step -8) Created an android project from the existed (OpenGLES1) example.

Step -9) Modified Android.mk file as follows. Given only modifications


Code:
   OSG_ANDROID_DIR  :=  

Re: [osg-users] [build] How to play Video on Android

2013-02-05 Thread Koduri Lakshmi
Hi Jordi Torres  David Longest,

Thank you very much for the valuable information.

I compiled successfully. When try to read a avi file then 
osgDB::readImageFile always returns NULL.

Does ffmpeg plug-in needs any external .so or .a files (like PNG needs 
libpng15.dll with osgdb_png.dll).

 I tried to place ffmpeg.so file in  AndroidProject lib folder. And also 
tried with   libavformat.a libavcodec.a etc. Still no luck.

Please excuse me if it is very basic question. I am very much new to android 
and trying to port windows project to Android.


... 


Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] [build] How to play Video on Android

2013-02-01 Thread Koduri Lakshmi
Hi Jordi Torres and Jan Ciger,

Thank you very much for the reply.

I downloaded ffmpeg1.0 from FFmpeg site. Now compiled statically to generate 
.a files. I generated 

/armeabi-v7a/libavformat.a
/armeabi-v7a/libavcodec.a
/armeabi-v7a/libavdevice.a
/armeabi-v7a/libswscale.a
l/armeabi-v7a/libavutil.a
/armeabi-v7a/libswresample.a
/armeabi-v7a/libswresample.a.

After this I downloaded the  latest submission for ffmpeg plugin (by David 
Longest  dated Oct 09, 2012). Replaced all files of this to 
$OSG/src/plugins/ffmpeg folder. Now I gave the following cmake command


Code:
cmake .. -DOSG_BUILD_PLATFORM_ANDROID=ON -DDYNAMIC_OPENTHREADS=OFF 
-DDYNAMIC_OPENSCENEGRAPH=OFF -DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF 
-DOSG_GL_MATRICES_AVAILABLE=ON -DOSG_GL_VERTEX_FUNCS_AVAILABLE=ON 
-DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE=ON -DOSG_GL_FIXED_FUNCTION_AVAILABLE=ON 
-DOSG_CPP_EXCEPTIONS_AVAILABLE=OFF -DOSG_GL1_AVAILABLE=OFF

 -DFFMPEG_LIBAVCODEC_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg 
-DFFMPEG_LIBAVCODEC_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavcodec.a 
 -DFFMPEG_LIBAVDEVICE_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg   
-DFFMPEG_LIBAVDEVICE_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavdevice.a
 -DFFMPEG_LIBAVFORMAT_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg 
-DFFMPEG_LIBAVFORMAT_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavformat.a
 -DFFMPEG_LIBAVUTIL_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg 
-DFFMPEG_LIBAVUTIL_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavutil.a 
-DFFMPEG_LIBSWSCALE_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg 
-DFFMPEG_LIBSWSCALE_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libswscale.a 
-DFFMPEG_ROOT=/home/ttpl/Android/OSGSupport/ffmpeg

-DOSG_GL2_AVAILABLE=OFF -DOSG_GL3_AVAILABLE=OFF -DOSG_GLES1_AVAILABLE=ON 
-DOSG_GLES2_AVAILABLE=OFF -DCMAKE_CXX_FLAGS=__STDC_CONSTANT_MACROS -DJ=4 
-DCMAKE_INSTALL_PREFIX=/home/ttpl/Android/OpenSceneGraph-3.0.1_GL1/osginstall 



Faced some error and solved them. 

make install installed all include and lib files to 
/home/ttpl/Android/OpenSceneGraph-3.0.1_GL1/osginstall folder.

I gave /home/ttpl/Android/OpenSceneGraph-3.0.1_GL1/osginstall  path as 
OSG_ANDROID_DIR in Android.mk files.

As of my knowledge to use ffmpeg plugin I should use USE_OSGPLUGIN() macro. 
Here I am facing problem. I dont have much idea how to use this plugin.

Can you please help me how to link ffmpeg plugin for Android.

... 


Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] [build] How to play Video on Android

2013-02-01 Thread Koduri Lakshmi
Hi Jordi Torres,

Thank you very much for the help. I did that in .cpp file as follows


 
Code:
   img = osgDB::readImageFile(filename);
videoStream[idx] = dynamic_castosg::ImageStream*(img);

if (videoStream[idx].valid())
{
LOG( Got movie);
videoStream[idx]-setLoopingMode( osg::ImageStream::NO_LOOPING);

}
else
   {
  LOG( No movie!);
   }

 aspectRatio = (float)img-t() / (float)img-s();
 videoWidth = img-t();
 videoHeight =img-s();

 mVideoTexture = new osg::Texture2D;
 geode = new osg::Geode;
 mVideoTexture-setImage( videoStream[idx].get() );

 geode-addDrawable(osg::createTexturedQuadGeometry(
 osg::Vec3(0, 0, 0),
 osg::Vec3(videoWidth, 0, 0),
 osg::Vec3(0, 0, videoHeight)
 ));
geode-getOrCreateStateSet()-setTextureAttributeAndModes(0, 
mVideoTexture, osg::StateAttribute::ON );
mtForMarker[idx] = new osg::MatrixTransform();
 mtForMarker[idx]-addChild(geode.get());


 modelSwitch-addChild(mtForMarker[idx]);




but it is not compiling. When I gave nkd-build then getting above said 
errors. I think these are linker errors. How to use ffmpeg plugin-in my code.



... 


Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] [build] How to play Video on Android

2013-02-01 Thread Koduri Lakshmi
Hi Jordi Torres,

When I use jpeg plugin, I did the following things

1) USE_OSGPLUGIN(jpeg) in  .h file
2) Added -ljpeg to LOCAL_LDLIBS in Android.mk file
3) Added -losgdb_jpeg \ to LOCAL_LDFLAGS in Android.mk file.

Similarly I need to do for ffmpeg plugin also.

I added -lffmpeg to LOCAL_LDLIBS and  -losgdb_ffmpeg\ to LOCAL_LDFLAGS in 
Android.mk file. And added USE_OSGPLUGIN(ffmpeg) in  .h file. After ndk-build I 
am getting 


Code:
cannot find -lffmpeg 



If I remove -lffmpeg to LOCAL_LDLIBS then the above said errors.

What steps do I need to take to use ffmpeg plugin.
Does am I going in correct way.

I will dig more if the steps what I did are correct. Can you please guide me in 
correct way.
... 


Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] [build] How to play Video on Android

2013-01-31 Thread Koduri Lakshmi
Hi Jordi Torres, 

I build ffmpeg1.0 with OSG3.0.1 for Android (for armv7-a) device. When build 
example I am getting the errors  like undefined reference to 
`av_log_set_callback.

I Added USE_OSGPLUGIN(ffmpeg) to .h file and added ldflag as -losgdb_ffmpeg 
to Android.mk file.

 Here are the full error log


Code:
Install: libQCAR.so = libs/armeabi/libQCAR.so
Compile++ arm: TrikonaQCAREdu = Tracker.cpp
In file included from jni/osgModel.hpp:80:0,
 from jni/Tracker.cpp:3:
/home/ttpl/Android/android-ndk-r8b/platforms/android-5/arch-arm/usr/include/jni.h:592:13:
 note: the mangling of 'va_list' has changed in GCC 4.4
Compile++ arm: TrikonaQCAREdu = osgModel.cpp
In file included from jni/osgModel.hpp:80:0,
 from jni/osgModel.cpp:1:
/home/ttpl/Android/android-ndk-r8b/platforms/android-5/arch-arm/usr/include/jni.h:592:13:
 note: the mangling of 'va_list' has changed in GCC 4.4
Compile++ arm: TrikonaQCAREdu = SampleUtils.cpp
SharedLibrary  : libTrikonaQCAREdu.so
/home/ttpl/Android/OpenSceneGraph-3.0.1_GL1/osginstall/obj/local/armeabi/libosgdb_ffmpeg.a(ReaderWriterFFmpeg.o):
 In function `ReaderWriterFFmpeg':
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp:107:
 undefined reference to `av_log_set_callback'
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp:111:
 undefined reference to `av_lockmgr_register'
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp:114:
 undefined reference to `av_register_all'
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp:116:
 undefined reference to `avformat_network_init'
/home/ttpl/Android/OpenSceneGraph-3.0.1_GL1/osginstall/obj/local/armeabi/libosgdb_ffmpeg.a(FFmpegParameters.o):
 In function `~FFmpegParameters':
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegParameters.cpp:40:
 undefined reference to `av_dict_free'
/home/ttpl/Android/OpenSceneGraph-3.0.1_GL1/osginstall/obj/local/armeabi/libosgdb_ffmpeg.a(FFmpegParameters.o):
 In function `FFmpegParameters':
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegParameters.cpp:35:
 undefined reference to `av_dict_set'
/home/ttpl/Android/OpenSceneGraph-3.0.1_GL1/osginstall/obj/local/armeabi/libosgdb_ffmpeg.a(FFmpegParameters.o):
 In function `osgFFmpeg::FFmpegParameters::parse(std::basic_stringchar, 
std::char_traitschar, std::allocatorchar  const, std::basic_stringchar, 
std::char_traitschar, std::allocatorchar  const)':
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegParameters.cpp:62:
 undefined reference to `av_dict_set'
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegParameters.cpp:55:
 undefined reference to `av_find_input_format'
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegParameters.cpp:60:
 undefined reference to `av_dict_set'
/home/ttpl/Android/OpenSceneGraph-3.0.1_GL1/osginstall/obj/local/armeabi/libosgdb_ffmpeg.a(FFmpegDecoderAudio.o):
 In function `osgFFmpeg::FFmpegDecoderAudio::open(AVStream*)':
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp:82:
 undefined reference to `avcodec_find_decoder'
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp:92:
 undefined reference to `avcodec_open'
/home/ttpl/Android/OpenSceneGraph-3.0.1_GL1/osginstall/obj/local/armeabi/libosgdb_ffmpeg.a(FFmpegDecoderAudio.o):
 In function `decode_audio':
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp:24:
 undefined reference to `av_init_packet'
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp:28:
 undefined reference to `avcodec_decode_audio3'
/home/ttpl/Android/OpenSceneGraph-3.0.1_GL1/osginstall/obj/local/armeabi/libosgdb_ffmpeg.a(FFmpegDecoderAudio.o):
 In function `osgFFmpeg::FFmpegPacket::clear()':
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegPacket.hpp:45:
 undefined reference to `av_free_packet'
/home/ttpl/Android/OpenSceneGraph-3.0.1_GL1/osginstall/obj/local/armeabi/libosgdb_ffmpeg.a(FFmpegDecoderAudio.o):
 In function `osgFFmpeg::FFmpegDecoderAudio::decodeFrame(void*, unsigned int)':
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp:356:
 undefined reference to `avcodec_flush_buffers'
/home/ttpl/Android/OpenSceneGraph-3.0.1_GL1/osginstall/obj/local/armeabi/libosgdb_ffmpeg.a(FFmpegDecoderAudio.o):
 In function `osgFFmpeg::FFmpegPacket::clear()':
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegPacket.hpp:45:
 undefined reference to `av_free_packet'

Re: [osg-users] [build] [Tutorial] Building osgAndroidExampleGLES1/2 on Ubuntu 11.10

2013-01-30 Thread Koduri Lakshmi
Hi,

I downloaded latest ffmpeg submission, replaced all files in 
/src/plugins/ffmpeg folder  and compiled. I am getting the following error.


Code:
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegHeaders.hpp:11:32:
 fatal error: libavcodec/avcodec.h: No such file or directory




It seems the system is not able locate FFMPEG include directories.  Do I need 
to change anything in FindFfmpeg.cmake files. As I am not having much 
knowledge in make files I am not able to located it. 

I am using ffmpeg0.8.12 and nkd8. I red in OSG fourms that ffmpeg0.8.4 is 
compatable with OSG. But it is not available in ffmpeg site. We have only 
ffmpeg0.0.12. 

The cmake command which I gave is 


Code:
cmake .. -DOSG_BUILD_PLATFORM_ANDROID=ON -DDYNAMIC_OPENTHREADS=OFF 
-DDYNAMIC_OPENSCENEGRAPH=OFF -DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF 
-DOSG_GL_MATRICES_AVAILABLE=ON -DOSG_GL_VERTEX_FUNCS_AVAILABLE=ON 
-DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE=ON -DOSG_GL_FIXED_FUNCTION_AVAILABLE=ON 
-DOSG_CPP_EXCEPTIONS_AVAILABLE=OFF -DOSG_GL1_AVAILABLE=OFF

-DFFMPEG_LIBAVCODEC_INCLUDE_DIR=/home/ttpl/Android/OSGSupport/ffmpeg/libavcodec/include
 
-DFFMPEG_LIBAVCODEC_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavcodec.a 
  
-DFFMPEG_LIBAVDEVICE_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg/libavdevice/include
  
-DFFMPEG_LIBAVDEVICE_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavdevice.a
  
-DFFMPEG_LIBAVFORMAT_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg/libavformat/include
 
-DFFMPEG_LIBAVFORMAT_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavformat.a
 
-DFFMPEG_LIBAVUTIL_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg/libavutil/include
 -DFFMPEG_LIBAVUTIL_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavutil.a 
-DFFMPEG_LIBSWSCALE_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg/libswscale/include
 
-DFFMPEG_LIBSWSCALE_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libswscale.a 
-DFFMPEG_ROOT=/home/ttpl/Android/OSGSupport/ffmpeg -DOSG_GL2_AVAILABLE=OFF

-DOSG_GL3_AVAILABLE=OFF -DOSG_GLES1_AVAILABLE=ON -DOSG_GLES2_AVAILABLE=OFF 
-DJ=4 
-DCMAKE_INSTALL_PREFIX=/home/ttpl/Android/OpenSceneGraph-3.0.1_GL1/osginstall 



Can you please help in this?

Errors list


Code:
Compile++ thumb  : osgdb_ffmpeg = FFmpegClocks.cpp
Compile++ thumb  : osgdb_ffmpeg = FFmpegDecoderAudio.cpp
Compile++ thumb  : osgdb_ffmpeg = FFmpegDecoder.cpp
Compile++ thumb  : osgdb_ffmpeg = FFmpegDecoderVideo.cpp
In file included from 
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegClocks.hpp:10:0,
 from 
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegClocks.cpp:2:
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegHeaders.hpp:11:32:
 fatal error: libavcodec/avcodec.h: No such file or directory
compilation terminated.
make[3]: *** [obj/local/armeabi/objs/osgdb_ffmpeg/FFmpegClocks.o] Error 1
make[3]: *** Waiting for unfinished jobs
In file included from 
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp:6:0,
 from 
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:1:
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegHeaders.hpp:11:32:
 fatal error: libavcodec/avcodec.h: No such file or directory
compilation terminated.
make[3]: *** [obj/local/armeabi/objs/osgdb_ffmpeg/FFmpegDecoderVideo.o] Error 1
In file included from 
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegClocks.hpp:10:0,
 from 
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp:9,
 from 
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegDecoder.hpp:5,
 from 
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp:2:
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegHeaders.hpp:11:32:
 fatal error: libavcodec/avcodec.h: No such file or directory
compilation terminated.
make[3]: *** [obj/local/armeabi/objs/osgdb_ffmpeg/FFmpegDecoder.o] Error 1
In file included from 
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegClocks.hpp:10:0,
 from 
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp:9,
 from 
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp:1:
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegHeaders.hpp:11:32:
 fatal error: libavcodec/avcodec.h: No such file or directory
compilation terminated.
make[3]: *** [obj/local/armeabi/objs/osgdb_ffmpeg/FFmpegDecoderAudio.o] Error 1
make[2]: *** 

Re: [osg-users] [build] Android Compile Errors with 3rd Party library

2013-01-29 Thread Koduri Lakshmi
Hi,

Yes, I completed. I successfully loaded a model on my device with QCAR + OSG.
... 


Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] [build] [Tutorial] Building osgAndroidExampleGLES1/2 on Ubuntu 11.10

2013-01-29 Thread Koduri Lakshmi
Hi,

When I try to compile OSG for Android with FFMPEG plug-in I am getting 
following cmake warnings.

CMake Warning:
  Manually-specified variables were not used by the project:

 FFMPEG_LIBAVCODEC_INCLUDE_DIR
FFMPEG_LIBAVCODEC_LIBRARIES
FFMPEG_LIBAVDEVICE_INCLUDE_DIRS
FFMPEG_LIBAVDEVICE_LIBRARIES
FFMPEG_LIBAVFORMAT_INCLUDE_DIRS
FFMPEG_LIBAVFORMAT_LIBRARIES
FFMPEG_LIBAVUTIL_INCLUDE_DIRS
FFMPEG_LIBAVUTIL_LIBRARIES
FFMPEG_LIBSWSCALE_INCLUDE_DIRS
FFMPEG_LIBSWSCALE_LIBRARIES
FFMPEG_ROOT


 If I continue to build with the warnings then finally FFMPEG plugin is not 
generated.

 Can you please help me how to solve this problem.
... 


Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] [build] [Tutorial] Building osgAndroidExampleGLES1/2 on Ubuntu 11.10

2013-01-29 Thread Koduri Lakshmi
Hi Jordi Torres,

Thank you very much for the quick help.

I compiled FFMPEG(version 0.8 (love) for OSG compatible ) for android. I 
generated static files (like libavcodec.a etc). 
I gave all these include and lib fies paths in cmake command line command. Here 
it is 


Code:
cmake .. -DOSG_BUILD_PLATFORM_ANDROID=ON -DDYNAMIC_OPENTHREADS=OFF 
-DDYNAMIC_OPENSCENEGRAPH=OFF -DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF 
-DOSG_GL_MATRICES_AVAILABLE=ON -DOSG_GL_VERTEX_FUNCS_AVAILABLE=ON 
-DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE=ON -DOSG_GL_FIXED_FUNCTION_AVAILABLE=ON 
-DOSG_CPP_EXCEPTIONS_AVAILABLE=OFF -DOSG_GL1_AVAILABLE=OFF

-DFFMPEG_LIBAVCODEC_INCLUDE_DIR=/home/ttpl/Android/OSGSupport/ffmpeg/libavcodec/include
 
-DFFMPEG_LIBAVCODEC_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavcodec.a 
  
-DFFMPEG_LIBAVDEVICE_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg/libavdevice/include
  
-DFFMPEG_LIBAVDEVICE_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavdevice.a
  
-DFFMPEG_LIBAVFORMAT_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg/libavformat/include
 
-DFFMPEG_LIBAVFORMAT_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavformat.a
 
-DFFMPEG_LIBAVUTIL_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg/libavutil/include
 -DFFMPEG_LIBAVUTIL_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavutil.a 
-DFFMPEG_LIBSWSCALE_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg/libswscale/include
 
-DFFMPEG_LIBSWSCALE_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libswscale.a 
-DFFMPEG_ROOT=/home/ttpl/Android/OSGSupport/ffmpeg -DOSG_GL2_AVAILABLE=OFF 

-DOSG_GL3_AVAILABLE=OFF -DOSG_GLES1_AVAILABLE=ON -DOSG_GLES2_AVAILABLE=OFF 
-DJ=4 
-DCMAKE_INSTALL_PREFIX=/home/ttpl/Android/OpenSceneGraph-3.0.1_GL1/osginstall 




When I execute this I am getting cmake warning. 

Do I need to make any changes to .cmake files?


... 


Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] [build] [Tutorial] Building osgAndroidExampleGLES1/2 on Ubuntu 11.10

2013-01-29 Thread Koduri Lakshmi
Hi Jordi Torres,

Thank you very much your kind help. I too trying to identify the problem.

... 


Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] [build] CMake Manually-specified variables... Warning for FFMPEG plug-in for Android

2013-01-29 Thread Koduri Lakshmi
Hi,

Does am i going in correct way? do i need to change any .cmake fiels.

Can you please suggest me to solve this problem?
... 


Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] [build] [Tutorial] Building osgAndroidExampleGLES1/2 on Ubuntu 11.10

2013-01-29 Thread Koduri Lakshmi
Hi Jordi Torres,

Thank you very much for the great help.

I changed CMakeList.txt file and started compiling.

Now i am getting the following error.


Code:
In file included from 
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegHeaders.hpp:12:0,
 from 
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegClocks.hpp:10,
 from 
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1/src/osgPlugins/ffmpeg/FFmpegClocks.cpp:2:
/home/ttpl/Android/OSGSupport/ffmpeg/libavcodec/include/avcodec.h:30:33: fatal 
error: libavutil/samplefmt.h: No such file or directory



This problem may solve if I consider the latest submission. But as I am new to 
submissions I am not able to handle it. 

I saw a post on submissions about ffmpeg fiexs. But I don't know how to 
download it and how to replace the download ones in the source code.

Please excuse me if it is not worthable question to ask here. 




... 


Thank you!

Cheers,
Koduri
Code:




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




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


[osg-users] [build] CMake Manually-specified variables... Warning for FFMPEG plug-in for Android

2013-01-28 Thread Koduri Lakshmi
Hi,

I am trying to build the FFMPEG plugin for Android. I downloaded FFMPEG0.8.12 
(Love) and created static libs. I downloaded the OSG3.0.1 and created build 
directory. When I executed the cmake command then I am getting the following 
warning

CMake Warning:
  Manually-specified variables were not used by the project:


Code:
FFMPEG_LIBAVCODEC_INCLUDE_DIR
FFMPEG_LIBAVCODEC_LIBRARIES
FFMPEG_LIBAVDEVICE_INCLUDE_DIRS
FFMPEG_LIBAVDEVICE_LIBRARIES
FFMPEG_LIBAVFORMAT_INCLUDE_DIRS
FFMPEG_LIBAVFORMAT_LIBRARIES
FFMPEG_LIBAVUTIL_INCLUDE_DIRS
FFMPEG_LIBAVUTIL_LIBRARIES
FFMPEG_LIBSWSCALE_INCLUDE_DIRS
FFMPEG_LIBSWSCALE_LIBRARIES
FFMPEG_ROOT



the cmake command is 


Code:
cmake .. -DOSG_BUILD_PLATFORM_ANDROID=ON -DDYNAMIC_OPENTHREADS=OFF 
-DDYNAMIC_OPENSCENEGRAPH=OFF -DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF 
-DOSG_GL_MATRICES_AVAILABLE=ON -DOSG_GL_VERTEX_FUNCS_AVAILABLE=ON 
-DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE=ON -DOSG_GL_FIXED_FUNCTION_AVAILABLE=ON 
-DOSG_CPP_EXCEPTIONS_AVAILABLE=OFF -DOSG_GL1_AVAILABLE=OFF 
-DFFMPEG_LIBAVCODEC_INCLUDE_DIR=/home/ttpl/Android/OSGSupport/ffmpeg/libavcodec/include
 -DFFMPEG_LIBAVCODEC_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavcodec  
 
-DFFMPEG_LIBAVDEVICE_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg/libavdevice/include
  
-DFFMPEG_LIBAVDEVICE_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavdevice 
 
-DFFMPEG_LIBAVFORMAT_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg/libavformat/include
 
-DFFMPEG_LIBAVFORMAT_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavformat 
-DFFMPEG_LIBAVUTIL_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg/libavutil/include
 -DFFMPEG_LIBAVUTIL_LIBRARIES=/home/ttpl/Android/OSGSuppo
 rt/ffmpeg/libavutil 
-DFFMPEG_LIBSWSCALE_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg/libswscale/include
 -DFFMPEG_LIBSWSCALE_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libswscale 
-DFFMPEG_ROOT=/home/ttpl/Android/OSGSupport/ffmpeg -DOSG_GL2_AVAILABLE=OFF 
-DOSG_GL3_AVAILABLE=OFF -DOSG_GLES1_AVAILABLE=ON -DOSG_GLES2_AVAILABLE=OFF 
-DJ=4 
-DCMAKE_INSTALL_PREFIX=/home/ttpl/Android/OpenSceneGraph-3.0.1_GL1/osginstall



With this warning I build (make) and did make install  but the final install 
directory doen't contain ffmpeg plugin.

If I use CMake-gui then i am getting following  config errors. I selected Unix 
Makefile as the compiler.


Code:
Could NOT find OpenGL (missing:  OPENGL_gl_LIBRARY) 
Could NOT find LibXml2 (missing:  LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR) 
Could NOT find CURL (missing:  CURL_LIBRARY CURL_INCLUDE_DIR) 
CMake Warning at 
/home/ttpl/ProgramTools/cmake-2.8.10.2-Linux-i386/share/cmake-2.8/Modules/FindITK.cmake:48
 (find_package):
  Could not find a package configuration file named ITKConfig.cmake
  provided by package ITK.

  Add the installation prefix of ITK to CMAKE_PREFIX_PATH or set ITK_DIR
  to a directory containing one of the above files.  If ITK provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:465 (FIND_PACKAGE)


Could NOT find OpenAL (missing:  OPENAL_LIBRARY OPENAL_INCLUDE_DIR) 
Could NOT find SDL (missing:  SDL_LIBRARY SDL_INCLUDE_DIR) 
checking for module 'cairo'
  package 'cairo' not found
checking for module 'poppler-glib'
  package 'poppler-glib' not found
checking for module 'librsvg-2.0'
  package 'librsvg-2.0' not found
checking for module 'cairo'
  package 'cairo' not found
checking for module 'gtk+-2.0'
  package 'gtk+-2.0' not found
checking for module 'gtkglext-x11-1.0'
  package 'gtkglext-x11-1.0' not found
Could NOT find Qt4 (missing:  QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE 
QT_RCC_EXECUTABLE QT_UIC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR 
QT_QTCORE_LIBRARY) 
Could NOT find Qt3 (missing:  QT_QT_LIBRARY QT_INCLUDE_DIR QT_MOC_EXECUTABLE) 
Could NOT find JPEG (missing:  JPEG_LIBRARY JPEG_INCLUDE_DIR) 
CMake Warning (dev) at 
/home/ttpl/ProgramTools/cmake-2.8.10.2-Linux-i386/share/cmake-2.8/Modules/FindPNG.cmake:34
 (find_package):
  File
  
/home/ttpl/ProgramTools/cmake-2.8.10.2-Linux-i386/share/cmake-2.8/Modules/FindPNG.cmake
  includes
  
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1_1/CMakeModules/FindZLIB.cmake
  (found via CMAKE_MODULE_PATH) which shadows
  
/home/ttpl/ProgramTools/cmake-2.8.10.2-Linux-i386/share/cmake-2.8/Modules/FindZLIB.cmake.
  This may cause errors later on .

  Policy CMP0017 is not set: Prefer files from the CMake module directory
  when including from there.  Run cmake --help-policy CMP0017 for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.
Call Stack (most recent call first):
  CMakeLists.txt:535 (FIND_PACKAGE)
This warning is for project developers.  Use -Wno-dev to suppress it.

Could NOT find PNG (missing:  PNG_LIBRARY PNG_PNG_INCLUDE_DIR) 
Could NOT find TIFF (missing:  TIFF_LIBRARY TIFF_INCLUDE_DIR) 
checking for module 'xrandr'
  package 'xrandr' not found
CMake Error: The 

[osg-users] [osgPlugins] FFMPEG plugin Problem on Android

2013-01-28 Thread Koduri Lakshmi
Hi,

I am trying to build the FFMPEG plugin for Android. I downloaded FFMPEG0.8.12 
(Love) and created static libs. I downloaded the OSG3.0.1 and created build 
directory. When I executed the cmake command then I am getting the following 
warning

CMake Warning:
  Manually-specified variables were not used by the project:


Code:
FFMPEG_LIBAVCODEC_INCLUDE_DIR
FFMPEG_LIBAVCODEC_LIBRARIES
FFMPEG_LIBAVDEVICE_INCLUDE_DIRS
FFMPEG_LIBAVDEVICE_LIBRARIES
FFMPEG_LIBAVFORMAT_INCLUDE_DIRS
FFMPEG_LIBAVFORMAT_LIBRARIES
FFMPEG_LIBAVUTIL_INCLUDE_DIRS
FFMPEG_LIBAVUTIL_LIBRARIES
FFMPEG_LIBSWSCALE_INCLUDE_DIRS
FFMPEG_LIBSWSCALE_LIBRARIES
FFMPEG_ROOT



the cmake command is 


Code:
cmake .. -DOSG_BUILD_PLATFORM_ANDROID=ON -DDYNAMIC_OPENTHREADS=OFF 
-DDYNAMIC_OPENSCENEGRAPH=OFF -DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF 
-DOSG_GL_MATRICES_AVAILABLE=ON -DOSG_GL_VERTEX_FUNCS_AVAILABLE=ON 
-DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE=ON -DOSG_GL_FIXED_FUNCTION_AVAILABLE=ON 
-DOSG_CPP_EXCEPTIONS_AVAILABLE=OFF -DOSG_GL1_AVAILABLE=OFF 
-DFFMPEG_LIBAVCODEC_INCLUDE_DIR=/home/ttpl/Android/OSGSupport/ffmpeg/libavcodec/include
 -DFFMPEG_LIBAVCODEC_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavcodec  
 
-DFFMPEG_LIBAVDEVICE_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg/libavdevice/include
  
-DFFMPEG_LIBAVDEVICE_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavdevice 
 
-DFFMPEG_LIBAVFORMAT_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg/libavformat/include
 
-DFFMPEG_LIBAVFORMAT_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libavformat 
-DFFMPEG_LIBAVUTIL_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg/libavutil/include
 -DFFMPEG_LIBAVUTIL_LIBRARIES=/home/ttpl/Android/OSGSuppo
 rt/ffmpeg/libavutil 
-DFFMPEG_LIBSWSCALE_INCLUDE_DIRS=/home/ttpl/Android/OSGSupport/ffmpeg/libswscale/include
 -DFFMPEG_LIBSWSCALE_LIBRARIES=/home/ttpl/Android/OSGSupport/ffmpeg/libswscale 
-DFFMPEG_ROOT=/home/ttpl/Android/OSGSupport/ffmpeg -DOSG_GL2_AVAILABLE=OFF 
-DOSG_GL3_AVAILABLE=OFF -DOSG_GLES1_AVAILABLE=ON -DOSG_GLES2_AVAILABLE=OFF 
-DJ=4 
-DCMAKE_INSTALL_PREFIX=/home/ttpl/Android/OpenSceneGraph-3.0.1_GL1/osginstall



With this warning I build (make) and did make install  but the final install 
directory doen't contain ffmpeg plugin.

If I use CMake-gui then i am getting following  config errors. I selected Unix 
Makefile as the compiler.


Code:
Could NOT find OpenGL (missing:  OPENGL_gl_LIBRARY) 
Could NOT find LibXml2 (missing:  LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR) 
Could NOT find CURL (missing:  CURL_LIBRARY CURL_INCLUDE_DIR) 
CMake Warning at 
/home/ttpl/ProgramTools/cmake-2.8.10.2-Linux-i386/share/cmake-2.8/Modules/FindITK.cmake:48
 (find_package):
  Could not find a package configuration file named ITKConfig.cmake
  provided by package ITK.

  Add the installation prefix of ITK to CMAKE_PREFIX_PATH or set ITK_DIR
  to a directory containing one of the above files.  If ITK provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:465 (FIND_PACKAGE)


Could NOT find OpenAL (missing:  OPENAL_LIBRARY OPENAL_INCLUDE_DIR) 
Could NOT find SDL (missing:  SDL_LIBRARY SDL_INCLUDE_DIR) 
checking for module 'cairo'
  package 'cairo' not found
checking for module 'poppler-glib'
  package 'poppler-glib' not found
checking for module 'librsvg-2.0'
  package 'librsvg-2.0' not found
checking for module 'cairo'
  package 'cairo' not found
checking for module 'gtk+-2.0'
  package 'gtk+-2.0' not found
checking for module 'gtkglext-x11-1.0'
  package 'gtkglext-x11-1.0' not found
Could NOT find Qt4 (missing:  QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE 
QT_RCC_EXECUTABLE QT_UIC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR 
QT_QTCORE_LIBRARY) 
Could NOT find Qt3 (missing:  QT_QT_LIBRARY QT_INCLUDE_DIR QT_MOC_EXECUTABLE) 
Could NOT find JPEG (missing:  JPEG_LIBRARY JPEG_INCLUDE_DIR) 
CMake Warning (dev) at 
/home/ttpl/ProgramTools/cmake-2.8.10.2-Linux-i386/share/cmake-2.8/Modules/FindPNG.cmake:34
 (find_package):
  File
  
/home/ttpl/ProgramTools/cmake-2.8.10.2-Linux-i386/share/cmake-2.8/Modules/FindPNG.cmake
  includes
  
/home/ttpl/Android/OSG/ffmpeg_Plugin/OpenSceneGraph-3.0.1_1/CMakeModules/FindZLIB.cmake
  (found via CMAKE_MODULE_PATH) which shadows
  
/home/ttpl/ProgramTools/cmake-2.8.10.2-Linux-i386/share/cmake-2.8/Modules/FindZLIB.cmake.
  This may cause errors later on .

  Policy CMP0017 is not set: Prefer files from the CMake module directory
  when including from there.  Run cmake --help-policy CMP0017 for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.
Call Stack (most recent call first):
  CMakeLists.txt:535 (FIND_PACKAGE)
This warning is for project developers.  Use -Wno-dev to suppress it.

Could NOT find PNG (missing:  PNG_LIBRARY PNG_PNG_INCLUDE_DIR) 
Could NOT find TIFF (missing:  TIFF_LIBRARY TIFF_INCLUDE_DIR) 
checking for module 'xrandr'
  package 'xrandr' not found
CMake Error: The 

Re: [osg-users] IOS Linking error Undefined symbols for architecture i386: _graphicswindow_IOS

2012-11-30 Thread Koduri Lakshmi
Hi Stephan and Chris Hanson,

Thank you for the quick reply.

Now I am able to compile and link sample application. Now I have a problem to 
load OSG files. I did in the following way

 Added a folder called Resources from File-NewGroup.
 Added a test.osg file to Resources folder. The same test.osg file added 
to Bundle Resources in Build Phases.

After that reading osg file as osg::ref_ptrosg::Node model = 
(osgDB::readNodeFile(test.osg));

When I run the application on Simulator it loads a gray cube instead of 
test.osg. I don't know from where this cube is getting loaded.

Can you pleas help me how to load test.osg file


... 

Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] [build] IOS Linking error Undefined symbols for architecture i386: _graphicswindow_IOS

2012-11-29 Thread Koduri Lakshmi
Hi,

I added libOpenThreads.a file to BuildPhases-Link Binary With Libraries. 
Then I am getting the following error


Code:
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang++ 
failed with exit code 1



I am getting the same error for Debug/Release builds. I created both 
Debut/Release .a files to OSG. I got these .a files from BUILD-lib folder.

Can you please any one help how to solve this linker error.

... 


Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] IOS Linking error Undefined symbols for architecture i386: _graphicswindow_IOS

2012-11-29 Thread Koduri Lakshmi
Hi,

I added libOpenThreads.a file to BuildPhases-Link Binary With Libraries. 
Then I am getting the following error


Code:
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang++ 
failed with exit code 1



I am getting the same error for Debug/Release builds. I created both 
Debut/Release .a files to OSG. I got these .a files from BUILD-lib folder.

Can you please any one help how to solve this linker error.

... 


Thank you!

Cheers,
Koduri

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




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


[osg-users] [build] IOS Build Error for XCode Project

2012-11-28 Thread Koduri Lakshmi
Hi,

I am new to Mac and XCode development. I am familiar with Visual Studio. 

I generated XCodeProject as specified in OSG documentation for the Simulator. 

Here is what I did

-- Created build system as specified in OSG docs into a folder BUILD. 
This generated xCodeProject in the BUILD folder.

--- Opened this xCodeProject in XCode.

--- Selected ALL_BUILD as the active schema and build the project.

-- The build is successful with out any errors

-- Selected install as the active schema and clicked Run button. 
It created lib and include folders into the destination install directory.

 I Created a new project and included the following statement in 
deligated header file. Then I am getting an error osgDB/ReadFile file not 
found. 

I include the include folder in Header Search Paths. Also tried to include 
User Header Search Paths. Still I am getting the same error.

As I saw in lib folder of install directory, it is not having any .a files. 
It has only pkgconfig folder and having some .pc files. Also include folder 
dosn't have any .h files instead it has some foders and having some files like 
Atomic, Block etc. 

Am I going in correct way? 

Can you please guide how to build iPhoneViewer on IPhone.  

I am using XCode4.2.1 and IOS 10.6.8. 
... 


Thank you!

Cheers,
Hemamcs

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




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


[osg-users] IOS compile Error on XCode

2012-11-28 Thread Koduri Lakshmi
Hi, 

I am new to Mac and XCode development. I am familiar with Visual Studio. 

I generated XCodeProject as specified in OSG documentation for the Simulator. 

Here is what I did 

-- Created build system as specified in OSG docs into a folder BUILD. 
This generated xCodeProject in the BUILD folder. 

--- Opened this xCodeProject in XCode. 

--- Selected ALL_BUILD as the active schema and build the project. 

-- The build is successful with out any errors 

-- Selected install as the active schema and clicked Run button. 
It created lib and include folders into the destination install directory. 

 I Created a new project and included the following statement in 
deligated header file. Then I am getting an error osgDB/ReadFile file not 
found. 

I include the include folder in Header Search Paths. Also tried to include 
User Header Search Paths. Still I am getting the same error. 

As I saw in lib folder of install directory, it is not having any .a files. 
It has only pkgconfig folder and having some .pc files. Also include folder 
dosn't have any .h files instead it has some foders and having some files like 
Atomic, Block etc. 

Am I going in correct way? 

Can you please guide how to build iPhoneViewer on IPhone. 

I am using XCode4.2.1 and IOS 10.6.8. 
... 


Thank you! 

Cheers, 
Koduri.

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




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


Re: [osg-users] Why to use Shaders to render model in Android with OpenGLES2

2012-11-18 Thread Koduri Lakshmi
Hello Chris Hanson,

Thank you very much for giving valuable information.

At present it is not possible for me to rewrite my desktop application by using 
shaders. So I will use GLES1.

Now onwards I will use shaders in all applications as the future devices may 
support only GLES2.

Thank you very much.

... 

Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] Why to use Shaders to render model in Android with OpenGLES2

2012-11-17 Thread Koduri Lakshmi
Hello Chris Hanson,

Thank you very much for the great help.

I have a small application build on desktop using OSG with OpenGL2 version. I 
will get ready to render 3D models (with full texturing, lighting etc ) from 
3DSMAX (Exported as .OSG from Max using OSGExporter).  As this supports Fixed 
Function Pipeline the desktop application is able to render these 3D models 
successfully. 
Similarly does OpenGL 3 and OpenGL 4 versions supports Fixed Function Pipeline?

Now I want to port the same on Android and iPhone. With your help and from some 
documents I came to know that GLES2.0 never supports Fixed Function Pipeline. 
So I can't port that code in Android.

To make an application to work on both Desktop and Embedded devices, should I 
code my project by using only Shaders. 

In such case I should get 3D model in OBJ format and I should write shaders for 
Textures, Lightings etc. I think this is very painful work. 

I have to see whether will  it be easy with ShadreGen. I need to go through 
ShaderGen.

Can I expect that GLES2  will support Fixed Functionality in near future like 
GLES1.

Once again thank you very much for the great help.
... 

Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] [build] Why Restoring OpenGL currentState is not working with OpenGLES2 but working with GLES1

2012-11-16 Thread Koduri Lakshmi
Hi,

The error is not with the previous post code. 

When I added the following code then the model is displayed.


Code:
 mtForMarker[idx]=new osg::MatrixTransform();

 osg::Shader * vshader = new osg::Shader(osg::Shader::VERTEX, 
gVertexShader );
osg::Shader * fshader = new osg::Shader(osg::Shader::FRAGMENT, 
gFragmentShader );

osg::Program * prog = new osg::Program;
   prog-addShader ( vshader );
prog-addShader ( fshader );

mtForMarker[idx]-getOrCreateStateSet()-setAttribute ( prog );

 mtForMarker[idx]-addChild(loadedModel[idx].get());
 modelSwitch-addChild(mtForMarker[idx].get());
 
 
  osgViewer::Viewer::Windows windows;
_viewer-getWindows(windows);
for(osgViewer::Viewer::Windows::iterator itr = windows.begin();itr != 
windows.end();++itr)
{
  (*itr)-getState()-setUseModelViewAndProjectionUniforms(true);
  (*itr)-getState()-setUseVertexAttributeAliasing(true);
}



This code I added from osgAndroidOpenGLES2 example.

As I am new to OSG I have two doubts

1) Why should I add the shaders in OpenGLES2 to display model. If I remove this 
code then the model is not displayed. OpenGLES1 dosnt have this shaders.

2) If I add this code then the textures are not applied to my model. I got  
model from 3DS MAX. How can I get textures?

Can you please guide me how to get textures? If shaders are necessary to render 
model on Android then how can I handle textures (or any others) ? Is there any 
tutorial to handle this in Android?

... 


Thank you!

Cheers,
Koduri

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




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


[osg-users] Why to use Shaders to render model in Android with OpenGLES2

2012-11-16 Thread Koduri Lakshmi
Hi,

I completed osgAndroid Example with GLES1 successfully. If I try to run the 
same example with OpenGLES2 then the OSG model is not rendering. If I add the 
following code then I am able to see the model on my device.


Code:
mtForMarker[idx]=new osg::MatrixTransform();
  
osg::Shader * vshader = new osg::Shader(osg::Shader::VERTEX, 
gVertexShader );
osg::Shader * fshader = new osg::Shader(osg::Shader::FRAGMENT, 
gFragmentShader );

osg::Program * prog = new osg::Program;
   prog-addShader ( vshader );
prog-addShader ( fshader );

mtForMarker[idx]-getOrCreateStateSet()-setAttribute ( prog );
  
mtForMarker[idx]-addChild(loadedModel[idx].get());
modelSwitch-addChild(mtForMarker[idx].get());


 osgViewer::Viewer::Windows windows;
_viewer-getWindows(windows);
for(osgViewer::Viewer::Windows::iterator itr = windows.begin();itr != 
windows.end();++itr)
{
  (*itr)-getState()-setUseModelViewAndProjectionUniforms(true);
  (*itr)-getState()-setUseVertexAttributeAliasing(true);
} 



This code I added from osgAndroidOpenGLES2 example.

As I am new to OSG I have two doubts

1) Why should I add the shaders in OpenGLES2 to display model.Can't I display 
the model with out this Shaders code. OpenGLES1 example doesn’t have this 
shaders.

2) If I add the shaders then the fixed functionalities like textures, lighting 
etc. were disabled. But I need to enable them because I got model from 3DS MAX. 
How can I enable fixed functionalities?

Can you please guide me how to enable fixed functionalities? If shaders are 
necessary to render model on Android with OpenGLES2 then how can I handle 
textures (or any others fixed functionalities) ? Is there any tutorial to 
handle this in Android? 

NOTE:- By mistake i posted the same under Build System category. 
... 

Thank you!

Cheers,
Koduri

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




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


[osg-users] [build] Why Restoring OpenGL currentState is not working with OpenGLES2 but working with GLES1

2012-11-10 Thread Koduri Lakshmi
Hi,

I am using a 3rd party lib(QCAR) with OSG on Android. This lib clears OpenGLES 
graphics  context every time after rendering a frame. So the model renders only 
once (first time) and disappears  on the viewer. So to preserve graphics 
context i did as follows

--- Created Embeded View
--- Captured current Graphics context as follws
 

Code:
m_lastStateSet = new osg::StateSet(); 
_viewer-getCamera()-getGraphicsContext()-getState()-captureCurrentState(*m_lastStateSet.get());
 



--- In RendererFrame function 
  --- Restore graphics context as follows


Code:
osgState = _viewer-getCamera()-getGraphicsContext()-getState();
osgState-reset();
osgState-apply(m_lastStateSet.get()); 



--- render Frame Code 
  
 Save the current state of the graphics context as follows
 
Code:
_viewer-getCamera()-getGraphicsContext()-getState()-captureCurrentState(*m_lastStateSet.get());
 



This works fine with OpenGLES1. The same is not working if I build the same 
code with OpenGLES2 version.

Can you please help me what could be the mistake.

Here is the complete code
 
OSG INIT Function
   

Code:
 void OsgApp::initOsgWindow(int sW,int sH)
 {
_viewer = new osgViewer::Viewer();
embeddedWindow=_viewer-setUpViewerAsEmbeddedInWindow(x, y, width, 
height);
  _root = new osg::Group();

_viewer-realize();
_state = _root-getOrCreateStateSet();
_state-setMode(GL_LIGHTING, osg::StateAttribute::ON);
_state-setMode(GL_DEPTH_TEST, osg::StateAttribute::ON);
_state-setMode(GL_CULL_FACE, osg::StateAttribute::ON);

//_viewer-setSceneData(_root.get());


 _viewer-addEventHandler(new osgViewer::StatsHandler);
_viewer-addEventHandler(new 
osgGA::StateSetManipulator(_viewer-getCamera()-getOrCreateStateSet()));
_viewer-addEventHandler(new osgViewer::ThreadingHandler);
_viewer-addEventHandler(new osgViewer::LODScaleHandler);


_manipulator = new osgGA::KeySwitchMatrixManipulator;

_manipulator-addMatrixManipulator( '1', Trackball, new 
osgGA::TrackballManipulator() );
_manipulator-addMatrixManipulator( '2', Flight, new 
osgGA::FlightManipulator() );
_manipulator-addMatrixManipulator( '3', Drive, new 
osgGA::DriveManipulator() );
_manipulator-addMatrixManipulator( '4', Terrain, new 
osgGA::TerrainManipulator() );
_manipulator-addMatrixManipulator( '5', Orbit, new 
osgGA::OrbitManipulator() );
_manipulator-addMatrixManipulator( '6', FirstPerson, new 
osgGA::FirstPersonManipulator() );
_manipulator-addMatrixManipulator( '7', Spherical, new 
osgGA::SphericalManipulator() );

_viewer-setCameraManipulator( _manipulator.get() );

_viewer-getViewerStats()-collectStats(scene, true);



_viewer-getCamera()-setViewport(0,0,sW, sH);
   
_viewer-getCamera()-setClearMask(GL_DEPTH_BUFFER_BIT );



modelSwitch=new osg::Switch;


LOG(READING Model_0);
readModels(/mnt/sdcard/test/0.osg,MODEL_1);


  _root-addChild(modelSwitch.get());

_viewer-setSceneData(NULL);
_viewer-setSceneData(_root.get());
_manipulator-getNode();
_viewer-home();

_viewer-getDatabasePager()-clear();
_viewer-getDatabasePager()-registerPagedLODs(_root.get());
_viewer-getDatabasePager()-setUpThreads(3, 1);
_viewer-getDatabasePager()-setTargetMaximumNumberOfPageLOD(2);
_viewer-getDatabasePager()-setUnrefImageDataAfterApplyPolicy(true, true);

[color=red][b]m_lastStateSet = new osg::StateSet(); 
 
_viewer-getCamera()-getGraphicsContext()-getState()-captureCurrentState(*m_lastStateSet.get());
 [/b][/color]
}




Renderer Function


Code:
void OsgApp::renderer(osg::Matrix mat)  
  {

   [color=red] [b]osgState = 
_viewer-getCamera()-getGraphicsContext()-getState();
osgState-reset();
osgState-apply(m_lastStateSet.get()); [/b][/color]
   

renderModel_1(mat);

   
 _viewer-frame();

[color=red][b]_viewer-getCamera()-getGraphicsContext()-getState()-captureCurrentState(*m_lastStateSet.get());
  [/b] [/color]
   

  }


... 


Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] [build] How to play Video on Android

2012-11-08 Thread Koduri Lakshmi
Hi Jordi Torres,

Thank you very much for the great help.

When can I expect new release? 

Now I am using OSG3.0.1.

... 


Thank you!

Cheers,
Koduri

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




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


[osg-users] [build] How to play Video on Android

2012-11-07 Thread Koduri Lakshmi
Hi,

I build OSG for Android with GLES1. I loaded models successfully on my mobile.
Now  I want to play video instead of model (like the one in Windows desktop). 
Is it possible to play a video using OSG on Android. 

Can you please help me how to build plugins for these if possible. I searched 
my build installed directory but i did not found any ffmpeg or any other plug 
ins.

I am using Ubuntu 11.10 OS and my Android OS version is 2.2. 
My mobile device is Samsung GTI 9000.



... 


Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] Why to reset OSG settings every time while rendering in Android

2012-09-24 Thread Koduri Lakshmi
Hi,

I came to know that the QCAR::Renderer::getInstance().drawVideoBackground() 
statement clears the OpenGLES context. I think this is the reason to reset the 
OSG setting every time.

I tried to restore the  OpenGLES context as follows. Store the State object at 
initial time and restore it after every render (viewer-frame()).
 But still I am not able to see model with background.

in initOsgWindow(int sW,int sH) (calling only once) function


Code:
prevStateSet = new osg::StateSet();

_viewer-getCamera()-getGraphicsContext()-getState()-captureCurrentState(*prevStateSet.get());
 



After render (viewer-frame()) I wrotet he code as follows


Code:
osgState = _viewer-getCamera()-getGraphicsContext()-getState();
  osgState-reset();
  osgState-apply(prevStateSet.get()); 



Even after this I am not getting model.

In the similar way I reseted the Graphics context (getGraphicsContext from 
camera at init and reset after render). But this too not working.

Can anyone please help me what to do?


... 

Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] Why to reset OSG settings every time while rendering in Android

2012-09-22 Thread Koduri Lakshmi
Hi,

I got the mistake but not able to fix it. I am using a 3rd Party AR library 
(QCAR).
It is setting the background with a statement 

QCAR::Renderer::getInstance().drawVideoBackground();. If I comment this line 
then the model remains forever on screen but there is no background.

If I remove comments QCAR::Renderer::getInstance().drawVideoBackground(); and 
called OSG settings (initOsgWindow in the previous post) then the model 
displayes forever on screen but  wrong animations.

Why model is not on screen if I enable camera as background.

Can you please guide me how to solve this problem.
... 

Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] Can I run OSG even on 128MB RAM grapics card

2012-09-22 Thread Koduri Lakshmi
Hi Christian,

Thank you very much for the help.

I gone through some of the OSG posts saying that the OSG will not run on Intel 
128 MB VRAM's.

But I have a project which should run even on Intel 128 MB VRAM (System brought 
say 5 years back). Because I can't ask end users to upgrade their VRAM only for 
my application.

I optimized my model from  lack vertices,  1lack polygons to nearly 14000 
vertices and 14000 vertices. I set simple textures. I exported this from 3ds 
max as OSG model. The final size of the OSG model comes down from 25MB to 4.3MB.

But still my animation (transformation) is jerky.

Is there any chance to optimize in model or in C++ code to make animation 
smooth. Or upgrading VRAM is only the solution?


... 

Thank you!

Cheers,
Hemamcs

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




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


[osg-users] Why to reset OSG settings every time while rendering in Android

2012-09-21 Thread Koduri Lakshmi
Hi,


Hi,

I am new to Android programming. I followed the osgAndroidExampleGLES1 and 
developed a small example. It is working well but have a small issue.

First of all I will give my complete code here




Code:
#includeosgModel.hpp

OsgMainApp osgM;

void OsgMainApp::readModel()
{

loadedModel = osgDB::readNodeFile(/mnt/sdcard/OSG/Piller.osg);
if (loadedModel == 0) 
{
LOG(Model not loaded);
}
else 
{   
LOG(Model loaded);


  loadedModel-setName(/mnt/sdcard/OSG/Piller.osg);


}
 
  
}
void OsgMainApp::initOsgWindow(int sW,int sH)
{
  
x=0;
y=0;

width=sW;
height=sH;


_viewer = new osgViewer::Viewer();
_viewer-setUpViewerAsEmbeddedInWindow(x, y, width, height);
_root = new osg::Group();

_viewer-realize();
_state = _root-getOrCreateStateSet();
_state-setMode(GL_LIGHTING, osg::StateAttribute::ON);
_state-setMode(GL_DEPTH_TEST, osg::StateAttribute::ON);
_state-setMode(GL_CULL_FACE, osg::StateAttribute::ON);

_viewer-addEventHandler(new osgViewer::StatsHandler);
_viewer-addEventHandler(new 
osgGA::StateSetManipulator(_viewer-getCamera()-getOrCreateStateSet()));
_viewer-addEventHandler(new osgViewer::ThreadingHandler);
_viewer-addEventHandler(new osgViewer::LODScaleHandler);


_manipulator = new osgGA::KeySwitchMatrixManipulator;

_manipulator-addMatrixManipulator( '1', Trackball, new 
osgGA::TrackballManipulator() );
_manipulator-addMatrixManipulator( '2', Flight, new 
osgGA::FlightManipulator() );
_manipulator-addMatrixManipulator( '3', Drive, new 
osgGA::DriveManipulator() );
_manipulator-addMatrixManipulator( '4', Terrain, new 
osgGA::TerrainManipulator() );
_manipulator-addMatrixManipulator( '5', Orbit, new 
osgGA::OrbitManipulator() );
_manipulator-addMatrixManipulator( '6', FirstPerson, new 
osgGA::FirstPersonManipulator() );
_manipulator-addMatrixManipulator( '7', Spherical, new 
osgGA::SphericalManipulator() );

_viewer-setCameraManipulator( _manipulator.get() );

_viewer-getViewerStats()-collectStats(scene, true);

_viewer-getCamera()-setViewport(0,0,sW, sH);

_viewer-getCamera()-setClearMask(GL_DEPTH_BUFFER_BIT );

modelSwitch=new osg::Switch;
trans=new osg::MatrixTransform();

trans-addChild(loadedModel.get());
modelSwitch-addChild(trans.get());   
_root-addChild(modelSwitch.get());

_viewer-setSceneData(NULL);
_viewer-setSceneData(_root.get());
_manipulator-getNode();
_viewer-home();

_viewer-getDatabasePager()-clear();
_viewer-getDatabasePager()-registerPagedLODs(_root.get());
_viewer-getDatabasePager()-setUpThreads(3, 1);
_viewer-getDatabasePager()-setTargetMaximumNumberOfPageLOD(2);
_viewer-getDatabasePager()-setUnrefImageDataAfterApplyPolicy(true, 
true);
  
}
void OsgMainApp::renderOsg(osg::Matrix mat)
{
modelSwitch-setAllChildrenOff(); 
modelSwitch-setChildValue(trans,1);

osg::Vec3f tr,scal;
osg::Quat rot,so,rot1,rot2;
mat.decompose(tr,rot,scal,so);

rot1=rot;
rot2=rot;

rot.makeRotate(osg::DegreesToRadians(45.0),1,0,0);
rot2.makeRotate(osg::DegreesToRadians(180.0),0,1,0);

trans-preMult(osg::Matrix::rotate(rot1));
trans-preMult(osg::Matrix::rotate(rot));
trans-preMult(osg::Matrix::rotate(rot2));
//trans-preMult(osg::Matrix::scale(osg::Vec3(0.5,0.5,0.5)));
_viewer-frame();
}

JNIEXPORT void JNICALL
Java_com_Samples_initApplicationNative(
JNIEnv* env, jobject obj, jint width, jint height)
{
screenWidth = width;
screenHeight = height;

  osgM.initOsgWindow(screenWidth,screenHeight);
  osgM.readModel();

}
JNIEXPORT void JNICALL
Java_com_Samples_renderer(
JNIEnv* env, jobject obj, jint width, jint height)
{
//osgM.initOsgWindow(screenWidth,screenHeight); //ERROR IS WITH THIS
osg::Matrix mat;
mat=osg::Matrix::scale(osg::Vec3(1.5,1.5,1.5));
osgM.renderOsg(mat);

}



In this code I called initOsgWindow and readModel in 
Java_com_Samples_initApplicationNative. 
In Java_com_Samples_renderer function I am calling renderOsg. If I call 
only this function then the
model is not appearing on the screen. If I call initosgWindow also then the 
model appears on the
screen. But my model has some animation so the animation is playing incorrect 
as the osg is setting
every time.

I have gone through the osgAndroidExampleGLES1 several times. But I am not 
able to figure out the error?

What could be the mistake to reset the osg settings every time?

  

... 

Thank you!

Cheers,
Koduri

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





[osg-users] Can I run OSG even on 128MB RAM grapics card

2012-09-21 Thread Koduri Lakshmi
Hi,

I did a sample program to render a model using OSG.

I created a complex model from 3dsmax having  1lack of vertices.
I exported it as OSG using OSGExporter. I used optimization techniques to 
reduce size of the final osg file (don't know whether the vertexes are 
optimized or not ). 

It renders very well on the system having NVIDIA GeForce 8400GS with a RAM of 
512 MB graphics card. 

Now when I run this on a system having Intel graphics card with 128 MB RAM then 
the performance is very poor. I did a small transformation from left to right. 
The moving is sooo slow and getting Scaling Image from 640 by 480 to 512 by 512 
on command prompt (for textures of the model).

My final file size is nearly 25MB. 

If I test the same program with 2MB of file then the transformation is a bit 
better.

My doubt is can I improve the performance of my program even on 128MB video RAM 
for a heavy models?

Is there any technique to optimize and to improve the performance?





... 

Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] Deos readNodeFile(OSGDB) support multithreading?

2012-09-19 Thread Koduri Lakshmi
Hi robertosfield and hybr, 

Thanks a lot for the nice help.

My develop environment is windows XP 32 bit with SP3. On 32 bit machines the 
code works well. 

When I run on Win - 7 Ultimate  64 bit then I am getting run time error some 
times. I dont have development environment on 64 bit machine.  I don't know how 
to provide stack trace on this testing machine. 



I modified my code such that the thread has only reading statement. I want to 
run all threads simultaneously (so reading will be fast). I dont want sysnc of 
threads.

Here is my modified code.


Code:
//Globles

struct ModelObj
{
int id;
};
ModelObj obj[NUM_OF_MODELS];

Model model;//OBJ OF MODEL HANDLING CLASS

HANDLE T[NUM_OF_MODELS];
CWinThread *pThread[NUM_OF_MODELS];

UINT ThreadProc1(LPVOID lpvoid)
{
ModelObj *temp = (ModelObj*)lpvoid;

//model.mtForMarker[temp-id] = new osg::MatrixTransform;

//model.modelSwitch-addChild(model.mtForMarker[temp-id].get());

model.modelForMarker[temp-id] = osgDB::readNodeFile(model.fileNames[temp-id]);

if(model.modelForMarker[temp-id])
{

model.mtForMarker[temp-id]-addChild(model.modelForMarker[temp-id].get());


//model.mtForMarker[temp-id]-addChild(model.sound_root.get());
   // model.mtForMarker[temp-id]-setUpdateCallback( 
model.soundCB.get() );
}



return 0;
}





In main


Code:
Code:
.


for(int i=0;iNUM_OF_MODELS;i++)
{
obj[i].id=i;

}
  
strcpy(model.fileNames[0],osg_01.osg);
strcpy(model.fileNames[1],osg_02.OSG);
strcpy(model.fileNames[2],osg_03.OSG);

DWORD ThreadId[NUM_OF_MODELS];
for(int i=0;iNUM_OF_MODELS;i++)
{
  model.mtForMarker[i] = new osg::MatrixTransform;

model.modelSwitch-addChild(model.mtForMarker[i].get());


model.mtForMarker[i]-addChild(model.sound_root.get());
 model.mtForMarker[i]-setUpdateCallback( 
model.soundCB.get() );

//pThread[i]=new CWinThread;
std::coutThread: istd::endl;
pThread[i] = AfxBeginThread (ThreadProc1, 
(LPVOID)obj[i]);

pThread[i]-m_bAutoDelete=FALSE;

}

for (int j = 0; j  NUM_OF_MODELS; j ++)
{
T[j] = pThread[j]-m_hThread;
}

::WaitForMultipleObjects(NUM_OF_MODELS, T, TRUE, 
INFINITE);

for (int j = 0; j  NUM_OF_MODELS; j ++)
{
delete pThread[j];
}





Once I tried to use binary formats. But when compared to OSG files its size is 
huge. So I stopped. I will try once again. (I am changing textures dynamically. 
Is it possible with binary formats?)

Can you please guide me how to solve this problem?


... 

Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] Deos readNodeFile(OSGDB) support multithreading?

2012-09-19 Thread Koduri Lakshmi
Hi,

Thank you very much for nice guidance.

I will go through the threads once again and I will come back.

Once again thank you very much for the guidence.
... 

Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] Deos readNodeFile(OSGDB) support multithreading?

2012-09-18 Thread Koduri Lakshmi
Hi,

After a long time I came to this task.

Now I am able to run this in 32 bit machines. If I run it on 64 bit machines 
then some times the application crashes. 

My development environment is Windos - XP 32 bit with SP3.

I think we can run 32 bit applications on 64 bit machines with out any errors.

I am using only .OSG files. 

Here I am giving what I did

//GLOBLES

Code:
struct ModelObj
{
Model *obj;
int id;
};


HANDLE T[NUM_OF_MODELS];
CWinThread *pThread[NUM_OF_MODELS];

UINT ThreadProc1(LPVOID lpvoid)
{
ModelObj *temp = (ModelObj*)lpvoid;

temp-obj-mtForMarker[temp-id] = new osg::MatrixTransform;

temp-obj-modelSwitch-addChild(temp-obj-mtForMarker[temp-id].get());
temp-obj-modelForMarker[temp-id] = 
osgDB::readNodeFile(temp-obj-fileNames[temp-id]);

if(temp-obj-modelForMarker[temp-id])
{

temp-obj-mtForMarker[temp-id]-addChild(temp-obj-modelForMarker[temp-id].get());


temp-obj-mtForMarker[temp-id]-addChild(temp-obj-sound_root.get());
temp-obj-mtForMarker[temp-id]-setUpdateCallback( 
temp-obj-soundCB.get() );
}



return 0;
}



... 

Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] Deos readNodeFile(OSGDB) support multithreading?

2012-09-18 Thread Koduri Lakshmi
Hi,

After a long time I came back to this task.

Now I am able to run this in 32 bit machines. If I run it on 64 bit  (win-7 and 
winXP)machines then some times the application crashes. 

My development environment is Windos - XP 32 bit with SP3.

I think we can run 32 bit applications on 64 bit machines with out any errors.

I am using only .OSG files. 

Here I am giving what I did

//GLOBLES

Code:
struct ModelObj
{
Model *obj;
int id;
};


HANDLE T[NUM_OF_MODELS];
CWinThread *pThread[NUM_OF_MODELS];

UINT ThreadProc1(LPVOID lpvoid)
{
ModelObj *temp = (ModelObj*)lpvoid;

temp-obj-mtForMarker[temp-id] = new osg::MatrixTransform;

temp-obj-modelSwitch-addChild(temp-obj-mtForMarker[temp-id].get());
temp-obj-modelForMarker[temp-id] = 
osgDB::readNodeFile(temp-obj-fileNames[temp-id]);

if(temp-obj-modelForMarker[temp-id])
{

temp-obj-mtForMarker[temp-id]-addChild(temp-obj-modelForMarker[temp-id].get());


temp-obj-mtForMarker[temp-id]-addChild(temp-obj-sound_root.get());
temp-obj-mtForMarker[temp-id]-setUpdateCallback( 
temp-obj-soundCB.get() );
}



return 0;
}



In main

Code:
.

ModelObj obj[NUM_OF_MODELS];
for(int i=0;iNUM_OF_MODELS;i++)
{
obj[i].id=i;
obj[i].obj=model;
}

strcpy(model.fileNames[0],osg_01.osg);
strcpy(model.fileNames[1],osg_02.OSG);
strcpy(model.fileNames[2],osg_03.OSG);

DWORD ThreadId[NUM_OF_MODELS];
for(int i=0;iNUM_OF_MODELS;i++)
{
pThread[i]=new CWinThread;
pThread[i] = AfxBeginThread (ThreadProc1, 
(LPVOID)obj[i]);

pThread[i]-m_bAutoDelete=FALSE;

}

for (int j = 0; j  NUM_OF_MODELS; j ++)
{
T[j] = pThread[j]-m_hThread;
}

::WaitForMultipleObjects(NUM_OF_MODELS, T, TRUE, 
INFINITE);

for (int j = 0; j  NUM_OF_MODELS; j ++)
{
delete pThread[j];
}


... 

I am using OSGSound also. 

Is there any special care should I take for 64 bit machines.

If I am not using threads then loading of OSG files taking more time (With out 
threads nearly 40 sec and With Threads around 19 sec. ).

Can you please help me to solve this problem.

Thank you!

Cheers,
Koduri

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




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


[osg-users] What is the Max size of the OSG model on Andoid

2012-09-17 Thread Koduri Lakshmi
Hi,

I am new to OSG Android. I build and tested osgAndroidExampleGLES1.

I am able to load osg models of any size in this example.

I made a similar example for testing. In this example i am able to load the 
models of size around  650MB. I am not able to load 700 MB models. It just 
flashing only once.

What should I do to load models of any size.

I am using OpenGLES1 

... 

Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] What is the Max size of the OSG model on Andoid

2012-09-17 Thread Koduri Lakshmi
Hi,

Sorry for the wrong size.

I am able to load the model of size 650KB. If the model is 700KB then the 
model loading only once. That is why I am getting a flash on the screen.

Is there any setting where I need to specify size limit.

I am using OPENGLES1.
... 

Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] Texture problem on Android With GLES1 (Not Environmental mapping)

2012-09-11 Thread Koduri Lakshmi
Hi Rafa,

Thank you for the nice help.

I did as you said. But still textures are not displayed.

These are the things what I did

1) I added  -losgdb_jpeg under LOCAL_LDFLAGS in Android.mk file
2) I added ljpeg under LOCAL_LDLIBS in Android.mk file
3) I added USE_OSGPLUGIN(jpeg) to OsgMainApp.hpp file.
4) The JPEG is in Image folder only. The Image directory is in my mobile SD 
card (/mnt/sdcard/OSG/images).
5) The libosgdb_jpeg.a file is located in both install/obj/local/armeabi 
and /install/obj/local/armeabi-v7a directories.

JPEG library is already installed in my system. When I gave locate jpeg.so 
then I got the following 


Code:
/usr/lib/ImageMagick-6.6.9/modules-Q16/coders/jpeg.so
/usr/lib/i386-linux-gnu/libjpeg.so.8
/usr/lib/i386-linux-gnu/libjpeg.so.8.0.2
/usr/lib/i386-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jpeg.so
/usr/lib/i386-linux-gnu/gstreamer-0.10/libgstjpeg.so
/usr/lib/i386-linux-gnu/qt4/plugins/imageformats/libqjpeg.so
/usr/lib/jvm/java-6-openjdk-i386/jre/lib/i386/libjpeg.so
/usr/lib/strigi/strigiea_jpeg.so



I exported the path of the libjpeg.so.8 as export 
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/i386-linux-gnu


Can you please help me why the texture are not loading?






... 

Thank you!

Cheers,
Koduri

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




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


[osg-users] Texture problem on Android With GLES1 (Not Environmental mapping)

2012-09-10 Thread Koduri Lakshmi
Hi,

I build OSG3.0.1 on android with OpenGLES1.
I red that Environmental mapping is not working on Android.
So I created a simple box.osg with simple texture mapping. When I load this the 
box it rendered as white only. There is texture. 

When I saw OBJ folder in Install directory I have libjpeg.a, libpng.a and 
libtiff.a files. I think these are the plug ins. 

Here I am giving the box.osg


Code:
MatrixTransform {
  DataVariance STATIC
  name __VIZARD_NODE__
  nodeMask 0x
  cullingActive TRUE
  description # osgmaxexp material data
Name01 - Default
Map Diffuse 0   1   images\\Concrete.Cast-In-Place.Exposed 
Aggregate.Medium.jpg

  StateSet {
UniqueID StateSet_0
rendering_hint DEFAULT_BIN
renderBinMode INHERIT
GL_LIGHTING ON
  }
  referenceFrame RELATIVE
  Matrix {
1 0 -0 0
0 1 -0 0
-0 -0 1 0
0 0 -0 1
  }
  num_children 1
  MatrixTransform {
DataVariance STATIC
name Box01
nodeMask 0x
cullingActive TRUE
referenceFrame RELATIVE
Matrix {
  0.364764 0 -0 0
  0 0.364764 -0 0
  -0 -0 0.364764 0
  0 0 -0 1
}
num_children 1
Geode {
  UniqueID Geode_1
  DataVariance STATIC
  name Box01-GEODE
  nodeMask 0x
  cullingActive TRUE
  num_drawables 1
  Geometry {
name 01 - Default
StateSet {
  UniqueID StateSet_2
  name 01 - Default
  rendering_hint DEFAULT_BIN
  renderBinMode INHERIT
  GL_CULL_FACE ON
  GL_LIGHTING ON
  GL_NORMALIZE ON
  Material {
ColorMode OFF
ambientColor 0.588235 0.588235 0.588235 1
diffuseColor 1 1 1 1
specularColor 0 0 0 1
emissionColor 0 0 0 1
shininess 0
  }
  textureUnit 0 {
GL_TEXTURE_2D ON
Texture2D {
  UniqueID Texture2D_3
  file images\\Concrete.Cast-In-Place.Exposed Aggregate.Medium.jpg
  wrap_s REPEAT
  wrap_t REPEAT
  wrap_r CLAMP_TO_EDGE
  min_filter LINEAR_MIPMAP_LINEAR
  mag_filter LINEAR
  maxAnisotropy 1
  borderColor 0 0 0 0
  borderWidth 0
  useHardwareMipMapGeneration TRUE
  unRefImageDataAfterApply TRUE
  internalFormatMode USE_IMAGE_DATA_FORMAT
  resizeNonPowerOfTwo FALSE
  shadowComparison FALSE
  shadowCompareFunc GL_LEQUAL
  shadowTextureMode GL_LUMINANCE
}
  }
}
useDisplayList TRUE
useVertexBufferObjects FALSE
PrimitiveSets 1
{
  DrawArrays TRIANGLES 0 36
}
VertexArray Vec3Array 36
{
  -15 0 15
  15 0 15
  -15 0 -15
  15 0 -15
  -15 30 15
  15 30 15
  -15 30 -15
  15 30 -15
  15 0 -15
  -15 0 15
  15 30 -15
  -15 30 15
  -15 0 15
  15 0 15
  15 30 15
  15 30 15
  -15 30 15
  -15 0 15
  15 0 15
  15 0 -15
  15 30 -15
  15 30 -15
  15 30 15
  15 0 15
  15 0 -15
  -15 0 -15
  -15 30 -15
  -15 30 -15
  15 30 -15
  15 0 -15
  -15 0 -15
  -15 0 15
  -15 30 15
  -15 30 15
  -15 30 -15
  -15 0 -15
}
VertexIndices UniqueID UShortArray_4 UShortArray 36
{
  0 2 3 8 1 9 4 5 7 10
  6 11 12 13 14 15 16 17 18 19
  20 21 22 23 24 25 26 27 28 29
  30 31 32 33 34 35 
}
NormalBinding PER_VERTEX
NormalArray Vec3Array 36
{
  0 -1 -0
  0 -1 -0
  0 -1 -0
  0 -1 -0
  0 1 0
  0 1 0
  -0 1 -0
  0 1 0
  0 -1 -0
  0 -1 -0
  -0 1 -0
  -0 1 -0
  0 0 1
  0 0 1
  0 0 1
  0 0 1
  0 0 1
  0 0 1
  1 -0 -0
  1 -0 -0
  1 -0 -0
  1 0 0
  1 0 0
  1 0 0
  0 0 -1
  0 0 -1
  0 0 -1
  0 0 -1
  0 0 -1
  0 0 -1
  -1 0 -0
  -1 0 -0
  -1 0 -0
  -1 -0 0
  -1 -0 0
  -1 -0 0
}
NormalIndices Use UShortArray_4
ColorBinding OVERALL
ColorArray Vec4Array 1
{
  1 1 1 1
}
TexCoordArray 0 Vec2Array 36
{
  0 0
  1 0
  0 1
  1 1
  0 0
  1 0
  0 1
  1 1
  0 0
  1 0
  0 1
  1 1
  0 1
  1 0
  0 0
  1 0
  1 1
  1 1
  0 1
  0 0
  1 1
  0 0
  1 1
  0 0
  0 0
  1 0
  1 1
 

Re: [osg-users] Error while loading OSG model on Android

2012-09-06 Thread Koduri Lakshmi
Hi Jordi Torres,

Thanks a lot for the nice help.

To day I did some experiments. 

The AR library is giving pose matrix. Now I decomposed it into tans, rotation 
and scale vectors. And checked with each one by matrix multiplication. I found 
that the translation vector is irrelevant. I got transpose as like   17.98  
14.45 155.76 ect. With these values the model is not appread on the screen.  If 
I set the trans vect as 0.0 0.0 1 then the model is at the center of the screen.

I don't know why this behavior. I am posting in QCAR forum for help.

Is there any think I need to to with OSG?

Here is the complete code again 


Code:
int x=0;
int y=0;

int width=screenWidth;
int height=screenHeight;

_viewer = new osgViewer::Viewer();
_viewer-setUpViewerAsEmbeddedInWindow(x, y, width, height);
 _root = new osg::Group();

_viewer-realize();
_state = _root-getOrCreateStateSet();
_state-setMode(GL_LIGHTING, osg::StateAttribute::ON);
_state-setMode(GL_DEPTH_TEST, osg::StateAttribute::ON);
_state-setMode(GL_CULL_FACE, osg::StateAttribute::ON);


_viewer-addEventHandler(new 
osgGA::StateSetManipulator(_viewer-getCamera()-getOrCreateStateSet()));


_manipulator = new osgGA::KeySwitchMatrixManipulator;

_manipulator-addMatrixManipulator( '1', Trackball, new 
osgGA::TrackballManipulator() );
_manipulator-addMatrixManipulator( '2', Flight, new 
osgGA::FlightManipulator() );
_manipulator-addMatrixManipulator( '3', Drive, new 
osgGA::DriveManipulator() );
_manipulator-addMatrixManipulator( '4', Terrain, new 
osgGA::TerrainManipulator() );
_manipulator-addMatrixManipulator( '5', Orbit, new 
osgGA::OrbitManipulator() );
_manipulator-addMatrixManipulator( '6', FirstPerson, new 
osgGA::FirstPersonManipulator() );
_manipulator-addMatrixManipulator( '7', Spherical, new 
osgGA::SphericalManipulator() );

_viewer-setCameraManipulator( _manipulator.get() );

_viewer-getViewerStats()-collectStats(scene, true);



_viewer-getCamera()-setViewport(0,0,screenWidth, screenHeight);


_viewer-getCamera()-setClearMask(GL_DEPTH_BUFFER_BIT );



modelSwitch=new osg::Switch;
trans=new osg::MatrixTransform();


osg::ref_ptrosg::Node loadedModel = 
osgDB::readNodeFile(/mnt/sdcard/OSG/lz.osg);
if (loadedModel == 0) {
LOG(Model not loaded);
} else {
LOG(Model loaded);


loadedModel-setName(/mnt/sdcard/OSG/lz.osg);

trans-addChild(loadedModel.get());
modelSwitch-addChild(trans.get());
}

_root-addChild(modelSwitch.get());

_viewer-setSceneData(NULL);
_viewer-setSceneData(_root.get());
_manipulator-getNode();
_viewer-home();


mload=false;
}
modelSwitch-setAllChildrenOff(); 
modelSwitch-setChildValue(trans,1);





State state = Renderer::getInstance().begin();
// Explicitly render the Video Background
Renderer::getInstance().drawVideoBackground();

for(int tIdx = 0; tIdx  state.getNumActiveTrackables(); tIdx++)
{

  // Get the trackable:
  const Trackable* trackable = state.getActiveTrackable(tIdx);
  Matrix44F modelViewMatrix = 
Tool::convertPose2GLMatrix(trackable-getPose());




  osg::Matrix mat;
  mat.set(osg::Matrix(modelViewMatrix.data));


  osg::Vec3f tr,scal;
  osg::Quat rot,so,rot1,rot2;
  mat.decompose(tr,rot,scal,so);


  mat=osg::Matrix( 
osg::Matrix::scale(osg::Vec3(scal.x(),scal.y(),scal.z()))  * 
osg::Matrix::translate(0.0,0.0,1.0) * osg::Matrix::rotate(rot));

  trans-setMatrix(mat);

  _viewer-frame();
  Renderer::getInstance().end();
  break;
}




I am reading the OSG model every time while rendering. That is for every 
viewer-frame(). If not reading the model is displayed only once. Do I need to 
take any clean up steps after viewer-frame().

Once again I will go through osgAndroid ( https://gitorious.org/osgandroid ) 
example.
 
Once again thank you very much for the nice help.



... 

Thank you!

Cheers,
Koduri

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




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


[osg-users] How to get Sequence node to contorl animaton

2012-09-06 Thread Koduri Lakshmi
Hi,

I have an OSG file contains a sequence of objects. I read this OSG file and 
assigned to a transformation matrix. 

Now I want to get back the sequence to the OSG::Sequence object from the 
transformation matrix to control animation.

How can I get sequence and control the animaton?

Can you please help me what to do?
... 

Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] Error while loading OSG model on Android

2012-09-05 Thread Koduri Lakshmi
Hi,

Thank you verymuch for the quick help.

I forgot to mention in the previous post that I made video as background by 
making GL_DEPTH_BUFFER_BIT. That is I used  
_viewer-getCamera()-setClearMask(GL_DEPTH_BUFFER_BIT ).


I have a look at the code of osgAnroidExample. But I am not able to find any 
specific info about camera settings in any of the C++ files.

If I assign the transformation matrix which I got from the 3rd Party AR library 
then model is not appearing on the screen. If not assign the transformation 
matrix then the model is appeared on the screen.

AR library is giving a projection matrix. I used 
_viewer-getCamera()-setProjectionMatrix(osg::Matrix(projectionMatrix.data));.
 But even I am not able to see model on scree. 

Here I listed the full OSG code with the transformation matrix


Code:
int x=0;
int y=0;

int width=screenWidth;
int height=screenHeight;

_viewer = new osgViewer::Viewer();
_viewer-setUpViewerAsEmbeddedInWindow(x, y, width, height);
 _root = new osg::Group();

_viewer-realize();
_state = _root-getOrCreateStateSet();
_state-setMode(GL_LIGHTING, osg::StateAttribute::ON);
_state-setMode(GL_DEPTH_TEST, osg::StateAttribute::ON);
_state-setMode(GL_CULL_FACE, osg::StateAttribute::ON);

_viewer-addEventHandler(new 
osgGA::StateSetManipulator(_viewer-getCamera()-getOrCreateStateSet()));


_manipulator = new osgGA::KeySwitchMatrixManipulator;

_manipulator-addMatrixManipulator( '1', Trackball, new 
osgGA::TrackballManipulator() );
_manipulator-addMatrixManipulator( '2', Flight, new 
osgGA::FlightManipulator() );
_manipulator-addMatrixManipulator( '3', Drive, new 
osgGA::DriveManipulator() );
_manipulator-addMatrixManipulator( '4', Terrain, new 
osgGA::TerrainManipulator() );
_manipulator-addMatrixManipulator( '5', Orbit, new 
osgGA::OrbitManipulator() );
_manipulator-addMatrixManipulator( '6', FirstPerson, new 
osgGA::FirstPersonManipulator() );
_manipulator-addMatrixManipulator( '7', Spherical, new 
osgGA::SphericalManipulator() );

_viewer-setCameraManipulator( _manipulator.get() );

_viewer-getViewerStats()-collectStats(scene, true);

_viewer-getCamera()-setViewport(0,0,screenWidth, screenHeight);
_viewer-getCamera()-setClearMask(GL_DEPTH_BUFFER_BIT );

modelSwitch=new osg::Switch;
trans=new osg::MatrixTransform();

osg::ref_ptrosg::Node loadedModel = 
osgDB::readNodeFile(/mnt/sdcard/OSG/lz.osg);
if (loadedModel == 0) {
LOG(Model not loaded);
} else {
LOG(Model loaded);


loadedModel-setName(/mnt/sdcard/OSG/test.osg);

trans-addChild(loadedModel.get());
modelSwitch-addChild(trans.get());
}

_root-addChild(modelSwitch.get());

_viewer-setSceneData(NULL);
_viewer-setSceneData(_root.get());
_manipulator-getNode();
_viewer-home();


   State state = Renderer::getInstance().begin();
  // Explicitly render the Video Background
   Renderer::getInstance().drawVideoBackground();
  
  for(int tIdx = 0; tIdx  state.getNumActiveTrackables(); tIdx++)
   {
  
//_viewer-getCamera()-setProjectionMatrix(osg::Matrix(projectionMatrix.data));
 //NotGetting even I set projection matrix
 // Get the trackable:
const Trackable* trackable = state.getActiveTrackable(tIdx);
Matrix44F modelViewMatrix = 
Tool::convertPose2GLMatrix(trackable-getPose());

osg::Matrix mat;
mat.set(osg::Matrix(modelViewMatrix.data));
trans-setMatrix(mat);

osg::Vec3f tr,scal;
osg::Quat rot,so,rot1,rot2;
mat.decompose(tr,rot,scal,so);


 _viewer-frame();

  Renderer::getInstance().end();
  break;
   }


   
I logged the Transformation matrix and here I am giving two of them


Code:
0.953237  -0.0311842  0.300609  0  
0.165658  -0.778015  -0.606012  0  
0.252777  0.627472  -0.736467  0  
16.6605  14.1914  162.78  1  

Equalent OSG scale and Tranlate vectors (x,y,z values):  1  1  1 and 16.6605   
14.1914   162.78 


0.999434  0.0286711  0.0175895  0  
0.0336364  -0.853354  -0.520246  0  
9.4044e-05  0.520543  -0.853835  0  
75.0211  38.932  197.853  1  

Equalent OSG scale and Tranlate vectors (x,y,z values):  1  1  1 and 75.0211  
38.932  197.853 



3rdParty AR library gave an example to draw a teapot. Here I am giving that 
code for the reference. 


Code:


 // Set GL11 flags:
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_NORMAL_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);

glEnable(GL_TEXTURE_2D);
glDisable(GL_LIGHTING);

//getting tracker code and setting video code here (as above)
...



// Load projection matrix:
glMatrixMode(GL_PROJECTION);
glLoadMatrixf(projectionMatrix.data);

// Load model 

Re: [osg-users] Error while loading OSG model on Android

2012-09-03 Thread Koduri Lakshmi
Hi Jordi Torres,

Thank you very much for the help.

As you suggested I rendered the model with out transform. Model rendered on 
screen.

I am using a 3rd party lib for AR tracking. This lib is configured video 
background. This config is for video background. 

Here is the config code


Code:
 CameraDevice cameraDevice = QCAR::CameraDevice::getInstance();
 VideoMode videoMode = cameraDevice.  
getVideoMode(QCAR::CameraDevice::MODE_DEFAULT);

VideoBackgroundConfig config;
config.mEnabled = true;  //Enables/disables rendering of the video backgroun
config.mSynchronous = true; //Enables/disables synchronization of video 
background and tracking data
/*Relative position of the video background in the render target in pixels. 
Describes the offset of the center of video background to the center of the 
screen (viewport) in pixels. (0,0) is the center of the screen*/
config.mPosition.data[0] = 0.0f;
config.mPosition.data[1] = 0.0f;
/*Width and height of the video background in pixels. */
config.mSize.data[0] = screenWidth;
config.mSize.data[1] = videoMode.mHeight
* (screenWidth / (float)videoMode.mWidth); //for 
correct aspect ratio



Renderer::getInstance().setVideoBackgroundConfig(config);



After config video background I am rendering video background with the 
following statement


Code:
Renderer::getInstance().drawVideoBackground();




Even with the transformation matrix the model is rendering correctly with out 
this statement. When I added this statement the model disappears on the screen.

I tried to set Viewport and projection matrix to the viewers camera. But still 
I not able to see the 3D model on screen.


This is the code for OSG INIT


Code:
if(mload)
  {
  
LOG(Init==);   
  int x=0;
  int y=0;

  int width=screenWidth;
  int height=screenHeight;

  _viewer = new osgViewer::Viewer();
_viewer-setUpViewerAsEmbeddedInWindow(x, y, width, height);
 _root = new osg::Group();

_viewer-realize();
_state = _root-getOrCreateStateSet();
_state-setMode(GL_LIGHTING, osg::StateAttribute::ON);
_state-setMode(GL_DEPTH_TEST, osg::StateAttribute::ON);
_state-setMode(GL_CULL_FACE, osg::StateAttribute::ON);

_viewer-setSceneData(_root.get());

_viewer-addEventHandler(new osgViewer::StatsHandler);
_viewer-addEventHandler(new 
osgGA::StateSetManipulator(_viewer-getCamera()-getOrCreateStateSet()));
_viewer-addEventHandler(new osgViewer::ThreadingHandler);
_viewer-addEventHandler(new osgViewer::LODScaleHandler);

 _manipulator = new osgGA::KeySwitchMatrixManipulator;

_manipulator-addMatrixManipulator( '1', Trackball, new 
osgGA::TrackballManipulator() );
_manipulator-addMatrixManipulator( '2', Flight, new 
osgGA::FlightManipulator() );
_manipulator-addMatrixManipulator( '3', Drive, new 
osgGA::DriveManipulator() );
_manipulator-addMatrixManipulator( '4', Terrain, new 
osgGA::TerrainManipulator() );
_manipulator-addMatrixManipulator( '5', Orbit, new 
osgGA::OrbitManipulator() );
_manipulator-addMatrixManipulator( '6', FirstPerson, new 
osgGA::FirstPersonManipulator() );
_manipulator-addMatrixManipulator( '7', Spherical, new 
osgGA::SphericalManipulator() );

_viewer-setCameraManipulator( _manipulator.get() );

_viewer-getViewerStats()-collectStats(scene, true);


_viewer-getCamera()-setViewport(0,0,width, height);


_viewer-getCamera()-setProjectionMatrix(osg::Matrix(projectionMatrix.data));



trans=new osg::MatrixTransform();


LOG(Load Model);
  osg::ref_ptrosg::Node loadedModel = 
osgDB::readNodeFile(/mnt/sdcard/OSG/lz.osg);
  if (loadedModel == 0) {
LOG(Model not loaded);
} else {
LOG(Model loaded);


loadedModel-setName(/mnt/sdcard/OSG/lz.osg);
//_root-addChild(loadedModel);
trans-addChild(loadedModel.get());
}

  _root-addChild(trans.get());

_viewer-setSceneData(NULL);
_viewer-setSceneData(_root.get());
 _manipulator-getNode();
_viewer-home();

_viewer-getDatabasePager()-clear();
_viewer-getDatabasePager()-registerPagedLODs(_root.get());
_viewer-getDatabasePager()-setUpThreads(3, 1);
_viewer-getDatabasePager()-setTargetMaximumNumberOfPageLOD(2);
_viewer-getDatabasePager()-setUnrefImageDataAfterApplyPolicy(true, true);
mload=false;
  }

//_viewer-frame(); [b]If I enabled only this by commenting the following then 
the model renders correctly.[/b]


State state = Renderer::getInstance().begin();
  // Explicitly render the Video Background
Renderer::getInstance().drawVideoBackground();   //
  
  for(int tIdx = 0; tIdx  state.getNumActiveTrackables(); tIdx++)
   {
 // Get the trackable:
const Trackable* trackable = state.getActiveTrackable(tIdx);
Matrix44F modelViewMatrix = 
Tool::convertPose2GLMatrix(trackable-getPose());


 

Re: [osg-users] Error while loading OSG model on Android

2012-08-29 Thread Koduri Lakshmi
Hello Jordi Torres,

Thank you very much for the help.

I added OSG macros and got loaded models. 

But when I say viewer-frame i am getting only blew screen. I am not able to 
see model.

Here is my code

Code:


  if(mload)
  {
  
LOG(Init);   
  int x=0;
  int y=0;

  int width=screenWidth;
  int height=screenHeight;
 
  _viewer = new osgViewer::Viewer();
_viewer-setUpViewerAsEmbeddedInWindow(x, y, width, height);
 _root = new osg::Group();

_viewer-realize();
_state = _root-getOrCreateStateSet();
_state-setMode(GL_LIGHTING, osg::StateAttribute::ON);
_state-setMode(GL_DEPTH_TEST, osg::StateAttribute::ON);
_state-setMode(GL_CULL_FACE, osg::StateAttribute::ON);

//_viewer-setSceneData(_root.get());

//_viewer-addEventHandler(new osgViewer::StatsHandler);
   // _viewer-addEventHandler(new 
osgGA::StateSetManipulator(_viewer-getCamera()-getOrCreateStateSet()));
//_viewer-addEventHandler(new osgViewer::ThreadingHandler);
   // _viewer-addEventHandler(new osgViewer::LODScaleHandler);
_viewer-getViewerStats()-collectStats(scene, true);

trans=new osg::MatrixTransform();


LOG(Load Model);
  osg::ref_ptrosg::Node loadedModel = 
osgDB::readNodeFile(/mnt/sdcard/OSG/lz.osg);
  if (loadedModel == 0) {
LOG(Model not loaded);
} else {
LOG(Model loaded);


loadedModel-setName(/mnt/sdcard/OSG/lz.osg);
   // _root-addChild(loadedModel);
trans-addChild(loadedModel.get());
}

  _root-addChild(trans.get());

_viewer-setSceneData(NULL);
_viewer-setSceneData(_root.get());
 _viewer-home();

_viewer-getDatabasePager()-clear();
_viewer-getDatabasePager()-registerPagedLODs(_root.get());
_viewer-getDatabasePager()-setUpThreads(3, 1);
_viewer-getDatabasePager()-setTargetMaximumNumberOfPageLOD(2);
_viewer-getDatabasePager()-setUnrefImageDataAfterApplyPolicy(true, true);
mload=false;
  }

 modelViewMatrix =  Tool::convertPose2GLMatrix(trackable-getPose());//Pose 
Matrix

osg::Matrix mat;


mat.set(modelViewMatrix.data[0],modelViewMatrix.data[1],modelViewMatrix.data[2],modelViewMatrix.data[3],

modelViewMatrix.data[4],modelViewMatrix.data[5],modelViewMatrix.data[6],modelViewMatrix.data[7],

modelViewMatrix.data[8],modelViewMatrix.data[9],modelViewMatrix.data[10],modelViewMatrix.data[11],

modelViewMatrix.data[12],modelViewMatrix.data[13],modelViewMatrix.data[14],modelViewMatrix.data[15]);


trans-setMatrix(mat);
trans-preMult(osg::Matrix::scale(osg::Vec3(3,3,3)));//With out 
this also no model

 _viewer-frame();



Can you please help me why the model is not displayed.

I am doing it for AR application. 
When I run application I got only blue screen. How can I show the camera image 
as background instead of blue screen?





... 

Thank you!

Cheers,
Koduri

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




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


[osg-users] Error while loading OSG model on Android

2012-08-28 Thread Koduri Lakshmi
Hi,

I build OSGAndroid example on Ubuntu device. I loaded and displayed OSG model 
successfully on my mobile device.

Now I used the OSG lib in my project which are using some other libs. 
I made changes to Android.mk and Application.mk and compiled successfully.
But to load model I gave static path to readNodeFile as 
/mnt/sdcard/OSG/lz.osg.

When I run as Android Application I got Model not loaded message on cat log.

If I give the same static path in OSGAndroid example then it is working. 

I am using Android 2.2 and OpenGl1.1 versions.

Do i need to add any other things to my project.

Can you please help me why the model is not loading?
... 

Thank you!

Cheers,
Koduri

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




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


[osg-users] How to know that two OSG models are touch each other

2012-08-27 Thread Koduri Lakshmi
Hi,

I have two OSG models. The first is constant about rotation and translation 
about Z. This model is just translating about X and Y axis.

The second model is variable about translation and rotation.

Now I want to call a function when first model come across second model. That 
is when first and second models are touch each other I need to call a function. 

To do this, I calculated the screen coordinates for both models. Formed a 
rectangles for both with these coordinates. If these two rectangles intersect 
then I called the function. But this not working perfectly as second model is 
free about rotation and translation.

Can any one please help me how to solve this problem.

... 

Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] [osgPlugins] JPG plugin problem in OSG3.0.1

2012-07-07 Thread Koduri Lakshmi
Hi,

I got it. I checked Advanced tab in CMake.
... 

Thank you!

Cheers,
Koduri

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




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


[osg-users] How to read OSG models in MulthiThreaded Program

2012-06-22 Thread Koduri Lakshmi
Hi,

I need to load multiple OSG models of huge size (each model 60MB). So I wrote 
a multi threaded program to read each model in a seperate thread. But I am 
getting runtime error. Here I am giving code to read 2 models.


Code:
CRITICAL_SECTION cs;


struct ModelObj
{
Model *obj;
int id;
};

std::vector HANDLE T;


UINT ThreadProc1(LPVOID lpvoid)
{
ModelObj *temp = (ModelObj*)lpvoid;

temp-obj-trans[temp-id] = new osg::MatrixTransform;  
//Transformation node

temp-obj-modelSwitch-addChild(temp-obj-trans[temp-id].get()); //Added to 
model swithc
temp-obj-model[temp-id] = 
osgDB::readNodeFile(temp-obj-fileNames[temp-id]); //Reading model

if(temp-obj-model[temp-id])
{

temp-obj-trans[temp-id]-addChild(temp-obj-model[temp-id].get());
}


return 0;
}




In main function


//model is a class

ModelObj *obj1;
obj1=new ModelObj;
obj1-id=0;
obj1-obj = model;

ModelObj *obj2;
obj2=new ModelObj;
obj2-id=1;
obj2-obj = model;

strcpy(model.fileNames[0],1.osg);
strcpy(model.fileNames[1],2.osg);

InitializeCriticalSection(cs);


T.push_back (CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) 
ThreadProc1, (LPVOID)obj1, CREATE_SUSPENDED, NULL));   
T.push_back(CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) ThreadProc1, 
(LPVOID)obj2, CREATE_SUSPENDED, NULL));   

ResumeThread(T[0]);
ResumeThread(T[1]);

WaitForMultipleObjects(2, T[0], TRUE, INFINITE); //wait till all 
models are red

DeleteCriticalSection(cs);

std::cout-- R E A D ALL M O D E L Sstd::endl;


...

//here rendering frames




when I run this code i am getting runtime error. With out reading model code in 
ThreadProc1 function the behaviour is correct. That is main function is 
waiting till all the threads are finished.

Do I need to take any care while reading OSG models. 
Is there any other way to read OSG files faster?
Can you please guide to read OSG models in  multi thread applicaiton.

... 

Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] How to assign an osg::image to another osg::image

2012-06-14 Thread Koduri Lakshmi
Hi Sergey,

Thank you very much for the help .

ImageDB[imgIdx]= new osg::Image(*sCapImage, osg::CopyOp::DEEP_COPY_ALL);

This statement worked for me. 
... 

Thank you!

Cheers,
Koduri

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




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


[osg-users] Hwo to change the color of the OSG model dynamically

2012-06-14 Thread Koduri Lakshmi
Hi,

I want to rotate a model around an axis about 360 degrees. While rotating I 
want to change the color of the model dynamically. Some parts of the model has 
static colors and some parts has applied with textures. 

For example a tea pot. The lid has a solid color say RED and other parts are 
applied with a texture. Now I want to rotate tea pot around 360 degrees and 
while rotating I need to change the texture and color of the lid.

Can I do this by overloading traverse/apply methods. How can I identify the lid 
and other part of the tea pot to apply color/texture.

How can I identify the texture coordinates and color coordinates?

Can you please guide me in a right way to  achieve this task.

... 

Thank you!

Cheers,
Koduri

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




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


[osg-users] How to assign an osg::image to another osg::image

2012-06-13 Thread Koduri Lakshmi
Hi,

I am doing a program to capture the screen of renderer model. I did it by 
setting graphic context. Now I am getting image.

Now I am setting all these images to an array and then finally saving to the 
disk. But I am getting only the last image. Here is the code



Code:
sCapImage-scaleImage(320,240,1);  //sCapImage is the image contains the screen 
data and it is declared as osg::ref_ptrosg::Image sCapImage;

ImageDB[imgIdx] = new osg::Image;
//ImageDB is declared as osg::ref_ptrosg::Image ImageDB[100];

ImageDB[imgIdx]-allocateImage(sCapImage-s(), sCapImage-t(), 1, GL_RGB, 
GL_UNSIGNED_BYTE);

ImageDB[imgIdx]=sCapImage;
for(int i=1;i99;i++)
{
char tmp[10];
itoa(i,tmp,10);
char pngName[30];
strcpy(pngName,C:\\Test\\);
strcat(pngName,tmp);
strcat(pngName,.png);
std::coutpngNamestd::endl;
osgDB::writeImageFile(*(ImageDB[i]),pngName);
}



osg::ref_ptrosg::Image ImageDB[200]; is the ImageDB
osg::ref_ptrosg::Image sCapImage; are the declarations.

are the declarations .

Can you please help me where am i doing mistake



... 

Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] Keyboard Event handler Problem

2012-06-12 Thread Koduri Lakshmi
Hi,

Can any one please help me what could be the mistake.


... 

Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] Keyboard Event handler Problem

2012-06-12 Thread Koduri Lakshmi
Hi,

This is my mistake. I am deactivating the render window and activating another 
window. I am getting messages when I selected the render window.

... 

Thank you!

Cheers,
Koduri

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




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


[osg-users] Keyboard Event handler Problem

2012-06-11 Thread Koduri Lakshmi
Hi,

I want to get events from the keyboard. To do this I created a class by 
deriving osgGA::GUIEventHandler and implemented hanlder method.

But  my program is not catching the events. Here is my code


Code:
class KeyboardEventHandler : public osgGA::GUIEventHandler
{
bool isImageCaptured;
public:
KeyboardEventHandler(): osgGA::GUIEventHandler()
{
isImageCaptured=false;
}
   virtual bool handle(const osgGA::GUIEventAdapter 
ea,osgGA::GUIActionAdapter);
   
   bool getImageCapFlag()
   {
   return isImageCaptured;
   }
};
bool KeyboardEventHandler::handle(const osgGA::GUIEventAdapter 
ea,osgGA::GUIActionAdapter aa)
 {
  std::coutIn Event Handlerstd::endl;
   switch(ea.getEventType())
   {
   case(osgGA::GUIEventAdapter::KEYDOWN):
  {
 std::coutEvent handerler std::endl;

 switch(ea.getKey())
 {
 case 'i':
std::cout  I Pressed   std::endl;
isImageCaptured=false;
return false;
break;
 default:
return false;
 } 
  }
   default:
  return false;
   }
}



In the above code I am getting In Event Handler message but not getting I 
Pressed. 

I also implemented the following code to take a screen capture. If I remove 
this code than key board events are working


Code:
HMONITOR monitor = MonitorFromWindow(hWnd, MONITOR_DEFAULTTONEAREST);
MONITORINFO info;
info.cbSize = sizeof(MONITORINFO);
GetMonitorInfo(monitor, info);
int XRes = info.rcMonitor.right - info.rcMonitor.left;
int YRes = info.rcMonitor.bottom - info.rcMonitor.top;


traits = new osg::GraphicsContext::Traits;
traits-target = osg::Camera::FRAME_BUFFER_OBJECT;
traits-x =0;
traits-y =0;
traits-width = XRes;
traits-height = YRes;
traits-windowDecoration = true;
traits-doubleBuffer = true;
traits-sharedContext = 0;
traits-pbuffer = false;

gContext= osg::GraphicsContext::createGraphicsContext(traits.get());

viewer-getCamera()-setGraphicsContext(gContext);
gCamera = viewer-getCamera();

gCamera-setViewport(new osg::Viewport(0,0,XRes,YRes));

double fovy, aspectRatio, zNear, zFar;
gCamera-getProjectionMatrixAsPerspective(fovy, aspectRatio, zNear, 
zFar);

fovy+=41.0;

gCamera-setProjectionMatrixAsPerspective(fovy, aspectRatio, zNear, 
zFar);


viewer-setDataVariance(osg::Object::DYNAMIC);
viewer-setThreadingModel(osgViewer::Viewer::SingleThreaded);


sCapImage = new osg::Image;
sCapImage-allocateImage(720, 576, 1, GL_RGB, GL_UNSIGNED_BYTE);
gCamera-attach(osg::Camera::COLOR_BUFFER, sCapImage);





I added setAllowEventFocus(false) for both gCamera and main camera. Even I am 
not getting key board events

Can you please help me where am I doing wrong?


... 

Thank you!

Cheers,
Koduri

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




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


[osg-users] [build] Android Compile Errors with 3rd Party library

2012-06-05 Thread Koduri Lakshmi
Hi,

First Thank you very much for OSG Android.
 
I am new to Android-ndk. I have a library (QCAR )  for AR.  I am trying to use 
OSG as a render engine for QCAR. So I want to include OSG in QCAR program. I 
include some of OSG includes in my C++ program. When I compile I am getting 
error. My Android.mk file looks like this

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
OSG_ANDROID_DIR := 
/root/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets
LIBDIR  := $(OSG_ANDROID_DIR)/obj/local/armeabi

LOCAL_C_INCLUDES:= $(OSG_ANDROID_DIR)/include
LOCAL_CPPFLAGS  := -DOSG_LIBRARY_STATIC 

include $(CLEAR_VARS)
LOCAL_MODULE := QCAR-prebuilt
LOCAL_SRC_FILES = ../../../build/lib/$(TARGET_ARCH_ABI)/libQCAR.so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../build/include
include $(PREBUILT_SHARED_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE := ImageTargets
LOCAL_CFLAGS := -Wno-write-strings $(OPENGLES_DEF)

LOCAL_LDLIBS := \
-llog $(OPENGLES_LIB)
LOCAL_SHARED_LIBRARIES := QCAR-prebuilt

LOCAL_SRC_FILES := .
include $(BUILD_SHARED_LIBRARY)

when I compile (ndk-build) I am getting the following error

jni/ImageTargets.cpp:17:31: error: osgDB/DatabasePager: No such file or 
directory
jni/ImageTargets.cpp:18:26: error: osgDB/Registry: No such file or directory
jni/ImageTargets.cpp:19:26: error: osgDB/ReadFile: No such file or directory
jni/ImageTargets.cpp:20:27: error: osgDB/WriteFile: No such file or directory
make: *** [obj/local/armeabi/objs-debug/ImageTargets/ImageTargets.o] Error 1


All these errors with OSG  lib.  Can you please help me how to compile this?

... 


Thank you!

Cheers,
Koduri

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




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


[osg-users] Model not loaded in Android

2012-05-26 Thread Koduri Lakshmi
Hi,

I build AndroidOSG-3.0.1 on my ubuntu-11 with GLES-1. When I run the 
application I got it on my android phone. When I tried to load model (with the 
path /mnt/stdcard/OSG/cow.osg) I am getting error as Model Not loaded in the 
log. 

Can you please help me why am I getting this error.

... 

Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] Model not loaded in Android

2012-05-26 Thread Koduri Lakshmi
Hi,

It's the problem with me. My phone shows all OSG files in sdcard. But when I 
browsed in file explorer of Eclips it's not showing any OSG files. My be 
problem with my device and trying to solve the problem.

 
... 

Thank you!

Cheers,
Koduri

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




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


[osg-users] Problem with Video Display

2012-05-14 Thread Koduri Lakshmi
Hi,

I am doing some exporments on Augmented Reality . In my programe i need to 
display 3D OSG model and videos for a selected markers. 
 
My marker traking lib is giving a 4X4 matrix. By setting this matrix to a 
transformation matrix I am able to display OSG model on the marker.

But for the video I need to display on full screen or the same size as of video 
. So I am not assigning any matrix to the transformation matrix. With this no 
video displayed on the screen. 
So I assigned a matrix statically to the transformation matrix then I am able 
to see video on the screen. The code is given bellow


Code:

double temp_mat_1[16]={-0.999,0.003,0.011,0,

  -0.010,-0.700,-0.713,0,

   0.005,-0.713,0.700,0,

   194.047,121.5,-276.475,1
};
mat.set(temp_mat_1);
videoTransMat-setMatrix(mat);
videoStrm -seek(0);
videoStrm -play();




Doing this way is making problem to me. Because I need to change the matrix 
every time when the video resolution changes. 

When I do a sample program to load video then it displayes with the same 
resolution as of the video. In this program the transformation matrix does not 
contain any thing. The code is given bellow


Code:
void main()
   {
   osg::ref_ptrosg::ImageStream mImageStream;
   //osg::ref_ptrosg::Texture mVideoTexture;
   osg::ref_ptrosg::Texture2D mVideoTexture;
   osg::ref_ptrosg::Geode mVideoGeode;
   osg::ref_ptrosg::Geode geode = new osg::Geode;
   osg::Image* img;

   img = osgDB::readImageFile(C:\\Test\\ar352wa.mp4.ffmpeg);
   mImageStream = dynamic_castosg::ImageStream*(img);
   mVideoTexture = new osg::Texture2D;
   mVideoTexture-setImage( mImageStream.get() );


   geode-addDrawable(osg::createTexturedQuadGeometry(
 osg::Vec3(0, 0, 0),
 osg::Vec3(videoWidth, 0, 0),
 osg::Vec3(0, 0, videoHeight)
 ));
   geode-getOrCreateStateSet()-setTextureAttributeAndModes(0, mVideoTexture, 
osg::StateAttribute::ON );
   osg::MatrixTransform *transformation = new osg::MatrixTransform(); 
   transformation-addChild(geode.get());
   mImageStream-play();
   osgViewer::Viewer viewer;
   viewer.setCameraManipulator(new osgGA::TrackballManipulator());
   viewer.setUpViewInWindow (200, 200, 600, 600);
   viewer.setSceneData( transformation );
   while(!viewer.done())
   {

   viewer.frame();
   }
} 



Can you please help me what modification i need to do to my AR program to 
display the video.

AR Video Load code


Code:
img = osgDB::readImageFile(filename);
videoStrm = dynamic_castosg::ImageStream*(img);
mVideoTexture = new osg::Texture2D;
geode = new osg::Geode;
mVideoTexture-setImage(videoStrm.get() );
   float videoWidth = img-s()*img-getPixelAspectRatio() ;
float videoHeight =img-t();
geode-addDrawable(osg::createTexturedQuadGeometry(
osg::Vec3(0, 0, 0),
osg::Vec3(videoWidth, 0, 0),
osg::Vec3(0, 0, videoHeight)
));
geode-getOrCreateStateSet()-setTextureAttributeAndModes(0, mVideoTexture, 
osg::StateAttribute::ON );
videoTransMat = new osg::MatrixTransform();
videoTransMat-addChild(geode.get());
modelSwitch-addChild(videoTransMat);  



AR Viewer Settings


Code:
viewer = new osgViewer::Viewer();
viewer-setUpViewInWindow (200, 200, videoXRes, videoYRes);
viewer-getCamera()-setViewport(0,0,videoXRes,videoYRes);  
viewer-setLightingMode(osg::View::HEADLIGHT);
viewer-addEventHandler(new CSimpleWndSizeHandler(videoXRes,videoYRes));
/*p is projection matrix from camera*/
viewer-getCamera()-setProjectionMatrix(osg::Matrix(p)); 




Can you please help me what to do?
... 

Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] Problem with Video Display

2012-05-14 Thread Koduri Lakshmi
Hi,
Can any one help me how to slove this problem.

In my AR program if I set  viewersetCameraManipulator(new 
osgGA::TrackballManipulator()) then I am gettting the video output correctly. 
This time OSG model is not displayed on the marker(screen).

Here are my AR viewer Settings


Code:
viewer = new osgViewer::Viewer();
viewer-setUpViewInWindow (200, 200, videoXRes, videoYRes);
viewer-getCamera()-setViewport(0,0,videoXRes,videoYRes);  
viewer-setLightingMode(osg::View::HEADLIGHT);
viewer-addEventHandler(new CSimpleWndSizeHandler(videoXRes,videoYRes));
/*p is projection matrix from camera*/
viewer-getCamera()-setProjectionMatrix(osg::Matrix(p)); 



I think here TrackballManiplator is doing some default settings to the viewer. 
Can any one please help me what settings do i need to set to my AR program to 
get video display correctly.
... 

Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] How set the Video at the center of the screen

2012-05-11 Thread Koduri Lakshmi
Hi,

I did a example to load video. But here it is playing correctly in the center 
of the screen. Here I used camera manipulator as TrackballManipulator().
But in project (as given above) i am not using TrackballManipulator(). If I 
used TrackballManipulator() then the 3D models are out of screen. 

Can you please help me what settings i need to set to get the video correctly 
on to the screen.

In the exaple program my transformation matrix is empty. That is I am not doing 
any operatins on transformation matrix. If I do the same on my project then the 
video is out of screen. 

And in example program the video is repeated (looping) automatically. But in my 
project it is not and giving error no frames when reaches to the end.

Can you please help me what to do

Here is my example program


Code:
void main()
{
osg::ref_ptrosg::ImageStream mImageStream;
//osg::ref_ptrosg::Texture mVideoTexture;
osg::ref_ptrosg::Texture2D mVideoTexture;
osg::ref_ptrosg::Geode mVideoGeode;
osg::ref_ptrosg::Geode geode = new osg::Geode;
osg::Image* img;

img = osgDB::readImageFile(C:\\Test\\ar352wa.mp4.ffmpeg);
mImageStream = dynamic_castosg::ImageStream*(img);
mVideoTexture = new osg::Texture2D;
mVideoTexture-setImage( mImageStream.get() );


geode-addDrawable(osg::createTexturedQuadGeometry(
osg::Vec3(0, 0, 0), 
osg::Vec3(videoWidth, 0, 0), 
osg::Vec3(0, 0, videoHeight) 
));
geode-getOrCreateStateSet()-setTextureAttributeAndModes(0, 
mVideoTexture, osg::StateAttribute::ON );
osg::MatrixTransform *transformation = new osg::MatrixTransform();  
transformation-addChild(geode.get());
mImageStream-play();
osgViewer::Viewer viewer;
viewer.setCameraManipulator(new osgGA::TrackballManipulator());
viewer.setUpViewInWindow (200, 200, 600, 600);
viewer.setSceneData( transformation );
while(!viewer.done())
{

viewer.frame();
}
}



... 

Thank you!

Cheers,
Koduri

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




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


[osg-users] How set the Video at the center of the screen

2012-05-10 Thread Koduri Lakshmi
Hi,


It may be a simple one, but I am struggling since two days. 
I am using a osg::Switch to load multiple models. It loads OSG models for some 
options time and videos for some options.

When I loaded models the model displayed in the middle of the screen. If I 
display the video it is not in the scope of the screen. I took transformation 
matrix and did some rotations and transilations but i am unable to place the 
video at the center of the screen. can any one help me how to bring the video 
to the center of the screen.

My Viewer Settings


Code:
viewer = new osgViewer::Viewer();
viewer-setUpViewInWindow (200, 200, videoXRes, videoYRes);
viewer-getCamera()-setViewport(0,0,videoXRes,videoYRes);  
viewer-setLightingMode(osg::View::HEADLIGHT);
viewer-addEventHandler(new CSimpleWndSizeHandler(videoXRes,videoYRes));
/*p is projection matrix from camera*/
viewer-getCamera()-setProjectionMatrix(osg::Matrix(p));



When I switch from model to video my code is as follwos


Code:
modelSwitch-setAllChildrenOff();
modelSwitch-setChildValue(videoTransMat,1);
/*Here i am doing some rotationa and transform operations on videoTransMAt. 
but i am unable to center to it*/



As in the OsgMovie example i created a 2d Texture and playing movie.
It is as follows


Code:
img = osgDB::readImageFile(filename);
videoStrm = dynamic_castosg::ImageStream*(img);
videoStrm-setLoopingMode(osg::ImageStream::LoopingMode::LOOPING);
mVideoTexture = new osg::Texture2D;
geode = new osg::Geode;
mVideoTexture-setImage(videoStrm.get() );
geode-addDrawable(osg::createTexturedQuadGeometry(
osg::Vec3(0, 0, 0), 
osg::Vec3(videoWidth, 0, 0), 
osg::Vec3(0, 0, videoHeight) 
));
geode-getOrCreateStateSet()-setTextureAttributeAndModes(0, mVideoTexture, 
osg::StateAttribute::ON );
videoTransMat = new osg::MatrixTransform();
 videoTransMat-addChild(geode.get());
modelSwitch-addChild(videoTransMat);


... 


I am getting error when the video reaches to the end. My video is not in loop. 
But I set looping mode  to osg::ImageStream::LoopingMode::LOOPING

Can you please help me how to play the video in the center of the screen and 
set the video in loop.


Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] Rewind the scene

2012-04-23 Thread Koduri Lakshmi
Hi,

Any one has the  solution for this. I too has the same problem.

I need to jump to some position in the animation. (My osg has animation).

Can any one please help me what to do to jump to a specified position by 
providing the time/frame number.
... 

Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] [build] [Tutorial] Building osgAndroidExampleGLES1/2 on Ubuntu 11.10

2012-04-06 Thread Koduri Lakshmi
Hi Seylox,

Thank you very much  for nice tutorial. I am new to OSG and Android 
development. I followed you tutorial and did successfully. But I got some 
problems while building. Here I listed my problems with solutions. It may 
useful for some one.

Error - 1) While bulding I got the error 

 error while loading shared libraries: libz.so: cannot open shared object 
file: No such file or directory . 

I am using Ubuntu 64bit.  The zlib library is loaded in the folder 
/lib/x86_64-linux-gnu. I made a soft link to /user/lib. Then I got ELF error. 
Because it is 64bit. So I downloaded 32 Linux 3rd party build from 
alphapixel.com and copied the libz.so.1 to /usr/lib.

With this I am able to create static library.

Error - 2

While bulding in Eclipse i got 

error while loading shared libraries: libstdc++.so.6: cannot open shared object 
file: No such file or directory

For this I installed libstdc++ 32 bit version. This as follows

apt-get install lib32stdc++6 lib32gcc1
apt-get install lib32ncurses5 lib32gcc1
apt-get install libsdl1.2-dev lib32gcc1
apt-get install ia32-libs lib32gcc1

Error - 3

when running I got an error like
must override a super class method in osgViewer.java

Fro this I changed java complier version to 1.6 from 1.5

Note: Check the complier version in Configure Project Specific Settings.. 
also. (Preferences)


After these I am able to run application on my Android device.

While bulding Why it is looking for 32 bit libs?

After loaded the application I am not able to see any model on the screen. 

Can anyone please help me how to load the model on the screen.

Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] Trans/Rot need for quad fill entire screen?

2012-04-05 Thread Koduri Lakshmi
Hi,

Use setVertexArray method of Quad. Set four sides of Quad with Vect3Array. 

vertices-push_back( osg::Vec3(-0.250f, 0.0f,-0.250f) );
vertices-push_back( osg::Vec3( 0.250f, 0.0f,-0.250f) );
vertices-push_back( osg::Vec3( 0.250f, 0.0f, 0.250f) );
vertices-push_back( osg::Vec3(-0.250f, 0.0f, 0.250f) );

Numbers may chage on your screen. Use the color array to fill wiht color.


... 

Thank you!

Cheers,
wiz

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




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


Re: [osg-users] Any libraries of public domain shapes for Open Scene Graph?

2012-04-05 Thread Koduri Lakshmi
Hi,

As of my knowledge you can try GLUT library. It is opensource lib.


... 

Thank you!

Cheers,
wiz

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




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