Re: [osg-users] Tutorials

2007-09-01 Thread Peter Gebauer
 In my perception forums will be more scalable if the user community 
 grows, because you can not expect every member to follow all discussions 
 that are currently happening (or happened if you were on vacation for two 
 weeks).

Or you get a decent MUA. Getting an additional login AND having to run a 
browser to sift through new threads is inconvenient. ML's are simply more 
convenient if you have a wonderfully configured MUA compared to the mucky 
web interfaces.

Speaking of web interfaces, a forum is pretty much a mailing list 
archive in design, isn't there some web interface for mailing lists that 
allows you to browse threads as in a forum? Perhaps you could help out 
installing such software so that the community can choose from two 
interfaces: SMTP and HTML.

Again, I'll stick with my MUA (mutt) since it has better controls and UI 
than any forum web interface I've ever seen. I also pipe my messages 
through procmail which has a vast collection of filtering I require.
It is also conveniently started from my shell so I don't have to click 
around or use the mouse to partake in OSG discussions. (I rarely even have 
the mouse connected)
So you see, a web interface would ruin my perfect setup = not good. :)

/Peter

  
 my two cents,
  
 Roland Smeenk
  
 
 
 
 
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ricko 3D
   Sent: maandag 27 augustus 2007 6:07
   To: osg-users@lists.openscenegraph.org
   Subject: Re: [osg-users] Tutorials
   
   
 
Nick Prudent wrote:
 
There *is* an OSG discussion forum:
http://www.3drealtimesimulation.com/3dsceneBB/index.php
It's just not very official (and not used much, from what I can 
 see...). 
 
   Great!  I'll bet it would be used much more if it were listed 
 prominently on the wiki like just below the mailing list link or on the 
 getting started page for example. I searched the wiki and found a link to an 
 official FAQ on that site but no links from the wiki to the forum at all.
 

 
Jean-Sébastien wrote:
 
you'll see the arguments for and against. A compromise 
may be reached, but the mailing list is here to stay.
Most OSS projects have at least two mailing lists, some much more.  
 
It's a very effective means of discussing development subjects.
 

 
   Thanks for the quick response. Seems funny to say anything is here to 
 stay related to any constantly evolving technology project, or anything 
 related to the Internet. I was just offering my observations coming at this 
 project fresh. My opinion was simply that the mailing list method seems 
 outdated. I wasn't suggesting it is not effective, just comparing it to the 
 features/benefits of newer community technologies I've used on other projects.
 

 
 
 This e-mail and its contents are subject to the DISCLAIMER at 
 http://www.tno.nl/disclaimer/email.html
 ___
 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] OpenThreads doc?

2007-09-01 Thread Robert Osfield
Hi Ben,

On 8/31/07, Ben Discoe [EMAIL PROTECTED] wrote:
 I got OSG 2.0 building and moved my community up to it, thanks for the help 
 on that.

 Next question: does OpenThreads have any documentation, at all?  I have 
 looked all over the web and the wiki, and not found a bit, not even minimal 
 doxygen docs.

There is only the doxygen docs I'm afraid.

 I am hoping to port some code from pthreads to OpenThreads, and definitely 
 need to know how OpenThreads works in order to do that.

The OSG uses OpenThreads pretty extensively so this might be able to
help guide you a bit.  In general I'd say OpenThreads is pretty
straight forward to use, and maps underlying pthreads pretty closely.

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


Re: [osg-users] crash in osgText with version 2.1.8

2007-09-01 Thread Robert Osfield
On 9/1/07, Cedric Pinson [EMAIL PROTECTED] wrote:
 It works fine now. But what is the performance penalty i mean of which
 order do you think it is

See my other email about DeleteHandler for a full explanation - I
measured 6% hit on fps on a model that was cull limited.

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


Re: [osg-users] Is text thread safe in 2.0.0?

2007-09-01 Thread Robert Osfield
On 8/31/07, Robert Osfield [EMAIL PROTECTED] wrote:
 Now I do need qualify pretty solid, its solid if I just leave the
 osgtext --mt to do its stuff, but if I enable stats by pressing 's' I
 getting freetype warnings printed out to the console and sometimes get
 gargabe text on the stats.  Since the mutexes I've added were per
 Font, I suspect that perhaps freetype can't handle separate threads
 using different fonts at the same time - it can only handle single
 threaded access.  This is my suspicion, one I haven't tested yet.
 I'll do this another day though, its late in day and my RSI is biting.

