Re: [osg-users] osgText and GL3.3 core profile

2016-10-05 Thread Roman Grigoriev
Just checked my old way http://forum.openscenegraph.org/download.php?id=6045 to 
use compileGLObjects and use glBindVertexArray in DrawForegroundText - works 
fine.
For now I can't know to use VertexArrayState way in osgText

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





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


Re: [osg-users] osgText and GL3.3 core profile

2016-10-05 Thread Roman Grigoriev
Hi, Robert!
It's under Ubuntu 16.04 but with Intel i5 Mesa drivers 12.0.1
Now  Mesa support GL 3.0 compatability profile and
GL 3.3 ONLY Core profile. I need geometry shaders and I have to use GL3.3 Core 
profile and use VAO
Long time ago I posted my version of osgText with VAO. 
forum.openscenegraph.org/viewtopic.php?t=14783
with patch http://forum.openscenegraph.org/download.php?id=6045
But I thought that in vertex_array_object branch all will be worked fine
But not.

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





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


Re: [osg-users] osgText and GL3.3 core profile

2016-10-05 Thread Roman Grigoriev
First thing I made is attach shaders to osgText.
Problem is that in GL core profile OGL doesn't show at all without VAO.

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





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


[osg-users] osgText and GL3.3 core profile

2016-10-05 Thread Roman Grigoriev
Hi,
I have to port my software to intel graphics under linux,
but in mesa drivers only GL 3.3 core context, 
so I switched to vertex_array_object branch 
and slightly modify osgQT to have core context in embedded GL windows. 
All works fine but osgText.
I know that I have to switch on VAO on text, but I don't know the right way. 
Nothing drawed at all, even simple quads. 
Maybe someone already tried make similar, please share your solution.
Thank you!

Cheers,
Roman

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





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


Re: [osg-users] Seeking feedback on options new laptop for delivering training/occasional dev work

2016-02-25 Thread Roman Grigoriev
Hi,Robert!

I use MSI GE62 with nvidia 965M on Ubuntu. Because of Nvidia Optimus I don't 
have V-Sync and it can't be disabled in BIOS. But overs OpenGL and CUDA 
features works well. Nvidia Prime works fine without tearing. Also I have 
i7-4720, that compiles very fast. So I add two Samsung SSD drives and have 
300Mb/s speed. It's unexpensive 15.6 notebook. Also I managed to run Oculus on 
this notebook under Ubuntu, and can't do it under Win8.1. I'm happy with it for 
it's price. 

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] segfaults with glDeleteShader

2015-11-02 Thread Roman Grigoriev
Hi, Robert!
Sorry for disturbing you about that.
In my .earth file I use rex driver with splatting code by using agglite driver 
that generate landcover from very big vector file. Bug appears to me after 
30-40min of using osgearth_viewer on my laptop. I try to generate .earth file 
that it'll be easily to track. 

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] High event times

2015-11-02 Thread Roman Grigoriev
Hi, Mathias and Robert!
Just checked this.
On i7 laptop with nvidia 965m under Lubuntu 15.04 with 352.30 drivers I've got 
numbers
without patch eventtime=0.17ms with patch 0.09ms
But I've add folowing  if (_traits->windowDecoration) to above code
So I think that if user create window without decoration that means that he 
don't want to resize or move window at all.

Thank you!

Cheers,
Roman

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





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


[osg-users] segfaults with glDeleteShader

2015-11-02 Thread Roman Grigoriev
Hi, I use osg and osgearth git version under linux  Lubuntu 15.04 nvidia 352 
driver.
And got segfaults on delete shaders 

Code:

#0  0x734fbe09 in glDeleteShader () from /usr/lib/nvidia-352/libGL.so.1 
#1  0x76c8bce5 in osg::Shader::PerContextShader::~PerContextShader() () 
from /usr/local/lib64/libosg.so.140 
#2  0x76c8bf59 in osg::Shader::PerContextShader::~PerContextShader() () 
from /usr/local/lib64/libosg.so.140 
#3  0x76c8c3ae in osg::Shader::ShaderObjects::~ShaderObjects() () from 
/usr/local/lib64/libosg.so.140 
#4  0x76c8ae8d in osg::Shader::releaseGLObjects(osg::State*) const () 
from /usr/local/lib64/libosg.so.140 
#5  0x76c73375 in osg::Program::releaseGLObjects(osg::State*) const () 
from /usr/local/lib64/libosg.so.140 
#6  0x77a8af81 in 
osgEarth::VirtualProgram::releaseGLObjects(osg::State*) const () from 
/usr/local/lib64/libosgEarth.so.0 
#7  0x77a2eb55 in osgEarth::StateSetCache::prune() () from 
/usr/local/lib64/libosgEarth.so.0 
#8  0x77a2ea0e in osgEarth::StateSetCache::pruneIfNecessary() () from 
/usr/local/lib64/libosgEarth.so.0 
#9  0x77a2e8a5 in 
osgEarth::StateSetCache::share(osg::ref_ptr&, 
osg::ref_ptr&, bool) () from 
/usr/local/lib64/libosgEarth.so.0 
#10 0x77a2db0a in (anonymous 
namespace)::ShareStateAttributes::applyStateSet(osg::StateSet*) () from 
/usr/local/lib64/libosgEarth.so.0 
#11 0x77a2d89c in (anonymous 
namespace)::ShareStateAttributes::apply(osg::Node&) () from 
/usr/local/lib64/libosgEarth.so.0 
#12 0x77895ef6 in osg::Group::accept(osg::NodeVisitor&) () from 
/usr/local/lib64/libosgEarth.so.0 
#13 0x77a2e4fd in 
osgEarth::StateSetCache::consolidateStateAttributes(osg::Node*) () from 
/usr/local/lib64/libosgEarth.so.0 
#14 0x72e84753 in 
osgEarth::Features::GeometryCompiler::compile(std::list >&, 
osgEarth::Symbology::Style const&, osgEarth::Features::FilterContext const&) () 
from /usr/local/lib64/libosgEarthFeatures.so.0 
#15 0x72e825cf in 
osgEarth::Features::GeometryCompiler::compile(osgEarth::Features::FeatureCursor*,
 osgEarth::Symbology::Style const&, osgEarth::Features::FilterContext const&) 
() 
   from /usr/local/lib64/libosgEarthFeatures.so.0 
#16 0x72e6563b in 
osgEarth::Features::GeomFeatureNodeFactory::createOrUpdateNode(osgEarth::Features::FeatureCursor*,
 osgEarth::Symbology::Style const&, osgEarth::Features::FilterContext const&, 
osg::ref_ptr&) () from /usr/local/lib64/libosgEarthFeatures.so.0 
#17 0x72e51339 in 
osgEarth::Features::FeatureModelGraph::createStyleGroup(osgEarth::Symbology::Style
 const&, std::list >&, 
osgEarth::Features::FilterContext const&) () from 
/usr/local/lib64/libosgEarthFeatures.so.0 
#18 0x72e51726 in 
osgEarth::Features::FeatureModelGraph::createStyleGroup(osgEarth::Symbology::Style
 const&, osgEarth::Symbology::Query const&, 
osgEarth::Features::FeatureIndexBuilder*) () 
   from /usr/local/lib64/libosgEarthFeatures.so.0 
#19 0x72e4eeed in 
osgEarth::Features::FeatureModelGraph::buildLevel(osgEarth::Features::FeatureLevel
 const&, osgEarth::GeoExtent const&, osgEarth::TileKey const*) () 
   from /usr/local/lib64/libosgEarthFeatures.so.0 
#20 0x72e4e08a in osgEarth::Features::FeatureModelGraph::load(unsigned 
int, unsigned int, unsigned int, std::string const&) () from 
/usr/local/lib64/libosgEarthFeatures.so.0 
#21 0x72e55d1a in 
osgEarthFeatureModelPseudoLoader::readNode(std::string const&, osgDB::Options 
const*) const () from /usr/local/lib64/libosgEarthFeatures.so.0 
#22 0x767ecb73 in 
osgDB::Registry::ReadNodeFunctor::doRead(osgDB::ReaderWriter&) const () from 
/usr/local/lib64/libosgDB.so.140 
#23 0x767e6903 in osgDB::Registry::read(osgDB::Registry::ReadFunctor 
const&) () from /usr/local/lib64/libosgDB.so.140 
#24 0x767e786f in 
osgDB::Registry::readImplementation(osgDB::Registry::ReadFunctor const&, 
osgDB::Options::CacheHintOptions) () from /usr/local/lib64/libosgDB.so.140 
#25 0x767e831f in osgDB::Registry::readNodeImplementation(std::string 
const&, osgDB::Options const*) () from /usr/local/lib64/libosgDB.so.140 
#26 0x7679a5c6 in osgDB::DatabasePager::DatabaseThread::run() () from 
/usr/local/lib64/libosgDB.so.140 
#27 0x7482bb5e in OpenThreads::ThreadPrivateActions::StartThread(void*) 
() from /usr/local/lib64/libOpenThreads.so.20 
#28 0x758c46aa in start_thread (arg=0x7fffc97fa700) at 
pthread_create.c:333 
#29 0x75be1eed in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:109 




So if I comment line 47 in Shader.cpp
if (extensions->isGlslSupported) extensions->glDeleteShader( globj );
and 51 in Program.cpp
if (extensions->isGlslSupported) extensions->glDeleteProgram( globj );
and I don't have segfaults.

It's very easily to reproduse simple run 

Re: [osg-users] [ANN] osgVegetation - A vegetation database builder

2015-01-22 Thread Roman Grigoriev
I managed to compile it under Linux gcc 4.8.2 on ubuntu 14.04
For portability I suggest using std::runtime_error than std::exception.
Also please use #include osg/Vec3 than #include osg/vec3
I slightly change CmakeLists.txt. and all compiles fine.
Best regards,
Roman

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





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


Re: [osg-users] hardware instancing with VertexAttribs and VertexAttribsDivisor

2014-11-24 Thread Roman Grigoriev
Hi, Nick!
Long time ago I tried to implement model with moving parts instancing. For 
forests it works OK but when you have many moving parts you have to once 
collect matrices and after send it to TBO to render. Also there are a lot of 
state switches in model. Another difficulty is model picking and also bounding 
box calculation. So I gave up.
And if you implemented it now could you please drop a code to view it.


Thank you!

Cheers,
Roman

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





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


Re: [osg-users] hardware instancing with VertexAttribs and VertexAttribsDivisor

2014-11-24 Thread Roman Grigoriev
Hi,Nick! Also for some speedup I've read that it's good to store matrices as 
position and quatertion, and resore ModelViewMatrix in vertex shader because 
vertex calcualtion is very fast on modern GPU, and scale is not aplicable to 
this calculations.  

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] find nodes in clones

2014-08-28 Thread Roman Grigoriev
I have working prototype 
But I want to little bit optimize. 
I understand that for now to get node pointer from clone is the right way. 
I want to create scripted animation system for my app.
So I have 3 LODS in every lod i have animated part 
and  I want to calculate transform matrix in one callback attached to osg::LOD 
and not in 3 callbacks in every part. 
Thank you!
Cheers,
Roman

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





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


[osg-users] find nodes in clones

