[osg-users] Obsolete osg-users archive search index?

2014-05-01 Thread Émeric MASCHINO
 Hi,

The osg-users Archives state:

Note:The archive search index was last rebuilt at Saturday, 17 Mar
2012 12:16:45 PDT. Any postings after that will not be found by a
search. Index rebuild is usally done once every 24 hours for this
list. You can use a View by date link below to access more recent
postings.

Is this note still accurate?

If yes, I'm so sorry for having asked to the list questions that may
have been answered since March 17th, 2012.

If so, isn't there a way to update the search index?

Thanks,

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


Re: [osg-users] Obsolete osg-users archive search index?

2014-05-01 Thread Robert Osfield
Hi Emeric et. al,

Curious, I have never noticed that the fact the search index isn't
updated regularly.  I don't recall anyone else highlighting this
either so I guess we've all just overlooked it.  I have just had a
search through the mailman admin pages and can't find any controls for
how often the search index is updated.  I wonder if this went astray
when we moved the mailman server over to dreamhost.

I have to admit I'm not a mailman expert.  Thoughts from others?

Robert.

On 1 May 2014 14:48, Émeric MASCHINO emeric.masch...@gmail.com wrote:
  Hi,

 The osg-users Archives state:

 Note:The archive search index was last rebuilt at Saturday, 17 Mar
 2012 12:16:45 PDT. Any postings after that will not be found by a
 search. Index rebuild is usally done once every 24 hours for this
 list. You can use a View by date link below to access more recent
 postings.

 Is this note still accurate?

 If yes, I'm so sorry for having asked to the list questions that may
 have been answered since March 17th, 2012.

 If so, isn't there a way to update the search index?

 Thanks,

  Emeric
 ___
 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] New scheme for configuring the OSG for building against different versions of the OpenGL/OpenGL ES

2014-05-01 Thread Robert Osfield
Thanks Stephan, fix merged and submitted to svn/trunk.

On 1 May 2014 16:31, Stephan Maximilian Huber
lis...@stephanmaximilianhuber.com wrote:
 Hi Robert,

 attached you'll find some modifications to get the new scheme working on OS 
 X. I haven't tested them for iOS, will do next week.

 cheers,

 Stephan

 Am 30.04.2014 um 15:26 schrieb Robert Osfield robert.osfi...@gmail.com:

 Hi All,

 I have just checked in a renamed of the new automatically configured
 header from include/osg/OpenGL to include/osg/GL with it replacing the
 old hand written GL header.  An svn update will provide this change.

 Hopefully everything should just work, but if it doesn't let me know
 and I'll try and sort the issue.

 Thanks for testing,
 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] [osgPlugins] imageio plugin memory issue.

2014-05-01 Thread Alessandro Terenzi
Hi,
while profiling my iOS app I noticed that when I load a model with a texture 
memory grows up to 130MB, after a while it drops down to 64MB and even if I 
release the memory of the whole scene graph (I dealloc the whole ViewController 
that hosts all the osg stuff...) those 64MB remain allocated on the heap. Using 
the Instruments tools I found out that the responsible for that allocation is 
this function:

osg::Image* CreateOSGImageFromCGImage(CGImageRef image_ref);

Anyone having the same issue? Any suggestion about a possible solution?

I used the latest OSG developer release (3.3.1) and also the stable release 
(3.2.0).

Thanks.
Alessandro

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





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


[osg-users] OpenThreads, scheduling, etc ... policies

2014-05-01 Thread Trajce Nikolov NICK
Hi Community

my client found interesting behaviour on OpenThreads under 64bit OpenSuSE
linux. It seam none of the calls like setSchedulePolicy,
setProcessorAffinity and setSechedulePriority of OpenThreads::Thread are
working. After running a code, they all return 0 (success) but after
inspecting the threads in some tools, they show they are not set as
expected.

So I gave it a try on Ubuntu 64bit. On my linux box none werle working -
all returned -1 (failure). Attached is simple code from Rui's book that
ilustrate the problem.

Any help is appreciated ! Also, the OSG version tested is 3.3.1

Nick
/* -*-c++-*- Copyright (C) 2010 Wang Rui wangray84 at gmail dot com
 * OpenSceneGraph Beginners Guide
 * Using a separate thread for supplying data to a node in the main process
*/

#include osg/Geode
#include osgDB/ReadFile
#include osgText/Text
#include osgViewer/Viewer
#include iostream

