Re: [osg-users] plugin to read .jpg files

2009-04-08 Thread Ismail Pazarbasi
Hi Dat, check whether osgdb_jpeg library is present in osg's bin or plugins directory. If it is present, then ensure that it's accessible by your application (as a matter of fact, by your operating system's dynamic linker; good starting point could be copying osgdb_jpeg library into your applicati

Re: [osg-users] Light Manager

2009-04-09 Thread Ismail Pazarbasi
Sajjad, Although you refer to Brian's message, I would like to explain what he meant briefly. dynamic_cast allows casting both down and up in inheritance hierarchy. If object's dynamic type isn't Switch, then you cannot cast a Group pointer to Switch with dynamic cast. That is: osg::Group* pGro

Re: [osg-users] plugin to read .jpg files

2009-04-09 Thread Ismail Pazarbasi
uild one by myself. But when I start, I > don't know how to do it (sorry for my stupidity, but I've never worked with > dll project before). > Could you please guide me through the process of making the plug-in for > OpenSceneGraph, or creating a new project to make osgdb_jp

Re: [osg-users] Build of svn head, OGR plugin issues

2009-04-10 Thread Ismail Pazarbasi
Hi Robert, although Apple doesn't sell PPC machines anymore, there are hardcore devs still using PPC. Mach-O binary can have all architectures you mentioned. Therefore, passing -arch i386 -arch x86_64 and so on should generate a binary that contains a Mach-O binary for all listed architecture. So

Re: [osg-users] Rotation of object

2009-04-12 Thread Ismail Pazarbasi
Hi Sergey, use osg::Quat to rotate your object. Trans->setAttitude(osg::Quat(osg::DegreesToRadians(rotation_degree), fX, fY, fZ)); where fX, fY and fZ indicates axis to rotate. Trans->setAttitude(osg::Quat(osg::DegreesToRadians(rotation_degree), 1.0, 0.0, 0.0)); will rotate object around X axis.

Re: [osg-users] Rotation of object