2014-08-27 Thread Roman Grigoriev
Hi,
I have to use clones of models in my subgraph and animate parts of  model.
My setup is 
1.load model
2.clone model (DEEP_COPY_NODES|DEEP_COPY_USERDATA)
3.find parts nodes by using node name
4. use callback to animate parts
Because of hundreds of clones I want to speed up process by finding parts nodes 
in base model and somehow calculate node pointer in clone
Is there some way to get node pointer in clone model if you know node pointer 
in base model?
Thank you!
Cheers,
Roman

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





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


[osg-users] Memory leak with Openthreads from git under Linux

2013-11-18 Thread Roman Grigoriev
Hi,
I use Openthreads and valgrind give me this errors under Ubuntu 13.10

Code:

==3658== 160 bytes in 1 blocks are possibly lost in loss record 1 of 2
==3658==at 0x482D4B8: calloc (vg_replace_malloc.c:593)
==3658==by 0x400C99D: allocate_dtv (dl-tls.c:296)
==3658==by 0x400CE4B: _dl_allocate_tls (dl-tls.c:460)
==3658==by 0x48544E9: pthread_create@@GLIBC_2.4 (allocatestack.c:579)
==3658==by 0x48D14FB: OpenThreads::Thread::start() (in 
/usr/local/lib/libOpenThreads.so.3.3.0)



Thank you!

Cheers,
Roman

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





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


[osg-users] Found solution how to use FBO on Android

2013-09-06 Thread Roman Grigoriev
Hi, for my device Google Nexus 10 Mali T-608,
The solution was very simple you have to  properly setup texture like this

 osg::ref_ptrosg::Texture2D tex = new Texture2D;
   tex-setTextureSize(texWidth, texHeight);
  tex-setInternalFormat(GL_RGBA8);
  tex-setSourceFormat(GL_RGBA);
  //for RGB565  
  //tex-setInternalFormat(GL_RGB565);
  //tex-setSourceFormat(GL_RGB);
 //for GL_R8  
 //  tex-setInternalFormat(GL_R8);
 // tex-setSourceFormat(GL_RED);
tex-setSourceType(GL_UNSIGNED_BYTE);
   tex-setResizeNonPowerOfTwoHint(false);
   tex-setFilter(Texture::MIN_FILTER, Texture::LINEAR);
   tex-setFilter(Texture::MAG_FILTER, Texture::LINEAR);
   tex-setWrap(Texture::WRAP_S, Texture::CLAMP_TO_EDGE);
   tex-setWrap(Texture::WRAP_T, Texture::CLAMP_TO_EDGE);

and after that
  colorCamera1-attach(osg::Camera::COLOR_BUFFER, tex.get());

colorCamera1-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);

So if you don't set source format for texture you've got black screen.
But on PC on nvidia drivers all work fine without sorce format.
Also you can use NPOT textures like 2D textures - you have to setup texture 
coordinates from 0,0 to 1,1. 
And don't use osg::Camera::COLOR_BUFFER0-N because GL ES2 don't support MRT.
Cheers,
Roman

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





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


Re: [osg-users] Performance of Uniform-Buffer-Objects and question to the software design of osg::BufferObject

2013-08-30 Thread Roman Grigoriev
Hi, 
Nice examples. 
To extend functionality you can add hardware culling like this
http://rastergrid.com/blog/2010/06/instance-cloud-reduction-reloaded/
Also need to make some tests to see perfomance about dynamic matrix 
modification.
I think that best perfomance will be with Divisors.
To remove noisy messages you can comment this lines to work in OSG GL3.0 
stateSet-setAttributeAndModes(new osg::AlphaFunc(osg::AlphaFunc::GEQUAL, 
0.8f), osg::StateAttribute::ON);
and 
switchNode-addChild(lightSource);
in main.cpp
Thank you!
Cheers,
Roman

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





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


Re: [osg-users] FBO an android GLES2 failed

2013-07-19 Thread Roman Grigoriev
Hi, 
I tried to make FBO work on android, but failed 
Yes we should comment glDrawBuffers It doesn't exist on GLES2.0 
For now I have incomplete attachment. 
Here is my simple texture 
osg::ref_ptrosg::Texture2D visual_tex = new osg::Texture2D; 
visual_tex-setTextureSize( 256,256); 
visual_tex-setSourceFormat(GL_RGBA); 
visual_tex-setSourceType(GL_UNSIGNED_BYTE); 
visual_tex-setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR); 
visual_tex-setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR); 
visual_tex-setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE); 
visual_tex-setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE); 
visual_tex-setResizeNonPowerOfTwoHint(false); 
and camera 
colorCamera1-attach(osg::Camera::COLOR_BUFFER, visual_tex.get()); 
colorCamera1-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT); 
Could you please tell me why OSG bind renderbuffer and my texture to context? 
As far as I understand I don't bind MSFBO and I don't need to resolve 
framebuffer. 

Fail is here
void FrameBufferAttachment::attach(State state, GLenum target, GLenum 
attachment_point, const FBOExtensions* ext) const
{
unsigned int contextID = state.getContextID();

Texture::TextureObject *tobj = 0;
if (_ximpl-textureTarget.valid())
{ OSG_FATAL_ximpl-textureTarget.valid()std::endl;
tobj = _ximpl-textureTarget-getTextureObject(contextID);
if (!tobj || tobj-id() == 0)
{
OSG_FATAL_ximpl-textureTarget.valid()2std::endl;
_ximpl-textureTarget-compileGLObjects(state);
tobj = _ximpl-textureTarget-getTextureObject(contextID);

}
if (!tobj || tobj-id() == 0)
{
OSG_FATAL_ximpl-textureTarget.valid() failedstd::endl;
return;
}
}
Fail is in compileGLObjects.
My target is google nexus 10 with mali T604 
Thank you! 
Cheers, 
Roman

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





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


[osg-users] FBO an android GLES2 failed

2013-07-16 Thread Roman Grigoriev
Good day!
I try to add fbo support to GLES2 example on svn trunk but bot black quad
My code works on linux X11 but it doesn't work on GLES2

Code:

osg::ref_ptrosg::Texture2D visual_tex = new osg::Texture2D;
visual_tex-setTextureSize( 256,256);
visual_tex-setInternalFormat(GL_RGBA);
visual_tex-setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR);
visual_tex-setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR);
visual_tex-setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE);
visual_tex-setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE);
osg::ref_ptrosg::Camera colorCamera1 = new osg::Camera;
colorCamera1-setViewport(0,0,256,256);

colorCamera1-setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);
colorCamera1-setProjectionMatrixAsPerspective(15, 4.0f/3.0f,2.0f, 12000.f);
//colorCamera1-setCullMask(IS_VISIBLE_MASK);
colorCamera1-setClearColor(osg::Vec4f(0.0f,0.0f,1.0f,1.0f));
colorCamera1-setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
colorCamera1-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
colorCamera1-setRenderOrder(osg::Camera::PRE_RENDER);
colorCamera1-attach(osg::Camera::COLOR_BUFFER, visual_tex.get());

colorCamera1-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
colorCamera1-addChild(viewnode);
_root-addChild(colorCamera1.get());



in my hud camera if I change visual_tex to another preloaded texture all works 
fine.
And I don't have error messages about incomplete attachment.
Thank you!

Cheers,
Roman[/code]

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





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


Re: [osg-users] Android osgAndroidExampleGLES2 compiler errors

2013-07-07 Thread Roman Grigoriev
Hi,
The problem is in -lgnustl_static
if you simple remove it from LOCAL_LDLIBS, like that 
LOCAL_LDLIBS:= -llog -lGLESv2 -ldl -lz
and add it to the LOCAL_LDFLAGS at the end 
-lOpenThreads\
$(OSG_ANDROID_DIR)/obj/local/armeabi-v7a/libgnustl_static.a
where libgnustl_static.a is from your ndk-r8e diractory
all works fine. 
Thank you!
Cheers,
Roman

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





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


[osg-users] ParticleSystem reset state

2013-06-18 Thread Roman Grigoriev
Hi, I create some particle system and try to reuse from time to time but
initial number of particles constantly growing (suspect memory leaks here)
Is there some helper fuction that destroys all particle created before?
ResetTime and   
for(int i=0;idustParticleSystem-numParticles();i++)
dustParticleSystem-destroyParticle(i);
doesn't helps here.
Thank you!

Cheers,
Roman

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





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


Re: [osg-users] ParticleSystem reset state

2013-06-18 Thread Roman Grigoriev
Hi,Robert
I use particle system so at the end of my simulation cycle for example I emit 
total 100 particles and 30 particles alive.
I start another simulaton cycle and I need to have 0 particles emited and 0 
alive particles.
But I have 30 alive particles. I need to reset particlesystem. 
Could you please advice me how to make that. 
Thank you!
Cheers,
Roman

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





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


[osg-users] osg::ref ptr and memory leaks.