class DataReceiverThread : public OpenThreads::Thread
{
public:
DataReceiverThread()
	: OpenThreads::Thread()
{
	int status = setProcessorAffinity(0);
printf(setProcessorAffinity status: %d\n, status);
}
virtual int cancel()
{
_done = true;
while( isRunning() ) YieldCurrentThread();
return 0;
}

virtual void run()
{
_done = false;
_dirty = true;
do
{
YieldCurrentThread();

char ch;
std::cin.get(ch);
printf([%c][%d] , ch, ch);

switch (ch)
{
case 0: break;  // We donĄŻt want ĄŽ\0ĄŻ to be added
case 9: _done = true; break;  // Tab = 9
default: addToContent(ch); break;
}
} while( !_done );
}

void addToContent( int ch )
{
OpenThreads::ScopedLockOpenThreads::Mutex lock(_mutex);
_content += ch;
_dirty = true;
}

bool getContent( std::string str )
{
OpenThreads::ScopedLockOpenThreads::Mutex lock(_mutex);
if ( _dirty )
{
str += _content;
_dirty = false;
return true;
}
return false;
}

protected:
OpenThreads::Mutex _mutex;
std::string _content;
bool _done;
bool _dirty;
};

class UpdateTextCallback : public osg::Drawable::UpdateCallback
{
  
public:
  UpdateTextCallback(DataReceiverThread* rcvrthrd) : rcvrthread(rcvrthrd)
  {}

  virtual void update( osg::NodeVisitor* nv, osg::Drawable* drawable )
{
osgText::Text* text = static_castosgText::Text*( drawable );
if ( text )
{
std::string str(# );
//if ( DataReceiverThread::instance()-getContent(str) )
if ( rcvrthread-getContent(str) )
text-setText( str );
}
}
   DataReceiverThread* rcvrthread; 
};

int main( int argc, char** argv )
{
int status;
	
osg::ref_ptrosgText::Text text = new osgText::Text;
text-setFont( fonts/arial.ttf );
text-setAxisAlignment( osgText::TextBase::SCREEN );
text-setDataVariance( osg::Object::DYNAMIC );
text-setInitialBound( osg::BoundingBox(osg::Vec3(), osg::Vec3(400.0f, 20.0f, 20.0f)) );
	DataReceiverThread* rcvrthread = new DataReceiverThread;
	rcvrthread-Init();
text-setUpdateCallback( new UpdateTextCallback(rcvrthread));

osg::ref_ptrosg::Geode geode = new osg::Geode;
geode-addDrawable( text.get() );
geode-getOrCreateStateSet()-setMode( GL_LIGHTING, osg::StateAttribute::OFF );

osgViewer::Viewer viewer;
viewer.setSceneData( geode.get() );
viewer.setUpViewInWindow( 50, 50, 640, 480 );
//status = rcvrthread-setProcessorAffinity(0);
//printf(setProcessorAffinity status: %d\n, status);

	status = rcvrthread-setSchedulePolicy(OpenThreads::Thread::THREAD_SCHEDULE_ROUND_ROBIN);
	printf(setSchedulePolicy status: %d\n, status);
	if(!status)
	  printf(getSchedulePolicy: %d\n,rcvrthread-getSchedulePolicy()); 
status = rcvrthread-setSchedulePriority(OpenThreads::Thread::THREAD_PRIORITY_HIGH);
	printf(setSchedulePriority status: %d\n, status);
	if(!status)
	  printf(getSchedulePriority: %d\n,rcvrthread-getSchedulePriority()); 
rcvrthread-startThread();
viewer.run();
rcvrthread-cancel();
return 0;
}
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Obsolete osg-users archive search index?

2014-05-01 Thread Paul Martz
FYI, osg-users posts have been reflected to a Google Group for at least the
past six years, so you should just be able to search using Google. The
group is here:
http://groups.google.com/forum/#!forum/osg-users

I hope people find this helpful.
   -Paul
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Obsolete osg-users archive search index?

2014-05-01 Thread Émeric MASCHINO
Hi Robert,

I'm not a mailman sysadmin at all, but the note says that the index
should be refreshed every 24 hours. Is this something hardcoded in
mailman or can't find no reference to 24 in the mailman configuration
file(s)?

BTW, does Saturday, 17 Mar 2012 12:16:45 PDT more or less coincide
with the server move?

 Émeric


2014-05-01 16:51 GMT+02:00 Robert Osfield robert.osfi...@gmail.com:
 Hi Emeric et. al,

 Curious, I have never noticed that the fact the search index isn't
 updated regularly.  I don't recall anyone else highlighting this
 either so I guess we've all just overlooked it.  I have just had a
 search through the mailman admin pages and can't find any controls for
 how often the search index is updated.  I wonder if this went astray
 when we moved the mailman server over to dreamhost.

 I have to admit I'm not a mailman expert.  Thoughts from others?

 Robert.

 On 1 May 2014 14:48, Émeric MASCHINO emeric.masch...@gmail.com wrote:
  Hi,

 The osg-users Archives state:

 Note:The archive search index was last rebuilt at Saturday, 17 Mar
 2012 12:16:45 PDT. Any postings after that will not be found by a
 search. Index rebuild is usally done once every 24 hours for this
 list. You can use a View by date link below to access more recent
 postings.

 Is this note still accurate?

 If yes, I'm so sorry for having asked to the list questions that may
 have been answered since March 17th, 2012.

 If so, isn't there a way to update the search index?

 Thanks,

  Emeric
 ___
 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] Obsolete osg-users archive search index?