2009-04-12 Thread Ismail Pazarbasi
I meant the latter overload. I didn't have access to any osg stuff and no compiler. Sorry for overload confusion, but it's good that you found how to use osg::Quat. On Sun, Apr 12, 2009 at 9:59 PM, Sergey wrote: > You have a little mistake: > THIS : > Trans->setAttitude(osg::Quat(osg::DegreesToRa

Re: [osg-users] [build] Postbuild error with ot11-OpenThreads??

2009-04-14 Thread Ismail Pazarbasi
Hi John, could it be a permission problem? Can you see other files written into that folder? On Vista, one may need adminisrative priviliges to write into program files folder. You may try to run Visual C++ as Administrator. I am using Vista Business with VC9 on my secondary laptop as well, but n

Re: [osg-users] Problem of points showing

2009-04-14 Thread Ismail Pazarbasi
Hi Lingyun, std::bad_alloc is thrown when operator new cannot allocate memory, which indicates there is not enough memory. You may reserve your array before hand, as Paul mentioned, but it may throw as well. This could reduce, if nothing, copy operations. It may also prevent exception, because whe

Re: [osg-users] Turning the main viewer camera on and off (when taking high-res camera screenshots).

2009-04-15 Thread Ismail Pazarbasi
Jesper, 2 days ago, I was doing the same thing, same problem, but with composite viewer. Here is what I did... I create my screenshot camera while I create my main CompositeViewer and its children Viewers. When I create this screenshot viewer, I set its nodemask to 0 - by default, it won't render

Re: [osg-users] Problem of points showing

2009-04-15 Thread Ismail Pazarbasi
Until 9th item, vector will not need to reallocate memory. 2009/4/15 Lingyun Yu : > Hi, Ismail, > > I don't understand how the "expanding" happen? > I read all dataset into an array of P, then when it expands? and why? > and what's old array? > > On Tue, Ap

Re: [osg-users] Problem of points showing

2009-04-15 Thread Ismail Pazarbasi
gyun Yu >> >> Hi, Ismail, >> >> I don't understand how the "expanding" happen? >> I read all dataset into an array of P, then when it expands? and why? >> and what's old array? >> >> On Tue, Apr 14, 2009 at 2:27 PM, Ismail Pazarbasi

Re: [osg-users] Problem of points showing

2009-04-15 Thread Ismail Pazarbasi
Hi Martin, ISO 14882:2003 (the C++03) standard doesn't clearly specify how containers must swap its contents. It's clearly specified in C++0x drafts. Most implementations simply exchange internal block (pointers) and capacity, if allocators are the same. Otherwise, each element will be copied. re

Re: [osg-users] OsgSwig on mac osx 10.5.6 (xcode 3.1)

2009-04-16 Thread Ismail Pazarbasi
Hi Massimo, I am not on my Mac right now, but I can quickly suggest you to add osg, osgText, osgIntrospection (and few more) frameworks to your executable to get you started as quick as possible. I may not recall all dependencies' names, as I am not on my development Mac; sorry! Adding frameworks

Re: [osg-users] OsgSwig on mac osx 10.5.6 (xcode 3.1)

2009-04-16 Thread Ismail Pazarbasi
3:10 PM, Massimo Di Stefano wrote: > > Ismail Pazarbasi wrote: >> Hi Massimo, >> >> I am not on my Mac right now, but I can quickly suggest you to add >> osg, osgText, osgIntrospection (and few more) frameworks to your >> executable to get you started as quick

Re: [osg-users] OSG begginer question - osg crush on run-time

2009-04-19 Thread Ismail Pazarbasi
Hi Sh Ha, If I recall correctly, similar use case worked for me on Mac OS X, but crashed on Windows (Vista). I simply did: osg::ref_ptr spViewer = new osgViewer::Viewer; ... return spViewer->run(); I have no access to source code (I am on vacation). I think what you see could be related to how obj

Re: [osg-users] build problem on Mac OS/X 10.5.6

2009-04-26 Thread Ismail Pazarbasi
On Sun, Apr 26, 2009 at 6:09 PM, Stephan Huber wrote: > Hi, > > please don't hijack old threads for starting new threads. Start a new > one instead. This will help people following and reading your post. > > It seems, that the inventor-framework is not universal build (ppc + > intel) so either > *

Re: [osg-users] isVertexBufferObjectSupported() ?

2009-05-05 Thread Ismail Pazarbasi
Ufuk, bool isVertexBufferObjectSupported() const { return _isVertexBufferObjectSupportResolved?_isVertexBufferObjectSupported:computeVertexBufferObjectSupported(); } If you have seen the code that checks whether extension is supported: bool State::computeVertexBufferObjectSupported() const {

Re: [osg-users] Visual Studio Setup Woes

2009-05-12 Thread Ismail Pazarbasi
Hi Dwight, I don't know whether there is tuturial about CMake but those red lines indicate some variables that are required/suggested. If you are familiar with configure scripts on linux/unix, red lines are analogous to --with-PKG=path_to_dependency or --enable-FEATURE (if I recall correctly). Wa

Re: [osg-users] Understanding OSG : plugins runtime loading question

2009-05-13 Thread Ismail Pazarbasi
On Wed, May 13, 2009 at 9:47 AM, Vincent Bourdier wrote: > Hi all, > > I'm currently making a dynamic lib for my application, and so I use the > osgDB::DynamicLibrary class to load the lib and find the Proc_adress but, > there are some points I would like to understand more : > > 1. > The osgDB::D

Re: [osg-users] OSG and QT integration problem

2009-05-13 Thread Ismail Pazarbasi
On Wed, May 13, 2009 at 9:02 AM, Максим Гаммер wrote: > Hi. > > There is a problem of my program and QT integration. Problem occurs > when I'm trying to use OSG ModularEmitter for particle creation. > > In process of compilation I get the following: > ... > /usr/local/include/ > osgParticle/Modula

Re: [osg-users] Makefile question

2009-05-13 Thread Ismail Pazarbasi
On Wed, May 13, 2009 at 11:25 PM, Wyatt Earp wrote: > I am writing my own make files for my osg app... when I link to GL, or GLUT, > I use -lGL or -lGLUT... what is the equivalent for osg libraries?  Would it > be something like -losgViewer for libosgViewer.so? > > W.E. > > > _

Re: [osg-users] OSG_OpenCV Help

2009-05-18 Thread Ismail Pazarbasi
Hi Ugras, Did you try to run your code in single threaded mode? This could give you a hint whether problem is a race. It's difficult to guess what's going on, but did you try to lock mutex while you read data as well? This might effectively make your program serial during those phases (which defe

Re: [osg-users] Dynamically generating smooth camera rides?

2009-05-26 Thread Ismail Pazarbasi
2009/5/25 Christian Buchner : > Forgive my laziness - are there any utility classes within OSG that > let the camera go on a smooth ride to a specific location and eyepoint > vector from the current location?   I mean smooth in the sense of the > camera accelerating and braking, instead of making a

Re: [osg-users] osg::ref_ptr<> used anymore

2009-05-28 Thread Ismail Pazarbasi
2009/5/28 Jason Daly : > Rabbi Robinson wrote: [snip] >> If later I call, ptr = NULL, it doesn't seem that there is anyway to tell >> node to decrement the reference count in node. > > This will decrement the reference count in node.  If the reference count > goes to zero, it will be deleted. > > -

Re: [osg-users] Access vertices and faces after load the model

2009-05-28 Thread Ismail Pazarbasi
2009/5/28 Xin Chen : > Hi, > >    I'm new to OSG. I use the following code to load my model, which is > successful.  How can I access the vertices and faces of the model? Thank you. > > nNode = osgDB::readNodeFile("D:/Livingroom.3DS"); > > > > > > Thank you! > > Cheers, > xinchen > > -

Re: [osg-users] MFC or Win32 based viewer

2009-05-28 Thread Ismail Pazarbasi
2009/5/28 Clay, Bruce : > I have tried all of the ones except for osgWin32Demo (the link is > nonresponsive) in the windowing Toolkit section and can not get them to > compile with the current version of OSG for various reasons.  One uses a > CameraManipulator which doe4s not seem to be in the curr

Re: [osg-users] Access vertices and faces after load the model

2009-05-28 Thread Ismail Pazarbasi
2009/5/28 Xin Chen : > Hello Ismail, > >       Thanks for your reply. I did look at the source code to load .stl > models. I found that there are _vertices and _normal variables in the source > code. That's why I'm asking if there is a way to access those parameters. Any > idea or sample code? T

Re: [osg-users] osg::ref_ptr<> used anymore

2009-05-31 Thread Ismail Pazarbasi
2009/5/31 Ulrich Hertlein : > On 31/5/09 7:07 PM, James Killian wrote: >> >> Not ALL pointers need a reference count like those which are private >> (not intended to be shared), that's one reason why boost created the >> scoped pointer... too bad all the c++ programmers I know never use them. > > M

Re: [osg-users] osg::ref_ptr<> used anymore

2009-05-31 Thread Ismail Pazarbasi
2009/5/31 Ulrich Hertlein : > On 31/5/09 9:06 PM, Ismail Pazarbasi wrote: >> >> 2009/5/31 Ulrich Hertlein: >>> >>> Maybe because boost isn't exactly a light dependency to carry around? >>> ... >> >> sorry but what's so heavy about b

Re: [osg-users] osg::ref_ptr<> used anymore

2009-06-01 Thread Ismail Pazarbasi
2009/6/1 James Killian : >>  The real question is -- does boost even offer a smart pointer type that >> replicates >> ref_ptr, or is all this a pointless exercise? > > I've stepped through ref_ptr code before and it does seem similar to > intrusive and perhaps shared as well.  I have also discovere

Re: [osg-users] maxium children count

2009-06-06 Thread Ismail Pazarbasi
2009/6/6 Rabbi Robinson : > Hi, > > I am doing a PDB (protein data base) file importer. The number of atoms in a > typical database is about 4000 to 6000, I organize them in to groups with > positionattitudetransform. I noticed if the number of atoms exceeds certain > number, the program crashes

Re: [osg-users] CPU usage

2009-06-08 Thread Ismail Pazarbasi
On Mon, Jun 8, 2009 at 3:59 PM, Cory Riddell wrote: > Hi Robert, > > On Fri, Jun 5, 2009 at 8:21 PM, Cory Riddell wrote: > > > Does anybody see less than 100% CPU utilization when running osgviewer > cow.osg on an ATI card? I had just been accepting that as normal. > > > 100% CPU is not normal at a

Re: [osg-users] ref_ptr question

2009-06-24 Thread Ismail Pazarbasi
On Wed, Jun 24, 2009 at 10:12 PM, Judd Tracy wrote: > You could always attach a create your own DeleteHandler and attach it to the > node, but I don't know if that will help you other then letting you know it > is going to be deleted. > > On Wed, Jun 24, 2009 at 11:58 AM, wrote: >> >> What is the

Re: [osg-users] how to compile openscenegraph in 64 bit archytecture

2009-08-16 Thread Ismail Pazarbasi
2009/8/16 lucas Grijander : > Hi everybody, > i am trying to compile openscenegraph in our new server (64 bit double quad > processor), but I get some errors with the dependencies, which are > pre-compiled (in 32bits I suppose). Does anybody have the dependencies > pre-compiled in 64bits? Did anybo

Re: [osg-users] how to compile openscenegraph in 64 bit archytecture

2009-08-16 Thread Ismail Pazarbasi
2009/8/16 lucas Grijander : > Hi, > actually I also want to compile 2.8.0. The platform will be Windows Server > 2003. So you recommend to download the sources of 3rdparty and re-compile > everything in 64? > J. > > >> Date: Sun, 16 Aug 2009 15:39:03 +0200 >> From: pazarb...@gmail.com >> To: osg-us

Re: [osg-users] how to compile openscenegraph in 64 bit archytecture

2009-08-16 Thread Ismail Pazarbasi
2009/8/16 lucas Grijander : > I'm sorry but I don't have a lot of experience in compilation. I downloaded > the required libs from gnuwin32 (tiff, png, gif, jpg, freetype), and now > they say to use this to compile it: > nmake /f makefile.vc > but where do I have to change the configuration to spec

Re: [osg-users] how to compile openscenegraph in 64 bit archytecture

2009-08-16 Thread Ismail Pazarbasi
2009/8/16 lucas Grijander : > thanks! > I suppose that I should change something in the nmake.opt file? > > J. > >> Date: Sun, 16 Aug 2009 17:21:05 +0200 >> From: pazarb...@gmail.com >> To: osg-users@lists.openscenegraph.org >> Subject: Re: [osg-users] how to compile openscenegraph in 64 bit >> arc

Re: [osg-users] Reference count catcher?

2009-08-19 Thread Ismail Pazarbasi
2009/8/19 Ufuk : > i have an osg::Geometry. i store it in a class with ref_ptr > when i delete it, i expect it to be deleted. > in debug, i saw that the reference count is 2 before this destructor. > even if i set this value to null, there reference count remains 1. > so it is not deleting... > > w

Re: [osg-users] Derived classes and ref_ptr

2009-09-04 Thread Ismail Pazarbasi
2009/9/5 Martin Beckett : > [quote="Paul Martz"]If you can (obviously) change your code to understand > instances of your new custom class, then I don't understand why you can't > change your code to understand instances of ref_ptrs to your new custom > class. Please explain this restriction fur

Re: [osg-users] Derived classes and ref_ptr

2009-09-04 Thread Ismail Pazarbasi
Hi Martin, 2009/9/5 Martin Beckett : > Thanks but not really - then I can't use the new class in the scene graph. > Yes, you can, can't you? Pass your objects to constructor. I wouldn't do it, but you want if you want to. class MyAdapter { typedef osg::ref_ptr osg_pat_type; osg_pat_type m_spp

Re: [osg-users] Derived classes and ref_ptr

2009-09-04 Thread Ismail Pazarbasi
It appears that I forgot comments in constructors. 2009/9/5 Ismail Pazarbasi : [snip] class MyAdapter {  typedef osg::ref_ptr osg_pat_type;  osg_pat_type m_sppat; public: // here is missing part  // you will use this constructor to pass a osg::ref_ptr  explicit MyAdapter(osg_pat_type pat

Re: [osg-users] Snow Leopard stl issues? (osg 2.9.5)

2009-10-07 Thread Ismail Pazarbasi
2009/10/7 Chip Collier : > Hi again! :) > > So it's just a problem with OSG in general it seems. I've tried building and > linking in many different ways, all end in segfaults when trying to get the > name of a node. I haven't tried much else because that's a pretty basic first > step. > > The a

Re: [osg-users] readPixels return blank image

2010-01-11 Thread Ismail Pazarbasi
2010/1/11 forest : > hi all, > I want to capture the screen ,what I have done is to add a eventhandler in > which I add code like this > >     osg::ref_ptr image = new osg::Image; >     image->readPixels(0,0,m_iWidth,m_iHeight, GL_RGB,GL_UNSIGNED_BYTE); >     osgDB::writeImageFile(*image,"D:\\abc.b