2013-06-07 Thread Roman Grigoriev
Hi,
Sorry for newbee question. But I found that my program memory usage grows up to 
200 k per cycle.
I try to find memory leak and maybe some guru look to this code portion and 
give me some advice. 
(sorry  because on linux when I copy code from qtcreator I've got some mess.)

Code:

  osg::ref_ptr  osg::MatrixTransform  viewnode_mtx;
osg::ref_ptr  SmokeParticleSystem  smoke_right;

class SmokeParticleSystem : public osg::Group {
private:
   // osgParticle::PointPlacer* placer;
public:
SmokeParticleSystem(osg::Group* scene, osg::MatrixTransform* 
mt,osg::Uniform *patt)  {
osgParticle::ParticleSystem* dustParticleSystem = new 
osgParticle::ParticleSystem;
osg::Geode *geode = new osg::Geode();
geode-addDrawable(dustParticleSystem);
this-addChild(geode);

// dustParticleSystem-setDefaultAttributes(smoke.rgb, false, false);
osgParticle::Particle smokeParticle;
smokeParticle.setSizeRange(osgParticle::rangef(1.5f,4.0f)); // meters
smokeParticle.setLifeTime(10); // seconds
smokeParticle.setMass(0.2f);
smokeParticle.setColorRange(osgParticle::rangev4(
osg::Vec4(1, 1.0f, 1.0f, 1.0f),
osg::Vec4(0.8, 0.8, 0.8, 0.0f)));
dustParticleSystem-setDefaultParticleTemplate(smokeParticle);
dustParticleSystem-setDefaultAttributesUsingShaders( smoke.rgb, 
false, 0 );
osgParticle::ParticleSystemUpdater *dustSystemUpdater = new 
osgParticle::ParticleSystemUpdater;
dustSystemUpdater-addParticleSystem(dustParticleSystem);
this-addChild(dustSystemUpdater);
osgParticle::ModularEmitter *emitter = new osgParticle::ModularEmitter;
emitter-setParticleSystem(dustParticleSystem);
this-addChild(emitter);
dustRate =
static_castosgParticle::RandomRateCounter 
*(emitter-getCounter());
dustRate-setRateRange(20,30);
osgParticle::PointPlacer* placer =
static_castosgParticle::PointPlacer *(emitter-getPlacer());
this-setUpdateCallback(new EmitterUpdateCallback(placer, mt));
osgParticle::RadialShooter* shooter =
static_castosgParticle::RadialShooter 
*(emitter-getShooter());
shooter-setThetaRange(-osg::PI_4/8.0, osg::PI_4/8.0 ); // radians, 
relative to Z axis.
shooter-setInitialSpeedRange(0,20); // meters/second
emitter-setShooter(shooter);
osgParticle::ModularProgram *program = new osgParticle::ModularProgram;
program-setParticleSystem(dustParticleSystem);
scene-addChild(program);

osgParticle::FluidFrictionOperator *airFriction = new 
osgParticle::FluidFrictionOperator;
airFriction-setFluidToAir();
airFriction-setWind(osg::Vec3(0.25, 0, 0));
program-addOperator(airFriction);

osgParticle::AccelOperator *accelUp = new osgParticle::AccelOperator;
accelUp-setToGravity(-0.2f);
program-addOperator(accelUp);

osg::StateSet* stateset = dustParticleSystem-getOrCreateStateSet();
stateset-setAttribute(program_data-particle_program);
osg::Uniform* baseTextureSampler = new osg::Uniform(baseTexture,0);
stateset-addUniform(baseTextureSampler);
stateset-addUniform(patt);
}
osgParticle::RandomRateCounter *dustRate;
};



At the begining of every cycle I clean root this way.

Code:

  viewnode_mtx-removeChildren(0,viewnode_mtx-getNumChildren());



when I need to add particle system to scenery root I use.

Code:

  this-smoke_right = new SmokeParticleSystem(this-viewnode, 
this-pat_r.get(),this-point_att_u);
this-smoke_right-setNodeMask(IS_VISIBLE_MASK);
this-smoke_right-setName(smoke);
this-viewnode_mtx-addChild( this-smoke_right);


  
Could you please comment if memory freed when I remove children or not. And 
maybe I should use ref_ptr on smokeparticlesystem. 
Thank you!
Cheers,
Roman

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





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


Re: [osg-users] osg::ref ptr and memory leaks.

2013-06-07 Thread Roman Grigoriev
Hi, Robert
Thanx for your quick reply, Is there any way to calculate memory usage of my 
custom particle system class? If I query this-smoke_right.valid() it returns 
false, when i remove children  but As far as you've seen I don't have 
destructor on my node and I suspect that internal geode and particle system 
doesn't free from memory. Maybe It's better in this situation not to use 
ref_ptr? Or maybe create particle system in the beginning and attach already 
made every time but  in this way I have to clean all particle system variables.
Thank you!
Cheers,
Roman

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





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


[osg-users] Constrain mouse movements to window area

2012-11-14 Thread Roman Grigoriev
Hi, I have ubuntu 12.10 with pure X server
On X screen there are three windows 
I want to limit mouse motions to left half of the screen
Is there any way to make this.
I use nvidia drivers 310.14.
Thank you!

Cheers,
Roman

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





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


Re: [osg-users] Review of osgQt changes.

2012-11-06 Thread Roman Grigoriev
Hi,Kristofer
I also work on integration osg in qt and my primary goal is to use composite 
viewer to render in embeded window and also on secondary secondary window 
without qt.
Now is the main problem is RTT render and multithreaded environment.
Also check my submissions to have forward context on X11
I think It's better to discuss all things in forum format. 
And maybe for begining you will post your code here to see changes.
Thank you!
Cheers,
Roman

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





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


Re: [osg-users] OpenGL 3.2 support in OS X 10.7 (Lion)

2012-11-02 Thread Roman Grigoriev
Hi, I followed to advice of David Garcia
to modify buffer object as he said but it doesn't work on linux.
To use forward context we definitly need VAO.
Here is my modified versions to support VAO.
In submissions there is GraphicsContextX11.cpp to open true 3.1 and up window.
Thank you!
Cheers,
Roman

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




Attachments: 
http://forum.openscenegraph.org//files/266_1351861595._536.
http://forum.openscenegraph.org//files/bufferobject_202.cpp


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


Re: [osg-users] OSG + QT and QTabWidget: Disappearing scene graph

2012-10-31 Thread Roman Grigoriev
Hi, I try also follow advice to make model on first tab visible but on ubuntu 
12.10 qt 4.8.3 and osg svn It doesn't work
I modify event method like this

Code:

virtual bool event( QEvent* event )
{
if (event-type() == QEvent::Timer)
{
if (static_castQTimerEvent*(event)-timerId() == _timerId)
{
frame();
return true;
}
}
if (event-type() == QEvent::Resize)
{
return false;
}
return QWidget::event(event);
}




Any hints?

... 

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] vsync under qt

2012-10-20 Thread Roman Grigoriev
Hi, I use ubuntu 12.10-x64 with nvidia drivers 304.51 under double GTX 670. 

Code:

osg::ref_ptrosg::GraphicsContext::Traits traits = new 
osg::GraphicsContext::Traits(osg::DisplaySettings::instance().get());
traits-width = ui-GLWidget_2-width();
traits-height = ui-GLWidget_2-height();
traits-doubleBuffer = true;
traits-vsync=true;
osgQt::GraphicsWindowQt* graphicsWindow = new 
osgQt::GraphicsWindowQt(traits.get());
QHBoxLayout *layout = new QHBoxLayout();
layout-addWidget(graphicsWindow-getGLWidget());
ui-GLWidget_2-setLayout(layout);




Thank you!

Cheers,
Roman

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





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


[osg-users] vsync under qt

2012-10-19 Thread Roman Grigoriev
Hi,
tried to set  under qt window
traits-vsync=true;
but in doesn't work 
How can I enable vsync?

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] How to update only one view in compositeviewer?

2012-09-14 Thread Roman Grigoriev
yes I tried to do this but I have active second context and have qt warnings
QOpenGLContext::swapBuffers() called with non-exposed window, behavior is 
undefined 
so it doesn't help
even more  if I have Vsync On to 60fps I have only 30 fps in null scenegraph in 
both windows and if I add to compositeviewer only one view I got 60 fps.

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





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


[osg-users] How to update only one view in compositeviewer?

2012-09-13 Thread Roman Grigoriev
Hi,

I have qt app with tab widget with two views in one compositeviewer
When I switch tab I'd like not to render invisible window.
I browse source and not found any method to disable rendering on certain view

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] OSG + QT and QTabWidget: Disappearing scene graph

2012-09-07 Thread Roman Grigoriev
under qt 5.0.0beta1 - it doesn't work
I've got this error

Qt at-spi: error getting the accessibility dbus address:  The name 
org.a11y.Bus was not provided by any .service files 
Accessibility DBus not found. Falling back to session bus.
Registered DEC:  true 
Error in contacting registry 
org.freedesktop.DBus.Error.ServiceUnknown 
The name org.a11y.atspi.Registry was not provided by any .service files 
This plugin does not support setting window opacity
QXcbConnection: XCB error: 3 (BadWindow), sequence: 576, resource id: 46137375, 
major code: 18 (ChangeProperty), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 577, resource id: 46137375, 
major code: 12 (ConfigureWindow), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 578, resource id: 46137375, 
major code: 8 (MapWindow), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 596, resource id: 46137375, 
major code: 18 (ChangeProperty), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 597, resource id: 46137375, 
major code: 12 (ConfigureWindow), minor code: 0
Cannot make QOpenGLContext current in a different thread

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





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


Re: [osg-users] OSG + QT and QTabWidget: Disappearing scene graph

2012-09-07 Thread Roman Grigoriev
PS 
if I use singlethreaded
I got errors
QOpenGLContext::swapBuffers() called with non-exposed window, behavior is 
undefined 
QOpenGLContext::swapBuffers() called with non-exposed window, behavior is 
undefined

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





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


Re: [osg-users] QT and OSG on separate X screens

2012-09-05 Thread Roman Grigoriev
I upgraded to Qt 5.0.0beta1 and my app works only if I use singlethreaded
overwise I got 
Cannot make QOpenGLContext current in a different thread

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





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


[osg-users] QT and OSG on separate X screens

2012-09-04 Thread Roman Grigoriev
Hi,
I'm trying to make QT app with osg on separate X screens under ubuntu 12.04 on 
nvidia 304 with qt 4.8.1. 
Compositeviewer with one view on first X and second view on second X works 
perfect.
But I need to make render window in QT widget on first screen and fullscreen 
osg window on second screen. 
I tried various approaches given in examples but it doesn't work,
 because I've got deadlock problem when QT and OSG tried to makecurrent() 
method.
Another alternative will be qtwidgets on first and second screens,
 but AFAIK qt doesn't allow to make this. 
Problem is that in qt 4.7.1 and with 295 drivers it works but now it doesn't. 
I tried single thread and multiply thread render but no result. 
The main problem is that I don't know how to debug this situation because 
hangouts can be after one minute or more. 
If someone have solution with this situation please give some hints.
Thank you!
Cheers,
Roman

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





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


[osg-users] FBO and SharedContext

2012-04-19 Thread Roman Grigoriev
Hi, I create CompositeViewer with two views and shared context,
 so I can map common textures from one context to another but not FBO. 
My goal is to render two views one with QT framing without postprocess effects 
and another on separate X screen with postprocess effects. 
So I construct CompositeViewer and use one view in GraphicsWindowQt and another 
in common frameless window. 
I use ViewerFrameThread class like in OsgQtWidgets example.
I also tested this on one X screen but I can't use shared FBO.
I create context like in osgsimplegl3 example.
Maybe someone come across to this problem and know solution?

Thank you!

Cheers,
Roman

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





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


[osg-users] [build] OSG NVTT svn gcc 4.6.1 build bug

2012-04-03 Thread Roman Grigoriev
Hi, got errors during today compilation about abstract type

to solve it need to add to  
struct OSGImageOutputHandler : public nvtt::OutputHandler  
virtual void endImage(); 
and 
void NVTTProcessor::OSGImageOutputHandler::endImage()
{

}

... 


Thank you!

Cheers,
Roman

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





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


[osg-users] Multiscreen setup under X and Qt

2012-02-29 Thread Roman Grigoriev
Hi,
I have this configuration dual Geforce 580 cards with 4 DVI outputs under 
Ubuntu 11.10 x64 and 295 drivers.
So I need to implement following setup 
first screen Qt fullscreen window with embedded OSG displayed on Monitor 
connected to first GPU.
second screen fullscreen OSG window, connected to HMD display on second GPU.
As far as I understand it's better to have shared context because I have to 
have identical image in embedded OSG window and on second screen. 
Maybe someone advice me what is the best way to use composite viewer or another 
technique.
And should I use TwinView or Separate X screens?   

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] Visibility of point array

2011-08-17 Thread Roman Grigoriev
Hi, Sergey!
I try to adopt transform feedback to osg and find some comments 

Code:

// next three methods MUST be called from thread that have valid opengl context 
(same context that this callback is initialized with)
// f.e. you can modify callback to use them in next frame to get previous frame 
results writed to some storage
// or have another drawcallback that uses them or texture generated by first 
one in same frame as they generated or whatever
// make sure to have proper draw order so callback that do transform feedback 
called before one's that uses results
// this functions returns stuff that represents results obtained from last draw 
call in this callback, previous results is lost.



so my noob question is how to create two draw callbacks on the same geometry, 
with correct order.
... 

Thank you!

Cheers,
Roman[/code]

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





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


Re: [osg-users] [osgCompute] TexSteramer fails in Cuda 4.0

2011-07-27 Thread Roman Grigoriev
Hi,Mick
All works fine.
I also tested with textureRectangle - and also works fine

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] [osgCompute] TexSteramer fails in Cuda 4.0

2011-07-25 Thread Roman Grigoriev
Hi,
Any news about how to postprocess textures in cuda 4.0?

Thank you!

Cheers,
Roman

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





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


[osg-users] [osgCompute] TexSteramer fails in Cuda 4.0