I have just changed the Font mutex I added yesterday to a static Font
mutex that is shared between all Font's.  This change ensures the
serialization of calls to freetype and clears the remaining problem of
enabling stats while running osgtext --mt.  This change in now checked
in.

Could user check out the svn version of the OSG and test out the
changes to osgText and let me know how you get on.

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


[osg-users] Friend functions

2007-09-01 Thread Renan Mendes
Hello,

I've got a small question that I've not been able to answer looking at c++
tutorials:
- Can friend functions call other methods from the classes they are friends
with?

Example

class First
{
 public:
  void function1();
};

class Second
{
 public:
  void function2();

 friend void First::function1();
};

First::function1()
{  function2();  }


Thanks.

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


Re: [osg-users] Friend functions

2007-09-01 Thread David Callu
try it

2007/9/1, Renan Mendes [EMAIL PROTECTED]:

 Hello,

 I've got a small question that I've not been able to answer looking at c++
 tutorials:
 - Can friend functions call other methods from the classes they are
 friends with?

 Example

 class First
 {
  public:
   void function1();
 };

 class Second
 {
  public:
   void function2();

  friend void First::function1();
 };

 First::function1()
 {  function2();  }


 Thanks.

 Renan M Z Mendes

 ___
 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] Friend functions

2007-09-01 Thread Renan Mendes
Thank you for the commentary.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Friend functions

2007-09-01 Thread Gordon Tomlinson
As David said, you should really try something like this first and then if
you have an issue try asking the question or Google it.
 
See http://www.parashift.com/c++-faq-lite/friends.html
 
Also the OSG forum is not really the place to be asking C++ questions, there
are many places better suited for those type  of questions
 

__
Gordon Tomlinson 

Email   : [EMAIL PROTECTED]
Website : www.vis-sim.com www.gordontomlinson.com 


__

Self defence is not a function of learning tricks 
but is a function of how quickly and intensely one 
can arouse one's instinct for survival 
-Master Tambo Tetsura 

 

  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David Callu
Sent: 01 September 2007 18:03
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] Friend functions


try it


2007/9/1, Renan Mendes [EMAIL PROTECTED]: 

Hello,

I've got a small question that I've not been able to answer looking at c++
tutorials:
- Can friend functions call other methods from the classes they are friends
with?

Example

class First 
{
 public:
  void function1();
};

class Second
{
 public:
  void function2();

 friend void First::function1();
};

First::function1()
{  function2();  } 


Thanks.

Renan M Z Mendes

___
osg-users mailing list
osg-users@lists.openscenegraph.org
mailto:osg-users@lists.openscenegraph.org 
http://lists.openscenegraph.org/listinfo.cgi/osg-users-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] OpenThreads external referrence