2014-05-01 Thread Émeric MASCHINO
Hi Paul,

 FYI, osg-users posts have been reflected to a Google Group for at least the
 past six years, so you should just be able to search using Google. The group
 is here:
 http://groups.google.com/forum/#!forum/osg-users

 I hope people find this helpful.
-Paul

That's great news, thanks for pointing this out.

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


[osg-users] [osgCompute] Float Texture = unable to register image object (cudaGraphicsGLRegisterImage()).

2014-05-01 Thread Conan Doyle
Hi,

I have modified one of the osgCompute examples to try to learn a bit about 
osgCompute/CUDA... I am trying to take 3 float textures, and use a CUDA kernel 
to create a 4 texture which is a combination of the the 3 input textures.  This 
works if I create 3 GL_RGBA/GL_UNSIGNED_BYTE textures, btu when I try to use 
float textures, using GL_RGBA32F_ARB/GL_FLOAT, I get the following errors:


alloc srcTexture0:unable to register image object 
(cudaGraphicsGLRegisterImage()). Not all GL formats are supported.invalid 
argument.
unmap srcTexture0: error during device memory synchronization (map()).
alloc srcTexture1:unable to register image object 
(cudaGraphicsGLRegisterImage()). Not all GL formats are supported.invalid 
argument.
unmap srcTexture1: error during device memory synchronization (map()).
alloc srcTexture2:unable to register image object 
(cudaGraphicsGLRegisterImage()). Not all GL formats are supported.invalid 
argument.
unmap srcTexture2: error during device memory synchronization (map()).
alloc trgBuffer:unable to register image object 
(cudaGraphicsGLRegisterImage()). Not all GL formats are supported.invalid 
argument.
unmap trgBuffer: error during device memory synchronization (map()).


Can someone help me out and tell me what i am doing wrong here?

This is my code:

/* osgCompute - Copyright (C) 2008-2009 SVT Group
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 3 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU Lesse General Public License for more details.
*
* The full license is in LICENSE file included with this distribution.
*/

#include iostream
#include sstream
#include osg/ArgumentParser
#include osg/Texture2D
#include osg/Vec4ub
#include osg/BlendFunc
#include osg/Geometry
#include osg/ShapeDrawable
#include osg/MatrixTransform
#include osgDB/ReadFile
#include osgDB/WriteFile
#include osgDB/FileUtils
#include osgDB/Registry
#include osgViewer/CompositeViewer
#include osgGA/TrackballManipulator
#include osgViewer/ViewerEventHandlers
#include osgCompute/Computation
#include osgCompute/Callback
#include osgCuda/Buffer
#include osgCuda/Texture
#include osgCuda/Computation
#include osgCudaStats/Stats
#include osgCudaInit/Init

extern C void mix( unsigned int numPixelsX,
 unsigned int numPixelsY,
 void* trgBuffer,
 void* srcBuffer0,
 float srcBuffer0Fract,
 void* srcBuffer1,
 float srcBuffer1Fract,
 void* srcBuffer2,
 float srcBuffer2Fract,
 unsigned int srcBufferSize );

///
//
//
//
///
class TexFilter : public osgCompute::Program
{
public:

//--
virtual void launch()
{
if( !_trgBuffer.valid() || !_srcBuffer0.valid() || !_srcBuffer1.valid() 
|| !_srcBuffer2.valid())
return;

if( !_timer.valid() )
{
_timer = new osgCuda::Timer;
_timer-setName( TexFilter);
}

_timer-start();

mix( _trgBuffer-getDimension(0),
 _trgBuffer-getDimension(1),
 _trgBuffer-map( osgCompute::MAP_DEVICE_TARGET ),
 _srcBuffer0-map( osgCompute::MAP_DEVICE_SOURCE ),
 _srcBuffer0Fract,
 _srcBuffer1-map( osgCompute::MAP_DEVICE_SOURCE ),
 _srcBuffer1Fract,
 _srcBuffer2-map( osgCompute::MAP_DEVICE_SOURCE ),
 _srcBuffer2Fract,
 _srcBuffer0-getByteSize( osgCompute::MAP_DEVICE ) );


_timer-stop();
}


//--
virtual void acceptResource( osgCompute::Resource resource )
{
if( resource.isIdentifiedBy(TRG_BUFFER)  )
_trgBuffer = dynamic_castosgCompute::Memory*( resource );
if( resource.isIdentifiedBy(SRC_BUFFER0)  )
_srcBuffer0 = dynamic_castosgCompute::Memory*( resource );
if( resource.isIdentifiedBy(SRC_BUFFER1)  )
_srcBuffer1 = dynamic_castosgCompute::Memory*( resource );
if( resource.isIdentifiedBy(SRC_BUFFER2)  )
_srcBuffer2 = dynamic_castosgCompute::Memory*( resource );
}

public:
void setSrcBufferFractions(float srcBuffer0Fract, float srcBuffer1Fract, 
float srcBuffer2Fract)
{
_srcBuffer0Fract = srcBuffer0Fract;
_srcBuffer1Fract =