2011-07-11 Thread Roman Grigoriev
Hi,
I download 
http://www.cg.informatik.uni-siegen.de/data/Downloads/svt/osgComputeDemoApp.zip
and have black box 
also I have warnings - 
TexDemo::TexStreamer::init(): params are missing.
my setup is CUDA 4.0 lubuntu 11.04_x86 gcc 4.5.1 nvidia 275 Quadro 4000M
 

Thank you!

Cheers,
Roman

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





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


[osg-users] [vpb] Build globe around one hires region

2011-07-06 Thread Roman Grigoriev
Hi, I've built some hires regions diveded by 5 by 5 degrees like SRTM data. 
And now I want to create globe around it.
So I download bluemarble.tiff and built database by using vbpmaster whole globe 
and finnaly I've got z-fighting.
Because I have lowres and hi-res in the same time. 
Is there some way to insert hires into lowres?

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] [vpb] Build globe around one hires region

2011-07-06 Thread Roman Grigoriev
Hi,

I know that I have to load one database but I think that I have to build at 
first lowres globe and after that I have to patch this database with hires 
data. 
But I've already had hires chunks and want simply insert into globe.
Is it possible to patch one .osgb with another .osgb in vpb?

Thank you!

Cheers,
Roman

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





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


[osg-users] [vpb] Can't build polygonal database with latest VPB an OSG (segmentation fault)

2011-07-06 Thread Roman Grigoriev
Hi, I try to build globe database. Works fine but when I try to build poligonal 
database got segmentation fault. 
vpbmaster --geocentric --POLYGONAL --compressor-nvtt --compressed-dxt1 
--compression-quality-fastest  -t bluemarble.tif -o earth.osgb

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] [vpb] Can't build polygonal database with latest VPB an OSG (segmentation fault)

2011-07-06 Thread Roman Grigoriev
Hi,
Lubuntu 11.04 x86 
VPB from trunk 
osg from trunk 
nvtt from trunk 
gcc 4.5.1
here is output 

i@t520:~/work/atlantik/earth$ vpbmaster --geocentric --POLYGONAL -t 
bluemarble.tif -l 6 -o 1.osgb
--geocentric 
-t bluemarble.tif
ADD: bluemarble.tif
-o 1.osgb
Adding terrainTile 
DataSet::generateTasks_new
local_extents = xMin() -180.00 180.00
yMin() -90.00 90.00
AR=2.00 C1=2 R1=1
Computed maximum source level = 5
Selected single split at 2
local_extents = xMin() -180.00 180.00
yMin() -90.00 90.00
AR=2.00 C1=2 R1=1
   Task directory already created
   Log directory already created
totalNumOfTasksSansRoot = 2
getTaskName(1,0,0) no nest, 2 0
getTaskName(1,1,0) no nest, 2 0
Generated tasks file = build_master.tasks
Revsion source = 1.osgb.0.source
Setting up MachinePool to use all 4 cores on this machine.
Begining run
scheduling task : tasks/build_root_L0_X0_Y0.task
scheduling task : tasks/build_subtile_L1_X0_Y0.task
scheduling task : tasks/build_subtile_L1_X1_Y0.task
machine=t520 running task=tasks/build_root_L0_X0_Y0.task
machine=t520 running task=tasks/build_subtile_L1_X0_Y0.task
machine=t520 running task=tasks/build_subtile_L1_X1_Y0.task
Now checking for plug-in osgPlugins-3.1.0/osgdb_nvtt.so
osg::Registry::addImageProcessor(ImageProcessor)
Loaded plug-in osgPlugins-3.1.0/osgdb_nvtt.so and located ImageProcessor
Now checking for plug-in osgPlugins-3.1.0/osgdb_nvtt.so
osg::Registry::addImageProcessor(ImageProcessor)
Loaded plug-in osgPlugins-3.1.0/osgdb_nvtt.so and located ImageProcessor
Now checking for plug-in osgPlugins-3.1.0/osgdb_nvtt.so
osg::Registry::addImageProcessor(ImageProcessor)
Loaded plug-in osgPlugins-3.1.0/osgdb_nvtt.so and located ImageProcessor
Segmentation fault
machine=t520 completed task=tasks/build_subtile_L1_X0_Y0.task in 0.8 seconds
Number of tasks completed 1, running 2, pending 0. Estimated time to completion 
0 seconds, 54.1 percent done.

Warning: Task tasks/build_subtile_L1_X0_Y0.task has failed, blacklisting 
machine t520 and resubmitting task.

Segmentation fault
machine=t520 completed task=tasks/build_subtile_L1_X1_Y0.task in 0.9 seconds
Number of tasks completed 2, running 1, pending 0. Estimated time to completion 
1 seconds, 56.1 percent done.

Warning: Task tasks/build_subtile_L1_X1_Y0.task has failed, blacklisting 
machine t520 and resubmitting task.

osg::Registry::removeImageProcessor();
machine=t520 completed task=tasks/build_root_L0_X0_Y0.task in 1.0 seconds
Number of tasks completed 3, running 0, pending 1. Estimated time to completion 
0 seconds, 61.7 percent done.
End of TaskSet: tasksPending=2 taskCompleted=1 taskRunning=0 tasksFailed=0
End of run: tasksPending=2 taskCompleted=1 taskRunning=0 tasksFailed=0
MachinePool::reportTimingStats()
Machine : t520
Task::type=''   minTime=0.770286maxTime=1.021428
averageTime=0.888108totalComputeTime=2.664324   numTasks=3
Finished run, but did not complete 2 tasks.
Total elapsed time = 2.408422
Run Complete.
Recieved signal 15, doing TERMINATE_RUNNING_TASKS_THEN_EXIT.
MachinePool::signal(15)
Machine::signal(15)
Machine::cancelThreads() hostname=t520, threads=4
  Cancel thread
  Cancel thread
  Cancel thread
  Cancel thread
Completed Machine::cancelThreads() hostname=t520, threads=4

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] [vpb] Can't build polygonal database with latest VPB an OSG (segmentation fault)

2011-07-06 Thread Roman Grigoriev
Hi,
Maybe you try to reproduce this error that happens only if you try to build 
whole globe. I take world.tif from osgearth data.
vpbmaster --geocentric --POLYGONAL -t world.tif  -o 1.osgb
if I try to build some region all works fine.
Thank you!

Cheers,
Roman

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





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


Re: [osg-users] [vpb] Can't build polygonal database with latest VPB an OSG (segmentation fault)

2011-07-06 Thread Roman Grigoriev
Hi, here is gdb
Starting program: /usr/local/bin/osgdem --run-path /home/i/work/atlantik/earth 
-s build_master.source --record-subtile-on-leaf-tiles -l 2 --task 
tasks/build_root_L0_X0_Y0.task --log logs/build_root_L0_X0_Y0.log
[Thread debugging using libthread_db enabled]
RegisterWindowingSystemInterfaceProxy()
X11WindowingSystemInterface()
GraphicsContext::setWindowingSystemInterface() 0x80821280xbbcf60
Opened DynamicLibrary osgPlugins-3.1.0/osgdb_osg.so
VPBReaderWriter::readNode()
readNode_new()
   found ReaderWriter, readNode_new()
Opened DynamicLibrary libosgTerrain.so
Opened DynamicLibrary osgPlugins-3.1.0/osgdb_serializers_osgterrain.so
Opened DynamicLibrary libosg.so
Constructing PixelBufferObject for image=0x80a93e0
Constructing PixelBufferObject for image=0x80b6238
CullSettings::readEnvironmentalVariables()
Opened DynamicLibrary osgPlugins-3.1.0/osgdb_serializers_osg.so
Now checking for plug-in osgPlugins-3.1.0/osgdb_nvtt.so
osg::Registry::addImageProcessor(ImageProcessor)
Loaded plug-in osgPlugins-3.1.0/osgdb_nvtt.so and located ImageProcessor

Program received signal SIGSEGV, Segmentation fault.
0x00de8fca in std::_Rb_treeosg::ref_ptrEdgeCollapse::Edge, 
osg::ref_ptrEdgeCollapse::Edge, 
std::_Identityosg::ref_ptrEdgeCollapse::Edge , dereference_less, 
std::allocatorosg::ref_ptrEdgeCollapse::Edge  
::_M_erase(std::_Rb_tree_nodeosg::ref_ptrEdgeCollapse::Edge *) ()
   from /usr/local/lib/libosgUtil.so.78

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] [build] 2.9.14 and trunk problems on lubuntu 11.04+lxde+nvidia

2011-05-26 Thread Roman Grigoriev
Hi,

I tested developer releases so starting from 2.9.12 this thing happens
my config g++4.5.2 and tested with 260 270 and even beta 275 drivers
on quadro 4200m and nvidia ion2 and 8600mgt
 
Thank you!

Cheers,
Roman

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





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


[osg-users] Best way to use osg::Switch

2011-05-23 Thread Roman Grigoriev
Hi,
I need some info for using switches.
So I need to simulate visual and thermal images and user can press a key to 
switch between views so I create a matrixtransform to move objects and add 
switch child to switch between modes and add two child nodes to simulate two 
signatures and add my matrix transform to main viewnode. Also I created switch 
that switches camera because I use RTT and add first camera that render to 
texture to my main viewnode. But in ths configuration I double viewnode because 
I add viewnode to visual camera and thermal camera. Is there a way to avoid 
doubles in memory or there is another way?  

Thank you!

Cheers,
Roman

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





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


[osg-users] Array allocation

2011-03-30 Thread Roman Grigoriev
Hi,
Have some simple question
I need to store my object position in a memory
I create osg::Vec3Array like this
osg::Vec3Array* varray = new osg::Vec3Array();
and store my positions there 
when I need to save  another track I use empty() method and store another track
My question is what is the best method to release this buffer when I finish my 
app or osg automatically clean memory?
... 

Thank you!

Cheers,
Roman

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





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


[osg-users] QT and fullscreen OSG

2011-01-26 Thread Roman Grigoriev
Hi,
I created app that use osg from trunk and QT 4.7.1 as messaging system. So I 
use osg in borderless window and popup qt dialogs. Here we come to main problem 
under vista and linux if screen resolution (1024*768) is more than window 
resolution (800*600) all works fine and if screen resolution is the same - qt 
dialogs is behind osg window. So maybe someone solved this problem earlier?  
... 

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] QT and fullscreen OSG

2011-01-26 Thread Roman Grigoriev
Hi,
I deeply investigated problem and found that this behavior found only in clone 
mode on nvidia so if you have one fullscreen (not clonned) all works fine.

Thank you!

Cheers,
Roman

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





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


[osg-users] Intersecting volumes and terrain

2010-10-15 Thread Roman Grigoriev
Hi, I generate terrain using VPB and need to implement intersection lines like 
on attached picture (green lines that shows intersecton between cone and 
terrain). Could someone please give me a hint how to make it using osg?


Thank you!
Cheers,
Roman

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




Attachments: 
http://forum.openscenegraph.org//files/1_201.jpg


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


[osg-users] Update callbacks and LOD

2010-09-08 Thread Roman Grigoriev
Hi,
I have LOD with 3 nodes and use updatecallback to Animate children, I setup 
updatecallback to my highest LOD, my when i switch to medium lod my update 
callback worked also. Is it possible to switch it off when my model switches to 
another LOD.
my updatecallback
class ModelNodeCallbackTower : public osg::NodeCallback
{
public:
   virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
   {
   osg::MatrixTransform* mtx = 
dynamic_castosg::MatrixTransform*(node);

 if (mtx  nv-getFrameStamp())
 {
  std::cout!!!std::endl;
 }


traverse(node, nv);
   }
};  