2007-09-01 Thread olaf flebbe
Hi Robert,

 
 On 8/30/07, olaf flebbe [EMAIL PROTECTED] wrote:
 svn: PROPFIND request failed on
 '/svn/osg/OpenThreads/trunk/include/OpenThreads'
 svn: PROPFIND of '/svn/osg/OpenThreads/trunk/include/OpenThreads': 301
 Moved Permanently (http://www.openscenegraph.com)
 

 IMHO the domain part of the svn:externals is incorrect (.com rather than
 .org).
 
 IMHO you don't need the IMHO, the svn externals reference is in
 correct now, it wasn't originally because 2.0 went out when we still
 had to use the .com domain.
 
 I don't know svn well enough to know how to efficient fix this in
 retrospect.  Suggestions?
 

As far as I know, properties are versioned. I would suggest propedit
(or simply propdel/propset). unfortunatly propedit only works with local
copies.

Use svn propedit svn:externals . on a local copy of the 2.0 branch,
and commit.


 IMHO the external reference in a fixed version-branch should not point
 to a moving target trunk.
 
 Well a branch should map to branch, I don't personally know how to set
 this. Alas I'm not expert in everything having to spread myself too
 thinly.
 
 Do you know how to set this?
 
 --

If you are doing propedit, change the URL from trunk to the right
branch in OpenThreads. Unfortunatly I do not know which branch of OT was
current when OSG made 2.0.


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


Re: [osg-users] osg::DeleteHander - the good, the bad and ugly

2007-09-01 Thread Cedric Pinson
I tried a little brut test about smart pointer from osg and the similar 
approch in boost with instrusive_ptr

here the result with the source code:

PROFILE_ROOT prt 100.00 glb 100.00 - time  31.785504 avg  31.785504 
ncall 1 
osg_smprt   2.85 glb   2.85 - time   0.905553 avg   0.905553 
ncall 1 
boost_sm prt   2.84 glb   2.84 - time   0.901856 avg   0.901856 
ncall 1 
boost2  prt  23.95 glb  23.95 - time   7.611869 avg   7.611869 
ncall 1 
osg2 prt  70.37 glb  70.37 - time  22.366193 avg  22.366193 
ncall 1 


Cedric

Robert Osfield wrote:

Hi André,

On 8/31/07, André Garneau [EMAIL PROTECTED] wrote:
  

FYI you might want to check the Boost::intrusive_ptr implementation (similar
in concept to OSG's ref_ptr) as it is using an underlying implementation
that does atomic reference counting (using CPU native Interlocked
test/increments). Note that I'm not suggesting to use Boost, just to get
ideas from this implementation.



Thanks for the suggestion.

I'm chasing bugs right now.  Could members of the community have a
look into this? i.e. the possibility of adding atmoic counts into
OpenThreads and ref_ptr.

Cheers,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
/*
#
# Copyright (C) 2007 Cedric Pinson
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# Authors:
#  Cedric Pinson [EMAIL PROTECTED]
#
# 
*/
#ifdef HAVE_CONFIG_H
#include ../config.h
#endif
#include iostream

#ifdef USE_NPROFILE
#include nprofile/profile.h
#endif

#include cstdlib
#include osg/Referenced
#include osg/ref_ptr

#include cmath

#include boost/config.hpp
#include boost/shared_ptr.hpp
#include boost/intrusive_ptr.hpp



struct Test : public osg::Referenced
{
protected:
public:
  int value;
  Test(): value(1) {}
  void test1() { value+=1;}
  void test2()  { value+=2;}
};

struct TestBoost
{
  unsigned int count;

  TestBoost(): count(0)
  {
value = 1;
  }

  int value;
  void test1() { value+= 1;}
  void test2()  { value+=2;}

};

void intrusive_ptr_add_ref(TestBoost * p)
{
  ++p-count;
}

void intrusive_ptr_release(TestBoost * p)
{
  if(--p-count == 0) delete p;
}



static boost::intrusive_ptrTestBoost test_boost= new TestBoost;
static osg::ref_ptrTest test_osg = new Test;

void testboost(int n)
{
  NPROFILE_SAMPLE(boost_sm);
  for (int i = 0;i  n; i++) {
  for (int j = 0;j  n; j++) {
test_boost-test1();
test_boost-test2();
test_boost-test1();
test_boost-test2();
test_boost-test1();
test_boost-test2();
  }
  }
}

void testboost2(int n)
{
  NPROFILE_SAMPLE(boost2);
  for (int i = 0;i  n; i++) {
boost::intrusive_ptrTestBoost test_boost2;
boost::intrusive_ptrTestBoost test_boost3;
test_boost2 = test_boost;
test_boost3 = test_boost2;
test_boost = test_boost3;
  }
}

void testosg(int n)
{
  NPROFILE_SAMPLE(osg_sm);
  for (int i = 0;i  n; i++) {
  for (int j = 0;j  n; j++) {
test_osg-test1();
test_osg-test2();
test_osg-test1();
test_osg-test2();
test_osg-test1();
test_osg-test2();
  }
  }
}

void testosg2(int n)
{
  NPROFILE_SAMPLE(osg2);
  for (int i = 0;i  n; i++) {
osg::ref_ptrTest test_osg2;
osg::ref_ptrTest test_osg3;
test_osg2 = test_osg;
test_osg3 = test_osg2;
test_osg = test_osg3;
  }
}

void func(int arg)
{
  //  NPROFILE_SAMPLE(root);
  testosg(arg);
  testboost(arg);
  testboost2(arg);
  testosg2(arg);
}

int main(int argc , char **argv)
{

  unsigned int arg = 2147483647;
  std::cout  arg  std::endl;

  nprf::GetProfiler()-Reset();

  func(arg);

  nprf::GetProfiler()-EndProfile();
  nprf::GetProfiler()-GetRootNode()-DisplayFlatStats(std::cout);
  std::cout  test_osg-value  std::endl;
  std::cout  test_boost-value  std::endl;

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