... 

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] Update callbacks and LOD

2010-09-08 Thread Roman Grigoriev
Hi, Vincent

1.I've already placed my update callback under LOD child and it traversed, 
maybe I need to setup viewer or over thing in osg to not travers hidden childs?
2. How can I check in callback if node is active or not?
... 

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] Update callbacks and LOD

2010-09-08 Thread Roman Grigoriev
Hi,Robert
In osg terms Active children are childrens with nodemasks with 0x or not.
Culled childs ( not in view frustum) are active or not in osg terms?
Could you please advice me how to make this thing in osg:
highest LOD have update callback and medium an lowest don't have it.
Could you please give me some sample how can I apply cullcallback to my node.
Thank you!

Cheers,
Roman

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





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


[osg-users] Switch on statesets

2010-07-15 Thread Roman Grigoriev
Hi,guys!
I try to manage my models and find some problem.
So I have one model with summer textures and winter textures. My goal to create 
one ive file with embedded summer and winter textures.
As far as I understand I can have only one stateset per geomentry and can't 
make some switches to switch stateset. For now I have two ive files,but it it 
doubles memory usage.  Is there any solution how to make this? 
... 

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] Switch on statesets

2010-07-15 Thread Roman Grigoriev
Hi,guys!
Thanx for your replies.
My models are imported from FBX and import/export plugin placed statesets under 
geometry. So in this situation I have to write nodevisitor that traverse 
scenegraph to get stateset of geometry, after get parent geode, add another 
geode with different stateset and save it to new model.
I''l try to do this but I worry about prefomance.  

Thank you!

Cheers,
Roman

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





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


[osg-users] Model optimizations

2010-07-06 Thread Roman Grigoriev
Hi guys!
I have one set of models that positioned along x axis and another set of models 
positioned along y axis. 
So I apply matrixtransform to second set of models to aling them along X axis. 
So in my app I translate and rotate them also so on first set of models I have 
one matrixtransform and on second I have two matrixtransform.
So here I got additional perfomance penalties. 
I want to remove my additional matrixtransform. As far as I understand I have 
to write  custom node visitor that apply my transformation to vertices and 
write back transormed models to model files. Maybe it's already done?

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] Remove osg::Material from models

2010-06-23 Thread Roman Grigoriev
Thank you!
BTW in GL3 path osgText doesn't work at all. No font texture. 

Cheers,
Roman

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





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


[osg-users] Remove osg::Material from models

2010-06-22 Thread Roman Grigoriev
Hi, I created models with osgmaxexp but I use OpenGL3.3 with osg and got error 
message 
Warning: detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
Warning: Material::apply(State) - not supported.
Warning: Material::apply(State) - not supported.
I use this statement to disable some modes but materials errors are also exist.
osg::Node* highp = osgDB::readNodeFile(2h.IVE);
osg::StateSet* stateset2 = new osg::StateSet();
osg::Program* program2 = new osg::Program;
stateset2-setAttribute(program2);

program2-addShader(osg::Shader::readShaderFile(osg::Shader::VERTEX, 
osgDB::findDataFile(model.vert)));

program2-addShader(osg::Shader::readShaderFile(osg::Shader::FRAGMENT, 
osgDB::findDataFile(model.frag)));
osg::Uniform* baseTextureSampler = new 
osg::Uniform(sampler0,0);
stateset2-addUniform(baseTextureSampler);
osg::Uniform* u_color = new 
osg::Uniform(u_color,osg::Vec4(1.0,1.0,1.0,1.0));
unsigned int mode = 
osg::StateAttribute::OVERRIDE | osg::StateAttribute::OFF;
stateset2-setMode(GL_LIGHTING,mode);
 osg::Material* material = new osg::Material;
material-setColorMode(osg::Material::OFF); // 
switch glColor usage off
stateset2-setAttributeAndModes(material, 
osg::StateAttribute::ON);
stateset2-addUniform(u_color);
highp-setStateSet(stateset2);

How can I switch off osg::Material from my model? 

... 

Thank you!

Cheers,
Roman

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





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


[osg-users] Dynamic instancing some .ive models

2010-06-21 Thread Roman Grigoriev
Hi,
I created some models in ive formats and want to do instancing. As far as I red 
to get good FPS I should avoid using glLoadMatrix but store my matrixtransforms 
as uniforms and use glDrawElementsInstanced but in .ive file all primitiveset 
are DrawElementsUshort. 
Maybe someone already have done hardware instancing with models?
... 

Thank you!

Cheers,
Roman

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





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


[osg-users] Noob question: how to change osg::Group to osg::Switch

2010-06-17 Thread Roman Grigoriev
Hi,
Sorry for noob question but maybe there is example how to change
this scenegraph 
group -|
  |-geode
  |-geode
to 
switch-|
  |-geode
  |-geode

... 

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] Draw dynamic line with LODs and EBO

2010-06-14 Thread Roman Grigoriev
Hi Robert!
The question was how can I draw my geometry using elements from start index
to end index. And as far as I understand I have to delete whole ebo, and
then create new ebo with new bounds. I simply want to do it more efficiently
without remapping buffers. 
Roman. 
  

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: Monday, June 14, 2010 12:06 PM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] Draw dynamic line with LODs and EBO

Hi Roman,

100,000 points is nothing for a modern graphics card, they can happily
handle 10 times that are 60Hz.  Given this I would say just create you
geometry efficiently and your done, no need to complicate things
further.

Robert.

On Fri, Jun 11, 2010 at 3:27 PM, Roman Grigoriev grigor...@gosniias.ru
wrote:
 Hi,
 I have to make in my app dynamic lines. As far as I know display lists are
deprecated for now on GLES2 platform I try to make it using VBO+EBO, like in
osgparametric,so now  it works fine.  But I have to draw up to 1000 lines
with 100 points so it can be so hard to GPU. So I decided to recalculate EBO
using LOD strategy. So I'll calculate distance to my point and remove odd
indices. Could you please give me some snippet how to work with EBO in
update or draw callback?
 Also my lines are trajectories and I have to draw them respectively to
simulation time. But I found that I can't change size of element buffer.
 Because I found in PrimitiveSet.cpp
 this lines

 Code:

 void DrawElementsUInt::draw(State state, bool useVertexBufferObjects)
const
 {
 ...
     if (ebo)
        {
            if (_numInstances=1) state.glDrawElementsInstanced(mode,
size(), GL_UNSIGNED_INT, (const GLvoid *)(ebo-getOffset(getBufferIndex())),
_numInstances);
            else glDrawElements(mode, size(), GL_UNSIGNED_INT, (const
GLvoid *)(ebo-getOffset(getBufferIndex(;
        }
 }



 so here size() - total size of element buffer and I create for example EBO
with 200 indices total and want draw only first 100 indices - how can I make
it?

 for the reference here is my code

 Code:

 osg::Node* createModel( bool dynamic, bool useVBO)
 {
    osg::Geode* geode = new osg::Geode;
    osg::Geometry* geom = new osg::Geometry;
    geode-addDrawable(geom);
    osg::Vec3 row(0.0f,0.0f,0.0);
    unsigned int num_x = 200;
       unsigned int num_y = 20;
       unsigned int vert_no = 0;
    osg::Vec3Array* vertices = new osg::Vec3Array( num_x );

        unsigned int iy;
        for(iy=0; iynum_x; iy++)
        {
        (*vertices)[vert_no++] = row;
        row.y()=1000.0f*iy;
        row.z()+=100;
        }
 geom-setVertexArray(vertices);
 osg::VertexBufferObject* vbo = useVBO ? new osg::VertexBufferObject : 0;
 if (vbo) vertices-setVertexBufferObject(vbo);
 osg::ElementBufferObject* ebo = useVBO ? new osg::ElementBufferObject : 0;
    osg::DrawElementsUInt* elements = new
osg::DrawElementsUInt(GL_LINE_STRIP_ADJACENCY_EXT, num_x);
    unsigned int element_no = 0;
    for(unsigned int ix = 0; ixnum_x; ix++)
    {
        (*elements)[element_no++] = ix;
    }

    geom-addPrimitiveSet(elements);
        geom -setDataVariance(osg::Object::DYNAMIC);
        geom-setDrawCallback(new DrawCallback());
    if (ebo) elements-setElementBufferObject(ebo);
 geom-setUseVertexBufferObjects(useVBO);
 return geode;
 }



 ...

 Thank you!

 Cheers,
 Roman[/code]

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





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

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


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


[osg-users] Draw dynamic line with LODs and EBO

2010-06-11 Thread Roman Grigoriev
Hi,
I have to make in my app dynamic lines. As far as I know display lists are 
deprecated for now on GLES2 platform I try to make it using VBO+EBO, like in 
osgparametric,so now  it works fine.  But I have to draw up to 1000 lines with 
100 points so it can be so hard to GPU. So I decided to recalculate EBO using 
LOD strategy. So I'll calculate distance to my point and remove odd indices. 
Could you please give me some snippet how to work with EBO in update or draw 
callback? 
Also my lines are trajectories and I have to draw them respectively to 
simulation time. But I found that I can't change size of element buffer. 
Because I found in PrimitiveSet.cpp
this lines 

Code:

void DrawElementsUInt::draw(State state, bool useVertexBufferObjects) const 
{
...
 if (ebo)
{
if (_numInstances=1) state.glDrawElementsInstanced(mode, size(), 
GL_UNSIGNED_INT, (const GLvoid *)(ebo-getOffset(getBufferIndex())), 
_numInstances);
else glDrawElements(mode, size(), GL_UNSIGNED_INT, (const GLvoid 
*)(ebo-getOffset(getBufferIndex(;
}
}



so here size() - total size of element buffer and I create for example EBO with 
200 indices total and want draw only first 100 indices - how can I make it?

for the reference here is my code
 
Code:

osg::Node* createModel( bool dynamic, bool useVBO)
{
osg::Geode* geode = new osg::Geode;
osg::Geometry* geom = new osg::Geometry;
geode-addDrawable(geom);
osg::Vec3 row(0.0f,0.0f,0.0);
unsigned int num_x = 200;
   unsigned int num_y = 20;
   unsigned int vert_no = 0;
osg::Vec3Array* vertices = new osg::Vec3Array( num_x );

unsigned int iy;
for(iy=0; iynum_x; iy++)
{
(*vertices)[vert_no++] = row;
row.y()=1000.0f*iy;
row.z()+=100;
}
geom-setVertexArray(vertices);
osg::VertexBufferObject* vbo = useVBO ? new osg::VertexBufferObject : 0;
if (vbo) vertices-setVertexBufferObject(vbo);
osg::ElementBufferObject* ebo = useVBO ? new osg::ElementBufferObject : 0;
osg::DrawElementsUInt* elements = new 
osg::DrawElementsUInt(GL_LINE_STRIP_ADJACENCY_EXT, num_x);
unsigned int element_no = 0;
for(unsigned int ix = 0; ixnum_x; ix++)
{
(*elements)[element_no++] = ix;
}

geom-addPrimitiveSet(elements);
geom -setDataVariance(osg::Object::DYNAMIC);
geom-setDrawCallback(new DrawCallback());
if (ebo) elements-setElementBufferObject(ebo);
geom-setUseVertexBufferObjects(useVBO);
return geode;
}



... 

Thank you!

Cheers,
Roman[/code]

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





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


[osg-users] GLES problems

2010-05-17 Thread Roman Grigoriev
Hi,

I've managed to compile OSG svn on beagleboard but here I got some problems - I 
can't run examples due to improper fixed point pipeline conversion here is 
output in attachment 

Thank you!

Cheers,
Roman

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




Attachments: 
http://forum.openscenegraph.org//files/1_155.txt


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


Re: [osg-users] GLES problems

2010-05-17 Thread Roman Grigoriev
Hi,

Ok guys I found that OpenGL ES needs qualifiers so I patched ShaderGen and 
State and all works
Here is patched files in attachment if someone needs them

Thank you!

Cheers,
Roman

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




Attachments: 
http://forum.openscenegraph.org//files/state_333.cpp
http://forum.openscenegraph.org//files/shadergen_594.cpp


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


Re: [osg-users] [osgOcean] osgOcean linux bug disappeared with VBO

2010-04-25 Thread Roman Grigoriev
I simply compile vbo branch from /branches/osgOcean-VBO and oceanexample
works fine. 

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Kim Bale
Sent: Saturday, April 24, 2010 2:16 AM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] [osgOcean] osgOcean linux bug disappeared with VBO

Hi Roman,

Do you mean the non VBO surface in the VBO branch works? or the VBO
version in the branch?

Kim


On 23 April 2010 12:49, Roman Grigoriev grigor...@gosniias.ru wrote:
 Hi,
 on fedora 12 x86 with latest nvidia with fftw3f I see perfect surface with
experimental VBO branch,  but in this bug is still present when I try to
compile from svn/trunk directory.

 Thank you!

 Cheers,
 Roman

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





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

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


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


[osg-users] [osgOcean] osgOcean linux bug disappeared with VBO

2010-04-23 Thread Roman Grigoriev
Hi,
on fedora 12 x86 with latest nvidia with fftw3f I see perfect surface with 
experimental VBO branch,  but in this bug is still present when I try to 
compile from svn/trunk directory. 

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] Image-setData(unsigned char* data,AllocationMode allocationMode);

2010-02-01 Thread Roman Grigoriev
Hi,J.P.

suggested code don't works on OSG SVN geforce8600M GT
if I copy in the loop all works fine 

so this code doesn't work

//Transmittance
data = new float[256*64*3];
f = fopen(data/transmittance.raw, rb);
fread(data, 1, 256*64*3*sizeof(float), f);
fclose(f);

Transmittance_t = new osg::Texture2D;
Transmittance_t-setSourceFormat(GL_RGBA);
Transmittance_t-setSourceType(GL_FLOAT);

Transmittance_t-setFilter(osg::Texture2D::MIN_FILTER, 
osg::Texture2D::LINEAR);
Transmittance_t-setFilter(osg::Texture2D::MAG_FILTER, 
osg::Texture2D::LINEAR);
Transmittance_t-setWrap(osg::Texture2D::WRAP_T, 
osg::Texture2D::CLAMP_TO_EDGE);
Transmittance_t-setWrap(osg::Texture2D::WRAP_S, 
osg::Texture2D::CLAMP_TO_EDGE);
osg::Image* image_Transmittance = new osg::Image;
image_Transmittance-setImage(256,64,1, GL_RGB, GL_RGB32F_ARB, 
GL_FLOAT,(unsigned char*)data, osg::Image::NO_DELETE); 
Transmittance_t-setImage(image_Transmittance);
delete[] data;

and this code works fine

//Transmittance
data = new float[256*64*3];
f = fopen(data/transmittance.raw, rb);
fread(data, 1, 256*64*3*sizeof(float), f);
fclose(f);
Transmittance_t = new osg::Texture2D;
//Transmittance_t-setInternalFormat(GL_RGB16F_ARB);
Transmittance_t-setSourceFormat(GL_RGBA);
Transmittance_t-setSourceType(GL_FLOAT);

Transmittance_t-setFilter(osg::Texture2D::MIN_FILTER, 
osg::Texture2D::LINEAR);
Transmittance_t-setFilter(osg::Texture2D::MAG_FILTER, 
osg::Texture2D::LINEAR);
Transmittance_t-setWrap(osg::Texture2D::WRAP_T, 
osg::Texture2D::CLAMP_TO_EDGE);
Transmittance_t-setWrap(osg::Texture2D::WRAP_S, 
osg::Texture2D::CLAMP_TO_EDGE);
osg::Image* image_Transmittance = new osg::Image;
image_Transmittance-allocateImage(256,64,1,GL_RGB, GL_FLOAT,1);
 image_Transmittance-setInternalTextureFormat(GL_RGB);
 float* dataPtr_Transmittance = (float*)image_Transmittance-data();
 for(int i=0;i256*64*3;i++)
{
*dataPtr_Transmittance++ = data[i];
}
Transmittance_t-setImage(image_Transmittance);
delete[] data;


... 

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] Image-setData(unsigned char* data,AllocationMode allocationMode);

2010-02-01 Thread Roman Grigoriev
Thanx Brian! 
Now It works. 
I simply thought that when I call setImage data copied to another buffer.

Thank you!

Cheers,
Roman

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





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


[osg-users] Image-setData(unsigned char* data,AllocationMode allocationMode);

2010-01-29 Thread Roman Grigoriev
Good day!

I'd like to setup some float textures by reading them from data files. But I
found that I can only setup unsigned char images by using this method.

Of cause I can setup by setting float values in the loop, but maybe it will
more comfortable to have setData method with float values.

Will this feature added to osg or maybe there are some difficulties with it?

Thanx in advance

Bye 

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


Re: [osg-users] Image-setData(unsigned char* data,AllocationMode allocationMode);

2010-01-29 Thread Roman Grigoriev
Hi, J.P. 
Now I use this method and it works.

data = new float[256*64*3];
f = fopen(data/transmittance.raw, rb);
fread(data, 1, 256*64*3*sizeof(float), f);
fclose(f);
osg::Image* image_Transmittance = new osg::Image;
image_Transmittance-allocateImage(64,16,1,GL_RGB16F_ARB, GL_FLOAT,1);
 float* dataPtr = (float*)image_Transmittance-data();
 for(int i=0;i256*64*3;i++)
{
*dataPtr++ = data[i];
}

And I simply want to use 
 image-setImage(64,16,1, GL_RGB16F_ARB, GL_RGB16F_ARB, GL_FLOAT, data, 
osg::Image::USE_NEW_DELETE);
but it doesn't works. In osgprerender I found solution using first method when 
you have loops to copy data.


Thank you!

Cheers,
Roman

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





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


[osg-users] Rendering on two GPUs under linux

2009-11-20 Thread Roman Grigoriev
Good day!

I have stereo HMD with two DVI inputs and want to render left eye on GPU1
and right eye on GPU2 under linux,

 because on windows on geforce gtx285 cards it's not possible. Only Quadro
is capable of making this due to WGL_NV_GPU_AFFINITY extension

Could you please advise me how can I make application. Should I make two
application for left eye and right eye? Or It can be solved using composite
viewer for two eyes?

Thanx in advance

Bye 

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


Re: [osg-users] Rendering on two GPUs under linux

2009-11-20 Thread Roman Grigoriev
Hi,Robert
Thanx for you reply. But you see I'm sure that under windows it's not possible 
to render  on two Geforce cards and nvidia guys told me that I need to buy 
Quadro. My app works fine and do some render but only one GPU calculate 
graphics. And in SLI mode you have only one virtual GPU visible to OS. And 
that's why I decide to move on linux. Today only CUDA can work on two Geforce 
under windows, and nvidia cuts some functionality in Geforce cards. When I run 
my code on linux I haven't got any speedup of using two GPUs. And that's why I 
ask about this subject. 

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] Rendering on two GPUs under linux

2009-11-20 Thread Roman Grigoriev
Hi,
Thank you guys for your replies. You see, I have to setup 3 screens - one 
master screen with menues and two stereo screens for HMD (800*600) w/o menues. 
So SLI is not an option for me.
Also I find some troubles using QT+osg on 3 screens under KDE. When I use only 
osg w/o QT all works fine across all three screens, but if I use QT like in osg 
examples viewers on separate X scrrens not drawing because I have to setup 
screen number to QT.
I'm start thinking of separation QT part from osg and have two application. If 
someone already make such application please give me a hint how to make it.  

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] [3rdparty] Is the osgOcean Linux bug still present?

2009-06-18 Thread Roman Grigoriev
Hi,
I've tried with FFTSS, FFTW3  and FFTWF and got patchy ocean on osg svn trunk 
on Fedora 11 on GTX285 180.60 drivers

Thank you!

Cheers,
Roman

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





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


[osg-users] QTviewer on two Xscreens

2009-06-16 Thread Roman Grigoriev
Hi,
I created example based on QOSGViewer that works on single X screen
and now I try to make it works on 2 Xscreens but I come across difficulties. So 
I have to create QT main window with border and dialogs on first Xscreen and 
second fullscreen window on second Xscreen.
But could you please give me advice how to make it
for now I have two options
1) According Qt docs I have to use QDesktopWigdet to setup two QT applications 
that works independenly on two Xscreens.
2) Use osg CompositeViwer and combine QOSGviewer and osg viewer into osg 
composite viewer but here I don't undestand how to sync two different 
applications.
Maybe someone give me directions what's the best and right way?
Making one big window is not an option because of two GPUs
Thank you!
Cheers,
Roman

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





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


Re: [osg-users] [osgOcean] problem with ocean surface in svn

2009-05-21 Thread Roman Grigoriev
No
It's your example compiled with openscenegraph svn.
Regards,
Roman

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Kim C Bale
Sent: Thursday, May 21, 2009 12:18 PM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] [osgOcean] problem with ocean surface in svn

Hi Roman,

Are you running the example application or is it something that you've
created yourself using the library?

No need to send a screenshot.

Regards,


Kim.

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Roman
Grigoriev
Sent: 20 May 2009 18:22
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] [osgOcean] problem with ocean surface in svn

you see in the middle of the picture there is flat surface so there is no
waves there. and all surface is like a chess board with waves and without if
you want I can send a screenshot with textures.

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





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


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


Re: [osg-users] [osgOcean] problem with ocean surface in svn

2009-05-21 Thread Roman Grigoriev
OSG version  from SVN 
8600M GT linux 180.51 drivers

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Kim C Bale
Sent: Thursday, May 21, 2009 6:45 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] [osgOcean] problem with ocean surface in svn

Hi Roman,

Which version of OSG 2.8 or 2.8.1?

I haven't tried linking it against 2.8.1 yet, so it's possible something
broke. 

What graphics card/drivers are you using?

Sorry about all the questions but nobody has reported similar problems and
I'm rather at a loss as to why the tessellation would break so badly.

Kim.



-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Roman
Grigoriev
Sent: 21 May 2009 12:32
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] [osgOcean] problem with ocean surface in svn

No
It's your example compiled with openscenegraph svn.
Regards,
Roman

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Kim C Bale
Sent: Thursday, May 21, 2009 12:18 PM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] [osgOcean] problem with ocean surface in svn

Hi Roman,

Are you running the example application or is it something that you've
created yourself using the library?

No need to send a screenshot.

Regards,


Kim.

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Roman
Grigoriev
Sent: 20 May 2009 18:22
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] [osgOcean] problem with ocean surface in svn

you see in the middle of the picture there is flat surface so there is no
waves there. and all surface is like a chess board with waves and without if
you want I can send a screenshot with textures.

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





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


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


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


Re: [osg-users] [osgOcean] problem with ocean surface in svn

2009-05-20 Thread Roman Grigoriev
you see in the middle of the picture there is flat surface so there is no waves 
there. and all surface is like a chess board with waves and without
if you want I can send a screenshot with textures.

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





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


Re: [osg-users] [osgCompute] MSVC 2008 and cuda 2.2

2009-05-08 Thread Roman Grigoriev
Ok I solved problem.
I try to compile cuda with antivirus program (Kaspersky Internet Security) 
switched on. So antivirus blocked compilation without any warnings. When I 
disable antivirus all works fine.
Hope it helps someone.

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





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


[osg-users] [osgCompute] MSVC 2008 and cuda 2.2

2009-05-05 Thread Roman Grigoriev
Hi guys!

I try to compile osgCompute under MSVC 2008 and beta cuda2.2 vista and
8600GT 185 nvidia drivers and got hangup on this

What should I do?

1-- Build started: Project: Examples osgEndiannessDemo, Configuration:
Release Win32 --

1Generating main.gen.cpp

1main.cu

1tmpxft_0f1c_-3_main.cudafe1.gpu

1tmpxft_0f1c_-8_main.cudafe2.gpu

 

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


[osg-users] problem with osg::Operation in osgtext example

2009-04-08 Thread Roman Grigoriev
Hi guys!

I try to solve problem with osg::Operation 

In my app I want to use threads to solve different tasks - read data from
sensor, process some data and etc.

But I find that on my core2duo notebook with 8600gt with vista I have
strange results if I don't use threads I have steady FPS

If I have one osg::operation like in osgtext example I don't have steady fps
it's jittering from 90 to 70 fps

But if I have 20 operations I got 30 fps. I compile osg from svn.

I don't have any ideas about this.

Maybe someone solved this problem?

Thanx in advance

Bye

 

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


Re: [osg-users] QT4 ViewerQOSG and Q_OBJECT

2009-04-03 Thread Roman Grigoriev
Hi Guys!
I try to implement QT slot system by using Q_OBJECT 
But I got errors on MSVC2008 and qt4.5.0

.\GeneratedFiles\Release\moc_qosgwidget.cpp(39) : error C2039:
'staticMetaObject' : is not a member of 'osgViewer::Viewer'
1C:\repository\osg291\include\osgViewer/Viewer(27) : see
declaration of 'osgViewer::Viewer'
1.\GeneratedFiles\Release\moc_qosgwidget.cpp(56) : error C2039:
'qt_metacast' : is not a member of 'osgViewer::Viewer'
1C:\repository\osg291\include\osgViewer/Viewer(27) : see
declaration of 'osgViewer::Viewer'
1.\GeneratedFiles\Release\moc_qosgwidget.cpp(62) : error C2039:
'qt_metacall' : is not a member of 'osgViewer::Viewer'
1C:\repository\osg291\include\osgViewer/Viewer(27) : see
declaration of 'osgViewer::Viewer'
1Project : warning PRJ0018 : The following environment variables were not
found:

Here is moc file
/***
*
** Meta object code from reading C++ file 'qosgwidget.h'
**
** Created: Fri 3. Apr 15:17:57 2009
**  by: The Qt Meta Object Compiler version 61 (Qt 4.5.0)
**
** WARNING! All changes made in this file will be lost!

*/

#include ../../qosgwidget.h
#if !defined(Q_MOC_OUTPUT_REVISION)
#error The header file 'qosgwidget.h' doesn't include QObject.
#elif Q_MOC_OUTPUT_REVISION != 61
#error This file was generated using the moc from 4.5.0. It
#error cannot be used with the include files from this version of Qt.
#error (The moc has changed too much.)
#endif

QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_ViewerQOSG[] = {

 // content:
   2,   // revision
   0,   // classname
   0,0, // classinfo
   0,0, // methods
   0,0, // properties
   0,0, // enums/sets
   0,0, // constructors

   0// eod
};

static const char qt_meta_stringdata_ViewerQOSG[] = {
ViewerQOSG\0
};

const QMetaObject ViewerQOSG::staticMetaObject = {
{ osgViewer::Viewer::staticMetaObject, qt_meta_stringdata_ViewerQOSG,
  qt_meta_data_ViewerQOSG, 0 }
};

const QMetaObject *ViewerQOSG::metaObject() const
{
return staticMetaObject;
}

void *ViewerQOSG::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_ViewerQOSG))
return static_castvoid*(const_cast ViewerQOSG*(this));
if (!strcmp(_clname, QOSGWidget))
return static_cast QOSGWidget*(const_cast ViewerQOSG*(this));
typedef osgViewer::Viewer QMocSuperClass;
return QMocSuperClass::qt_metacast(_clname);
}

int ViewerQOSG::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
typedef osgViewer::Viewer QMocSuperClass;
_id = QMocSuperClass::qt_metacall(_c, _id, _a);
if (_id  0)
return _id;
return _id;
}
QT_END_MOC_NAMESPACE




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


Re: [osg-users] osg::Operation lags

2009-03-20 Thread Roman Grigoriev
Thanx Robert!

Working with threads a little bit unfamiliar to me. 

Could you please point me to some examples how to use  YieldCurrentThread()

Thanx in advance

Bye

 

From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: Friday, March 20, 2009 1:44 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osg::Operation lags

 

HI Roman,

2009/3/20 Roman Grigoriev grigor...@gosniias.ru

Hi Robert!

As you've seen in my operation thread  I simply write to stdout simple
message: update and nothing more.

But framerate lags unpredictable.

Maybe there is good example or readme how to use operationthread

Thanx in advance


I have never seen problems like yours when using OperationThread/Operatons,
but on a second review I see that your OpenThread never sleeps, it just
churns away as effectively a spin lock on the CPU. If your machine doesn't
have sufficient cores to handle a thead using 100% of the CPU core then
you'll get frame stalls like you have.

Try sticking a OpenThreads::Thread::YieldCurrentThread() into your
operation.

Robert.

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


Re: [osg-users] osg::Operation lags

2009-03-20 Thread Roman Grigoriev
Thanx Robert!

I works fine

Here is my class if it will be useful for someone.

 

lass UpdateMissileOperation : public osg::Operation

{

public:

 

UpdateMissileOperation():

Operation(UpdateMissileOperation, true)

{

 

}



virtual void operator () (osg::Object* callingObject)

{

  osgViewer::Viewer* viewer =
dynamic_castosgViewer::Viewer*(callingObject);

 double t;

if (viewer)

t = viewer-getFrameStamp()-getSimulationTime();

_dt=t-_time;

if ((_dt=0.02)) 

{

  //printf(%f\n,_dt);

  update();

  _time=t;

}

else

{

OpenThreads::Thread::YieldCurrentThread();

}

  }

  void update()

  {   

//printf(%f\n,_time);

  }

   virtual void release()

   {

   }

   bool  _load;

  bool   _valid1;

  float _time;

  float _dt;

};

 

From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Roman
Grigoriev
Sent: Friday, March 20, 2009 3:42 PM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] osg::Operation lags

 

Thanx Robert!

Working with threads a little bit unfamiliar to me. 

Could you please point me to some examples how to use  YieldCurrentThread()

Thanx in advance

Bye

 

From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: Friday, March 20, 2009 1:44 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osg::Operation lags

 

HI Roman,

2009/3/20 Roman Grigoriev grigor...@gosniias.ru

Hi Robert!

As you've seen in my operation thread  I simply write to stdout simple
message: update and nothing more.

But framerate lags unpredictable.

Maybe there is good example or readme how to use operationthread

Thanx in advance


I have never seen problems like yours when using OperationThread/Operatons,
but on a second review I see that your OpenThread never sleeps, it just
churns away as effectively a spin lock on the CPU. If your machine doesn't
have sufficient cores to handle a thead using 100% of the CPU core then
you'll get frame stalls like you have.

Try sticking a OpenThreads::Thread::YieldCurrentThread() into your
operation.

Robert.

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


Re: [osg-users] osg::Operation lags

2009-03-20 Thread Roman Grigoriev
Hi Robert!

Sorry to disturb you with my simple question

A lot of things to do in a short period time.

Thanx again 

Bye

 

 

From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: Friday, March 20, 2009 4:34 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osg::Operation lags

 

Hi Roman,

You really need to learn how to investigate stuff on your own, I can provide
pointers of but it's down to you do learn stuff and to code stuff, you can't
expect others to walk you through it.   In the case of YieldCurrentThead
it's a single line of code that Yields the Current Thread, so I can't see
what more needs explaining, there are plenty of examples of it in the core
OSG - just do a grep through the sources.

Robert.

2009/3/20 Roman Grigoriev grigor...@gosniias.ru

Thanx Robert!

Working with threads a little bit unfamiliar to me. 

Could you please point me to some examples how to use  YieldCurrentThread()

Thanx in advance

Bye

 

From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: Friday, March 20, 2009 1:44 PM


To: OpenSceneGraph Users
Subject: Re: [osg-users] osg::Operation lags

 

HI Roman,

2009/3/20 Roman Grigoriev grigor...@gosniias.ru

Hi Robert!

As you've seen in my operation thread  I simply write to stdout simple
message: update and nothing more.

But framerate lags unpredictable.

Maybe there is good example or readme how to use operationthread

Thanx in advance


I have never seen problems like yours when using OperationThread/Operatons,
but on a second review I see that your OpenThread never sleeps, it just
churns away as effectively a spin lock on the CPU. If your machine doesn't
have sufficient cores to handle a thead using 100% of the CPU core then
you'll get frame stalls like you have.

Try sticking a OpenThreads::Thread::YieldCurrentThread() into your
operation.

Robert.


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

 

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


[osg-users] QOSGWidget and additional dialogs

2009-03-17 Thread Roman Grigoriev
Good day!

I use QT dialogs to create my app interface and use QOSGWidget based on osg
example

So when I need to load my objects I call my dialog using dialog-show(); and
after I attach my nodes to root node 

I call dialog-close(); and all works fine but only in the first time so
when I second time use this sequence I got freeze window and even keyboard
events don't work

If I load my objects using keypress event and not using QT dialogs all works
fine.

I think that after I call dialog I need to set focus to main window and I
don't know how can I do this.

Thanx in advance

Bye

 

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


[osg-users] OSG QT events

2009-03-17 Thread Roman Grigoriev
Hi guys!

I try to modify QOSGWidget to work with QT dialogs so I have one problem

If I show my dialog like this in keyboard section 

  void keyPressEvent( QKeyEvent* event )

{

  if(event-key()==Qt::Key_F11 )

main_dialog-show();

}

Dialog is shown above osg window and when closed osg window works fine.

But I want to show this dialog based on my app statenot based on keyboard
event. Let's say I need to show this dialog when 

Variable flag_start=true; so I set in my updatecallback flag_start=true and
in paintevent I made

Like this

virtual void paintEvent( QPaintEvent * event ) 

{ 

  

  if (flag_start)

  {

main-show();

Flag_start=false;

  }

  frame(); 

} 

But when I've done this way I see dialog and it works fine but my osg window
halt.

So my question how to work with osg events with QT?

Thanx in advance

Bye

 

 

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


[osg-users] QT::FramelessWindowHint and OSG

2009-03-11 Thread Roman Grigoriev
Hi guys!

I haven't solved the problem with creating borderless window using QT 4.4.3

AdaptorWidget and QOSGWidget don't work when I simply add this line

viewerWindow-setWindowFlags(Qt::FramelessWindowHint);

If anyone solved it please email me. 

Thanx in advance

Bye

 

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


Re: [osg-users] QT::FramelessWindowHint and OSG

2009-03-11 Thread Roman Grigoriev
Sorry Guys 

I solved it if you set in constructor

ViewerQOSG(QWidget * parent = 0, const char * name = 0, WindowFlags f =
Qt::FramelessWindowHint):

QOSGWidget( parent, name, f )

But I still have a message that recursive repaint detected if I use single
window on QOSGWidget

Is there a solution on it or it is normal?

 

From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Roman
Grigoriev
Sent: Wednesday, March 11, 2009 3:21 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] QT::FramelessWindowHint and OSG

 

Hi guys!

I haven't solved the problem with creating borderless window using QT 4.4.3

AdaptorWidget and QOSGWidget don't work when I simply add this line

viewerWindow-setWindowFlags(Qt::FramelessWindowHint);

If anyone solved it please email me. 

Thanx in advance

Bye

 

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


[osg-users] Qt and OSG

2009-01-19 Thread Roman Grigoriev
Hi guys!

I try to integrate qt dialogs into osg application and have some troubles in
creating borderless window

I try to modify osgviewerQT example but in in QOSGWidget.cpp already have 

traits-windowDecoration = false; but on vista with qt4.4.3 I have window
decoration.

In example there are two types of qt integration via OSG/GL and via QT/GL. 

Cold you please tell me which is fastest? 

Thanx in advance

Bye

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


Re: [osg-users] Qt and OSG

2009-01-19 Thread Roman Grigoriev
Me too!
I try to setup like this
viewerWindow-setWindowFlags(Qt::FramelessWindowHint);
but have some message that can't create ogl context on vista nvidia 181.20
on qt 4.4.3



-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of David
Guthrie
Sent: Monday, January 19, 2009 3:44 PM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] Qt and OSG

Try the Qt demo where you can set all the window flags.  I've tried in on
Windows XP, Linux, and Mac OS X, and many of the flags don't really do much,
and it's system dependent.  I was unable to find a set of flags that would
create a borderless window either.

--
Read this topic online here:
http://osgforum.tevs.eu/viewtopic.php?p=4744#4744





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


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


Re: [osg-users] Mouse cursor and multiwindow configuration

2009-01-14 Thread Roman Grigoriev
Thanx Robert!
As far as I got there is no ways to do it in nvidia drivers on vista but in
osg app works fine.
Thanx 
Bye


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: Wednesday, January 14, 2009 12:35 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Mouse cursor and multiwindow configuration

Hi Roman,

When you create the windows set the GraphicsContext::Traits::useCursor
member to false, or at runtime you can disable the cursor by doing
window-useCursor(false);

Robert.

2009/1/14 Roman Grigoriev grigor...@gosniias.ru:
 Hi guys!

 I have this configuration - 2 windows on 2 monitors on nvidia 181 and
vista

 I need to make my osg app doing this thing - move and show mouse cursor
only
 on 1 window

 In nvidia drivers I can't find how to make this

 Thanx

 Bye



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


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


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


[osg-users] Mouse cursor and multiwindow configuration

2009-01-13 Thread Roman Grigoriev
Hi guys!

I have this configuration - 2 windows on 2 monitors on nvidia 181 and vista

I need to make my osg app doing this thing - move and show mouse cursor only
on 1 window

In nvidia drivers I can't find how to make this

Thanx

Bye

 

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


Re: [osg-users] RTT and stereo (corrected)

2008-12-11 Thread Roman Grigoriev
Thanx Robert for your reply.
With single view I have 50 fps with stereo I have 25 fps. It is very
predictable result.
Event 0.05
Update 1.36 (two Intersense InertiaCube3 sensors)
Cull   5.2 (clouds)
Draw   2.16 (ephemeris,clouds)
GPU  27.2
I simply try to improve it.
I have single 8600GT. But for stereo config I will use double GTX280. Hopes
that It will change situation.
Bye


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Thursday, December 11, 2008 12:20 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] RTT and stereo (corrected)

Hi Roman,

On Thu, Dec 11, 2008 at 6:57 AM, Roman Grigoriev [EMAIL PROTECTED]
wrote:
 So for now I solve problem by doing all postprocess operations for left
and
 right eye and have huge frame drop to 25 fps L

Stereo rendering normally incurrs a performacne hit, as you are
doubling the amount of work done.  Is ther performance
disproportional?

 Could someone please give me recommendations what is better render to one
 big texture both left and right eye (1600*600) or render to two small
 textures (800*600)?

Design wise it would be much easier to have one texture pure eye.
Performance wise it probably won't make too much difference as the
bottlenecks aren't likely to be related to setup of FBO's/teuxtures.
You might see a performance improvement with using a single texture,
but I doubt it would be worthwhile.

I'd recommend looking at your wider performance bottlenecks.  What is
your cull/draw costs? Due you have two graphics cards and a multi-core
GPU available?

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


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


Re: [osg-users] RTT and stereo (corrected)

2008-12-11 Thread Roman Grigoriev
When doing stereo with two 280's use two viewer Camera's to make the
most of multi-threading performance that the OSG has to offer.
Could you please explain it?
But if I have 2 views I have to share scenegraph between windows. So OSG
simply duplicate geometries?
Or maybe I don't understand something?
Roman


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Thursday, December 11, 2008 1:33 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] RTT and stereo (corrected)

Hi Roman,

The performance you are getting it not to surprising.  Your GPU costs
are obviously the biggest bottleneck.

Moving to a single GTX280 will radically improve this, there is little
reason why you shouldn't be able to do 60Hz in stereo.  Using two
GTX280 would give you an even wider margin for hitting a solid 60Hz.

Once you move to the 280's you probably find that the GPU is no longer
the bottleneck and your cull could well be the longest element, but if
you're hitting a solid 60Hz in stereo already no need to worry.

When doing stereo with two 280's use two viewer Camera's to make the
most of multi-threading performance that the OSG has to offer.


Robert.

On Thu, Dec 11, 2008 at 9:41 AM, Roman Grigoriev [EMAIL PROTECTED]
wrote:
 Thanx Robert for your reply.
 With single view I have 50 fps with stereo I have 25 fps. It is very
 predictable result.
 Event 0.05
 Update 1.36 (two Intersense InertiaCube3 sensors)
 Cull   5.2 (clouds)
 Draw   2.16 (ephemeris,clouds)
 GPU  27.2
 I simply try to improve it.
 I have single 8600GT. But for stereo config I will use double GTX280.
Hopes
 that It will change situation.
 Bye


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Robert
 Osfield
 Sent: Thursday, December 11, 2008 12:20 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] RTT and stereo (corrected)

 Hi Roman,

 On Thu, Dec 11, 2008 at 6:57 AM, Roman Grigoriev [EMAIL PROTECTED]
 wrote:
 So for now I solve problem by doing all postprocess operations for left
 and
 right eye and have huge frame drop to 25 fps L

 Stereo rendering normally incurrs a performacne hit, as you are
 doubling the amount of work done.  Is ther performance
 disproportional?

 Could someone please give me recommendations what is better render to one
 big texture both left and right eye (1600*600) or render to two small
 textures (800*600)?

 Design wise it would be much easier to have one texture pure eye.
 Performance wise it probably won't make too much difference as the
 bottlenecks aren't likely to be related to setup of FBO's/teuxtures.
 You might see a performance improvement with using a single texture,
 but I doubt it would be worthwhile.

 I'd recommend looking at your wider performance bottlenecks.  What is
 your cull/draw costs? Due you have two graphics cards and a multi-core
 GPU available?

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


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

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


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


Re: [osg-users] RTT and stereo (corrected)

2008-12-11 Thread Roman Grigoriev
Thanx Robert!
I try to use this config:
CompositeViewer (2 View)
First View1 800*600 (left eye first DVI output) Left eye camera
Second View2 800*600 (right eye second DVI output) right eye camera
 So I only need to execute 
view1.setSceneData(root); 
view2.setSceneData(root);
Roman

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Thursday, December 11, 2008 2:58 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] RTT and stereo (corrected)

Hi Roman,

When doing stereo you would typically use a single View with a single
master Camera that controls the what the overall view of the scene is.
 This View would then have two slave Cameras that are offset from the
master Camera's view/projection matrix to provide the appropriate
view.  The scene graph is shared between the two slave Cameras.  If
the slave Camera have different graphics contexts then you can have
separate OpenGL objects per context, but the OSG will automatically
manage this all for you, it also offers the opportunity for threading
the graphics contexts.

Robert.

On Thu, Dec 11, 2008 at 11:20 AM, Roman Grigoriev [EMAIL PROTECTED]
wrote:
When doing stereo with two 280's use two viewer Camera's to make the
most of multi-threading performance that the OSG has to offer.
 Could you please explain it?
 But if I have 2 views I have to share scenegraph between windows. So OSG
 simply duplicate geometries?
 Or maybe I don't understand something?
 Roman


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Robert
 Osfield
 Sent: Thursday, December 11, 2008 1:33 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] RTT and stereo (corrected)

 Hi Roman,

 The performance you are getting it not to surprising.  Your GPU costs
 are obviously the biggest bottleneck.

 Moving to a single GTX280 will radically improve this, there is little
 reason why you shouldn't be able to do 60Hz in stereo.  Using two
 GTX280 would give you an even wider margin for hitting a solid 60Hz.

 Once you move to the 280's you probably find that the GPU is no longer
 the bottleneck and your cull could well be the longest element, but if
 you're hitting a solid 60Hz in stereo already no need to worry.

 When doing stereo with two 280's use two viewer Camera's to make the
 most of multi-threading performance that the OSG has to offer.


 Robert.

 On Thu, Dec 11, 2008 at 9:41 AM, Roman Grigoriev [EMAIL PROTECTED]
 wrote:
 Thanx Robert for your reply.
 With single view I have 50 fps with stereo I have 25 fps. It is very
 predictable result.
 Event 0.05
 Update 1.36 (two Intersense InertiaCube3 sensors)
 Cull   5.2 (clouds)
 Draw   2.16 (ephemeris,clouds)
 GPU  27.2
 I simply try to improve it.
 I have single 8600GT. But for stereo config I will use double GTX280.
 Hopes
 that It will change situation.
 Bye


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Robert
 Osfield
 Sent: Thursday, December 11, 2008 12:20 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] RTT and stereo (corrected)

 Hi Roman,

 On Thu, Dec 11, 2008 at 6:57 AM, Roman Grigoriev [EMAIL PROTECTED]
 wrote:
 So for now I solve problem by doing all postprocess operations for left
 and
 right eye and have huge frame drop to 25 fps L

 Stereo rendering normally incurrs a performacne hit, as you are
 doubling the amount of work done.  Is ther performance
 disproportional?

 Could someone please give me recommendations what is better render to
one
 big texture both left and right eye (1600*600) or render to two small
 textures (800*600)?

 Design wise it would be much easier to have one texture pure eye.
 Performance wise it probably won't make too much difference as the
 bottlenecks aren't likely to be related to setup of FBO's/teuxtures.
 You might see a performance improvement with using a single texture,
 but I doubt it would be worthwhile.

 I'd recommend looking at your wider performance bottlenecks.  What is
 your cull/draw costs? Due you have two graphics cards and a multi-core
 GPU available?

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


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

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


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

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http

  1   2   >