Re: [osg-users] 3d Models for free?

2011-06-01 Thread dimi christop
You can also try this online file conversion service (free)
http://www.babel3d.com/

Dimi





From: Ryan Pavlik 
To: OpenSceneGraph Users 
Sent: Wed, June 1, 2011 6:19:35 PM
Subject: Re: [osg-users] 3d Models for free?

I've also created a plugin for SketchUp that automates the process of exporting 
to collada then converting to 
OSG-format. https://github.com/rpavlik/sketchupToOSG

Ryan


On Wed, Jun 1, 2011 at 5:21 AM, Kim Bale  wrote:

Hi Dimi,
>
>Sketchup allows you to export them as Collada files and then you can either 
>read 
>them with the DAE plugin or convert them using osgConv.
>
>
>Kim.
>
>
>
>On 1 June 2011 11:19, dimi christop  wrote:
>
>Hi thanks for the tip,
>>how do you convert the sketchup files into osg?
>>
>>Dimi
>>
>>
>>
>>
>>- Original Message 
>>From: J.P. Delport 
>>To: osg-users@lists.openscenegraph.org
>>Sent: Wed, June 1, 2011 12:52:17 PM
>>Subject: Re: [osg-users] 3d Models for free?
>>
>>Hi,
>>
>>I normally start here:
>>http://sketchup.google.com/3dwarehouse/search?q=wind+turbine&styp=m&btnG=Search

>>
>>It's weird how if one types "free " into search engines the
>>results are close to useless :(
>>
>>jp
>>
>>On 01/06/11 11:19, Torben Dannhauer wrote:
>>> Hi,
>>>
>>> does anyone know sites where I can get free 3d models?
>>> I'm searching models of wind turbine (land based and/or offs shore) to place
>>>them in my landscape (based on OpenStreetmap data).
>>>
>>> Thank you!
>>>
>>> Cheers,
>>> Torben
>>>
>>> --
>>> Read this topic online here:
>>> http://forum.openscenegraph.org/viewtopic.php?p=39991#39991
>>>
>>>
>>>
>>>
>>>
>>> ___
>>> osg-users mailing list
>>> osg-users@lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>--
>>This message is subject to the CSIR's copyright terms and conditions, e-mail
>>legal notice, and implemented Open Document Format (ODF) standard.
>>
>>The full disclaimer details can be found at
>>http://www.csir.co.za/disclaimer.html.
>>
>>This message has been scanned for viruses and dangerous content by 
MailScanner,
>>and is believed to be clean.
>>
>>___
>>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
>
>


-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Bug: failure building package_ALL on Linux

2011-06-01 Thread Ryan Pavlik
Doesn't seem like a showstopper to me either, as long as Windows
packages build (they do, though the equivalent error appears: "The
system cannot find the file specified."). The error occurs after the
actual packages are generated - so, they're still available and
usable, just not apparently moved where they once were desired.

Ryan

On Wed, Jun 1, 2011 at 3:51 PM, Paul Martz  wrote:
> Thanks. If someone wants to step forward and create a fix, I'll be glad to
> add it to 2.8.5 (have to do another RC for the 3ds issue anyway). Otherwise
> we'll release without it, as I assume this was broke on 2.8.4 and 2.8.3 as
> well, so is not really a showstopper IMO.
>   -Paul
>
>
> On 6/1/2011 2:14 PM, Ryan Pavlik wrote:
>>
>> Just wanted to share this bug report: I can't currently build
>> package_ALL on Linux in either trunk or 2.8 - it tries to move a file
>> that doesn't exist. I have forwarded the excerpt from a build log (2.8
>> branch in this case) - Ubuntu 11.04 x64 using cmake version 2.8.3.  I
>> haven't worked on tracking down what the issue is here - the packaging
>> cmake files are rather hard to follow so I haven't had a chance to
>> look into it sufficiently yet.
>>
>> Ryan
>>
>> -- Forwarded message --
>> From: Ryan Pavlik
>> Date: Wed, Jun 1, 2011 at 2:41 PM
>> Subject: Build failed in Jenkins: OSG-2.8 #11
>> To: rpav...@iastate.edu
>>
>> + make package_ALL
>> Scanning dependencies of target package_ALL
>> CPack: Create package using TGZ
>> CPack: Install projects
>> CPack: - Run preinstall target for: OpenSceneGraph
>> CPack: - Install project: OpenSceneGraph
>> CPack: -   Install component: libopenscenegraph
>> CPack: -   Install component: libopenscenegraph-dev
>> CPack: -   Install component: libopenscenegraph-dicom
>> CPack: -   Install component: libopenscenegraph-ffmpeg
>> CPack: -   Install component: libopenscenegraph-pdf
>> CPack: -   Install component: libopenscenegraph-svg
>> CPack: -   Install component: libopenscenegraph-vnc
>> CPack: -   Install component: libopenscenegraph-wrappers
>> CPack: -   Install component: libopenthreads
>> CPack: -   Install component: libopenthreads-dev
>> CPack: -   Install component: openscenegraph
>> CPack: -   Install component: openscenegraph-doc
>> CPack: -   Install component: openscenegraph-examples
>> CPack: -   Install component: openthreads-doc
>> CPack: Create package
>> CPack Warning: [TGZ] Some Components defined but NO component group:
>> Ignoring component group.
>> CPack: - package:
>>   generated.
>> CPack: - package:
>>   generated.
>> CPack: - package:
>>   generated.
>> CPack: - package:
>> 
>> generated.
>> CPack: - package:
>>   generated.
>> CPack: - package:
>>   generated.
>> CPack: - package:
>>   generated.
>> CPack: - package:
>> 
>> generated.
>> CPack: - package:
>>  generated.
>> CPack: - package:
>>   generated.
>> CPack: - package:
>>  generated.
>> CPack: - package:
>>   generated.
>> CPack: - package:
>>   generated.
>> CPack: - package:
>>  generated.
>> mv: cannot stat `OpenSceneGraph-2.8.5.tar.gz': No such file or directory
>> make[3]: *** [package_ALL] Error 1
>> make[2]: *** [CMakeFiles/package_ALL.dir/all] Error 2
>> make[1]: *** [CMakeFiles/package_ALL.dir/rule] Error 2
>> make: *** [package_ALL] Error 2
>>
>>
>>
>>
>> --
>> Ryan Pavlik
>> HCI Graduate Student
>> Virtual Reality Applications Center
>> Iowa State University
>>
>> rpav...@iastate.edu
>> http://academic.cleardefinition.com
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
>
> --
>  -Paul Martz      Skew Matrix Software
>                   http://www.skew-matrix.com/
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Bug: failure building package_ALL on Linux

2011-06-01 Thread Paul Martz
Thanks. If someone wants to step forward and create a fix, I'll be glad to add 
it to 2.8.5 (have to do another RC for the 3ds issue anyway). Otherwise we'll 
release without it, as I assume this was broke on 2.8.4 and 2.8.3 as well, so is 
not really a showstopper IMO.

   -Paul


On 6/1/2011 2:14 PM, Ryan Pavlik wrote:

Just wanted to share this bug report: I can't currently build
package_ALL on Linux in either trunk or 2.8 - it tries to move a file
that doesn't exist. I have forwarded the excerpt from a build log (2.8
branch in this case) - Ubuntu 11.04 x64 using cmake version 2.8.3.  I
haven't worked on tracking down what the issue is here - the packaging
cmake files are rather hard to follow so I haven't had a chance to
look into it sufficiently yet.

Ryan

-- Forwarded message --
From: Ryan Pavlik
Date: Wed, Jun 1, 2011 at 2:41 PM
Subject: Build failed in Jenkins: OSG-2.8 #11
To: rpav...@iastate.edu

+ make package_ALL
Scanning dependencies of target package_ALL
CPack: Create package using TGZ
CPack: Install projects
CPack: - Run preinstall target for: OpenSceneGraph
CPack: - Install project: OpenSceneGraph
CPack: -   Install component: libopenscenegraph
CPack: -   Install component: libopenscenegraph-dev
CPack: -   Install component: libopenscenegraph-dicom
CPack: -   Install component: libopenscenegraph-ffmpeg
CPack: -   Install component: libopenscenegraph-pdf
CPack: -   Install component: libopenscenegraph-svg
CPack: -   Install component: libopenscenegraph-vnc
CPack: -   Install component: libopenscenegraph-wrappers
CPack: -   Install component: libopenthreads
CPack: -   Install component: libopenthreads-dev
CPack: -   Install component: openscenegraph
CPack: -   Install component: openscenegraph-doc
CPack: -   Install component: openscenegraph-examples
CPack: -   Install component: openthreads-doc
CPack: Create package
CPack Warning: [TGZ] Some Components defined but NO component group:
Ignoring component group.
CPack: - package:
  generated.
CPack: - package:
  generated.
CPack: - package:
  generated.
CPack: - package:

generated.
CPack: - package:
  generated.
CPack: - package:
  generated.
CPack: - package:
  generated.
CPack: - package:

generated.
CPack: - package:  generated.
CPack: - package:
  generated.
CPack: - package:  generated.
CPack: - package:
  generated.
CPack: - package:
  generated.
CPack: - package:  generated.
mv: cannot stat `OpenSceneGraph-2.8.5.tar.gz': No such file or directory
make[3]: *** [package_ALL] Error 1
make[2]: *** [CMakeFiles/package_ALL.dir/all] Error 2
make[1]: *** [CMakeFiles/package_ALL.dir/rule] Error 2
make: *** [package_ALL] Error 2




--
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org





--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] glGenBuffers + OSG - returns 0 for all buffer IDs

2011-06-01 Thread Kris Dale
Ah, of course.  I hadn't even thought about going into a callback.  Hm.  Still 
a bit odd I can't do the initial setup in the beginning instead of having to 
check and see if the buffer has been created every time..  but still, thanks 
for the heads up.  :)




J.P. Delport wrote:
> Hi,
> 
> On 31/05/11 23:52, Kris Dale wrote:
> 
> > Greetings all,
> > 
> > I've been learning PBOs here lately, and I can't seem to find any
> > tutorials about how to use OSG::PixelBufferObjects.  If anyone can
> > point me in the direction of one, that would be awesome, as I
> > wouldn't have to mix OGL and OSG code quite as much as I'm doing
> > now.
> > 
> > Right now what I'm doing is trying to copy back the frame buffer to a
> > PBO each frame, but I can't get glGenBuffers to return a valid buffer
> > ID.  I've tried passing in a single int or an array, but all I get
> > back are 0's.  (In a strict GLUT/GL project, I get 1,2,3..)
> > 
> > I've made sure (as much as I can) that I have a context..  I've
> > created a graphicscontext, a window exists, I've called
> > viewer.realize(), even tried one viewer.frame() before glGenBuffers.
> > All I can get back are 0's.  So naturally when I try to bindbuffer /
> > readpixels / mapbuffer, I just get back a null pointer because my
> > bufferID is zero.
> > 
> > Can anyone suggest a reason this might be happening?  (Even if you
> > can point me to a good OSG tutorial on using OSG::PixelBufferObjects,
> > I'd still be curious to know.)
> > 
> > Thanks in advance for any guidance anyone can offer..
> > 
> 
> you'll probably have to stick your code into a camera callback to make 
> sure you have a valid context.
> 
> See the osgscreencapture example for some use of PBO. I also paste some 
> small example below that shows some methods for reading back texture data.
> 
> HTH
> jp
> 
> --8<--
> 
> struct GPURegionOfInterestCallback : public osg::Camera::DrawCallback
> {
> GPURegionOfInterestCallback(ImageFormat& imf,
> osg::Image *osg_im,
> osg::TextureRectangle *tex) :
> ImageFormat_(imf),
> osg_im_(osg_im),
> trect_(tex)
> {
> pdbo_ = new osg::PixelDataBufferObject();
> pdbo_->setDataSize(ImageFormat_.getBytesPerImage());
> }
> virtual void operator() (osg::RenderInfo& renderInfo) const
> {
> // first get the texture into the pbo
> pdbo_->bindBufferInWriteMode(*renderInfo.getState());
> renderInfo.getState()->applyTextureAttribute(0, //unit
> trect_);
> glGetTexImage(trect_->getTextureTarget(),
> 0, //level
> GL_LUMINANCE,
> GL_UNSIGNED_BYTE,
> NULL);
> 
> // now copy to cpu
> osg::GLBufferObject::Extensions* ext = 
> osg::GLBufferObject::getExtensions(renderInfo.getState()->getContextID(), 
> true);
> GLubyte* src = 
> (GLubyte*)ext->glMapBuffer(GL_PIXEL_PACK_BUFFER_ARB,
> 
> GL_READ_ONLY_ARB);
> if(src)
> {
> memcpy(osg_im_->data(), src, 
> osg_im_->getTotalSizeInBytes());
> ext->glUnmapBuffer(GL_PIXEL_PACK_BUFFER_ARB);
> }
> 
> pdbo_->unbindBuffer(renderInfo.getState()->getContextID());
> 
> /*
> // direct to image from texture
> renderInfo.getState()->applyTextureAttribute(0, //unit
> trect_);
> glGetTexImage(trect_->getTextureTarget(),
> 0, //level
> GL_LUMINANCE,
> GL_UNSIGNED_BYTE,
> osg_im_->data());
> */
> }
> 
> ImageFormat ImageFormat_;
> osg::Image* osg_im_;
> osg::TextureRectangle* trect_;
> osg::ref_ptr pdbo_;
> 
> };
> 

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





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


[osg-users] Bug: failure building package_ALL on Linux

2011-06-01 Thread Ryan Pavlik
Just wanted to share this bug report: I can't currently build
package_ALL on Linux in either trunk or 2.8 - it tries to move a file
that doesn't exist. I have forwarded the excerpt from a build log (2.8
branch in this case) - Ubuntu 11.04 x64 using cmake version 2.8.3.  I
haven't worked on tracking down what the issue is here - the packaging
cmake files are rather hard to follow so I haven't had a chance to
look into it sufficiently yet.

Ryan

-- Forwarded message --
From: Ryan Pavlik 
Date: Wed, Jun 1, 2011 at 2:41 PM
Subject: Build failed in Jenkins: OSG-2.8 #11
To: rpav...@iastate.edu

+ make package_ALL
Scanning dependencies of target package_ALL
CPack: Create package using TGZ
CPack: Install projects
CPack: - Run preinstall target for: OpenSceneGraph
CPack: - Install project: OpenSceneGraph
CPack: -   Install component: libopenscenegraph
CPack: -   Install component: libopenscenegraph-dev
CPack: -   Install component: libopenscenegraph-dicom
CPack: -   Install component: libopenscenegraph-ffmpeg
CPack: -   Install component: libopenscenegraph-pdf
CPack: -   Install component: libopenscenegraph-svg
CPack: -   Install component: libopenscenegraph-vnc
CPack: -   Install component: libopenscenegraph-wrappers
CPack: -   Install component: libopenthreads
CPack: -   Install component: libopenthreads-dev
CPack: -   Install component: openscenegraph
CPack: -   Install component: openscenegraph-doc
CPack: -   Install component: openscenegraph-examples
CPack: -   Install component: openthreads-doc
CPack: Create package
CPack Warning: [TGZ] Some Components defined but NO component group:
Ignoring component group.
CPack: - package:
 generated.
CPack: - package:
 generated.
CPack: - package:
 generated.
CPack: - package:

generated.
CPack: - package:
 generated.
CPack: - package:
 generated.
CPack: - package:
 generated.
CPack: - package:

generated.
CPack: - package:  generated.
CPack: - package:
 generated.
CPack: - package:  generated.
CPack: - package:
 generated.
CPack: - package:
 generated.
CPack: - package:  generated.
mv: cannot stat `OpenSceneGraph-2.8.5.tar.gz': No such file or directory
make[3]: *** [package_ALL] Error 1
make[2]: *** [CMakeFiles/package_ALL.dir/all] Error 2
make[1]: *** [CMakeFiles/package_ALL.dir/rule] Error 2
make: *** [package_ALL] Error 2




--
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Transforming a quad polygon into a rectangle

2011-06-01 Thread Ryan Pavlik
Well, if you can get a 3x3, you should just be able to start with a 4x4
identity matrix and then copy the 3x3 into the upper-left corner of that
matrix.

Ryan

On Wed, Jun 1, 2011 at 9:08 AM, Kevin DeMott  wrote:

> I'm trying to find a way to convert a four sided polygon (non-rectangular)
> into a rectangle in 3D space.  I would like this to be some type of matrix
> transform as I need to be able to go both ways. IE from the polygon to a
> rectangle and from a rectangle to the polygon.
>
> I can do a similar operation in QT with the QTransform::quadToQuad. The
> problem with that approach is I end up with a 3x3 matrix whereas I need a
> 4x4 for the osg/opengl calls. I have not had much luck stuffing the 3x3 into
> a 4x4.
>
> Thanks
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=40008#40008
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Transforming a quad polygon into a rectangle

2011-06-01 Thread Kevin DeMott
I'm trying to find a way to convert a four sided polygon (non-rectangular) into 
a rectangle in 3D space.  I would like this to be some type of matrix transform 
as I need to be able to go both ways. IE from the polygon to a rectangle and 
from a rectangle to the polygon.

I can do a similar operation in QT with the QTransform::quadToQuad. The problem 
with that approach is I end up with a 3x3 matrix whereas I need a 4x4 for the 
osg/opengl calls. I have not had much luck stuffing the 3x3 into a 4x4.

Thanks

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





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


Re: [osg-users] OpenGL invalid operation error

2011-06-01 Thread Ryan Pavlik
On Wed, Jun 1, 2011 at 1:58 PM, Paul Martz  wrote:

> On 6/1/2011 12:09 PM, Jean-Francois Gagnon wrote:
>
>> Have you tried launching your application with gDebugger? I think it is
>> quite
>> apt and quick to find the source of those issues. There is an option that
>> let
>> you break the application upon error detection.
>>
>> Here is the link: http://www.gremedy.com/
>>
>
> Ditto. gDebugger or GLIntercept will nail down an error like this in
> seconds.
>   -Paul


A recent development is APITrace, which is a similar application,
open-source, and under very active development.

https://github.com/apitrace/apitrace

Ryan

-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenGL invalid operation error

2011-06-01 Thread Paul Martz

On 6/1/2011 12:09 PM, Jean-Francois Gagnon wrote:

Have you tried launching your application with gDebugger? I think it is quite
apt and quick to find the source of those issues. There is an option that let
you break the application upon error detection.

Here is the link: http://www.gremedy.com/


Ditto. gDebugger or GLIntercept will nail down an error like this in seconds.
   -Paul

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


Re: [osg-users] 2.8.5 RC2 and final call for testing

2011-06-01 Thread Paul Martz

On 6/1/2011 10:32 AM, Stephan Maximilian Huber wrote:

compiles fine for OS X, 32bit. Unfortunately I can't test the compiled
libs, as my projects requires 2.9.x


Thanks, Stephan.

On the subject of requiring OSG v2.9.x... Have you considered using osgWorks? 
I've been using it to insulate my clients' apps from changes in OSG, allowing 
the same app to use OSG v2.6.0 through v2.9.15. If there are OSG API changes in 
2.9.x that osgWorks doesn't provide a backwards-compatible path for, I'd be 
interested in knowing what it is so I can try to support it.

   -Paul

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


Re: [osg-users] OpenGL invalid operation error

2011-06-01 Thread Jean-Francois Gagnon

On 01/06/2011 2:04 PM, Paul Palumbo wrote:

Correct...  When I use the osgExample code with --vbo (and even without --vbo), 
I get no errors.  However, when I put this code into our code, I start getting 
these warnings.  I only care about the surface effects and we are shading the 
surface differently.  I don't understand why it works with 260 version of the 
driver but not 270 (on LINUX).

The issues seems to be in Geometry in MipmapGeometryVBO.cpp.  I don't see 
anything wrong with the code but I'm having trouble tracking down what is 
causing these OpenGL messages.

Paul P.

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





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


Hello,

Have you tried launching your application with gDebugger? I think it is 
quite apt and quick to find the source of those issues. There is an 
option that let you break the application upon error detection.


Here is the link: http://www.gremedy.com/


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


Re: [osg-users] OpenGL invalid operation error

2011-06-01 Thread Paul Palumbo
Correct...  When I use the osgExample code with --vbo (and even without --vbo), 
I get no errors.  However, when I put this code into our code, I start getting 
these warnings.  I only care about the surface effects and we are shading the 
surface differently.  I don't understand why it works with 260 version of the 
driver but not 270 (on LINUX).

The issues seems to be in Geometry in MipmapGeometryVBO.cpp.  I don't see 
anything wrong with the code but I'm having trouble tracking down what is 
causing these OpenGL messages.

Paul P.

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





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


Re: [osg-users] OpenGL invalid operation error

2011-06-01 Thread Kim Bale
Hi Paul,

I can try this tomorrow at work as I have a quadro there.

When you say you don't get the error using "pure osgOcean code" do you mean
the ocean example?

Regards,

Kim.


On 1 June 2011 17:04, Paul Palumbo  wrote:

> I'm getting the following warning:
> Warning: detected OpenGL error 'invalid operation' at end of
> Geometry::drawImplementation().
>
> How do I narrow down what the problem is?
>
> I have OSG_GL_ERROR_CHECKING set to ONCE_PER_ATTRIBUTE.
>
> I only started seeing this warning when I switch from 260.19.21 of the
> NVIDIA driver to 270.41.06 (I have an FX 5800).
>
> I get this message when I'm using OSG 2.9.9 and OSG 2.9.12.
>
> I'm running with a version of the osgOcean code and my ocean doesn't seem
> to be displayed when I get this error.  I get this with the VBO and non-VBO
> implementation. I also don't get this warning when I run the pure osgOcean
> code and I'm not having much success trying to isolate the problem. The
> problem seems to be associated with the ocean polygons.
>
> Any advice on how to debug this would be appreciated. I've been pulling my
> hair out for a week trying to figure this out. Anybody else having trouble
> with 270.41.06?
>
> Paul P.
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=40013#40013
>
>
>
>
>
> ___
> 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] Winding up to OpenSceneGraph-3.0 release

2011-06-01 Thread Chris 'Xenon' Hanson
  I wanted to mention that AlphaPixel's build system is currently mostly hooked 
up to
CDash and should report trunk/stable status for all three major platforms. I 
don't think
all the nightly results are up yet, since they start building late and night 
and go until
they're all done.

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com 
http://www.alphapixel.com/
  Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. 
Contracting.
"There is no Truth. There is only Perception. To Perceive is to Exist." - 
Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Winding up to OpenSceneGraph-3.0 release

2011-06-01 Thread Ryan Pavlik
On Thu, May 26, 2011 at 10:15 AM, Robert Osfield
wrote:

>   Ramping up the use of nightly builds will certainly help
> convergance so if you have machines available that might
>   be suitable please consider contributing to cdash.openscenegraph.org.
>
>
I've set up my local Jenkins server that is performing continuous
(SVN-monitoring) builds of trunk and the 2.8 branch to also submit build
reports. Right now, they're showing up as "Experimental" since Jenkins is
taking care of the svn update so the "Continuous" configuration doesn't
submit information. Nevertheless, in case of a build error, the re-build
performed by ctest will reveal the error.

The site name is ISU-VRAC-VanceGroup.

I noticed that you're using cdash 1.6.2 - a new release (1.8.2) is available
and probably a worthwhile upgrade, when you get the chance.

Ryan

-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 2.8.5 RC2 and final call for testing

2011-06-01 Thread Stephan Maximilian Huber
Hi Paul,

Am 01.06.11 03:16, schrieb Paul Martz:

> Thanks! Let me know how the testing goes!

compiles fine for OS X, 32bit. Unfortunately I can't test the compiled
libs, as my projects requires 2.9.x

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


Re: [osg-users] 2.8.5 RC2 and final call for testing

2011-06-01 Thread Ryan Pavlik
The latest 2.8 branch SVN code builds cleanly on Ubuntu 11.04 x64, with
everything I can enable enabled.

Ryan

On Wed, Jun 1, 2011 at 2:47 PM, Paul Martz  wrote:

> Thanks, Robert. The person who submitted the backport used new functions
> from FileNameUtils (rather than update that header), and clearly missed some
> of the necessary #includes.
>   -Paul
>
>
>
> On 6/1/2011 3:27 AM, Robert Osfield wrote:
>
>> Hi Paul,
>>
>> I have just done a build of 2.9.5-rc2 and get a build error:
>>
>>  46%] Building CXX object
>> src/osgPlugins/lwo/CMakeFiles/osgdb_lwo.dir/Unit.o
>>
>> /home/robert/temp/OpenSceneGraph-2.8.5-rc2/src/osgPlugins/3ds/WriterNodeVisitor.cpp:
>> In member function ‘std::string
>> plugin3ds::WriterNodeVisitor::getUniqueName(const std::string&, bool,
>> const std::string&, int)’:
>>
>> /home/robert/temp/OpenSceneGraph-2.8.5-rc2/src/osgPlugins/3ds/WriterNodeVisitor.cpp:759:19:
>> error: ‘UINT_MAX’ was not declared in this scope
>>
>> This can be fixed by adding an #include:
>>
>> Index: WriterNodeVisitor.cpp
>> ===
>> --- WriterNodeVisitor.cpp   (revision 12475)
>> +++ WriterNodeVisitor.cpp   (working copy)
>> @@ -28,6 +28,7 @@
>>  #include "WriterNodeVisitor.h"
>>  #include
>>  #include
>> +#include
>>
>>  void copyOsgMatrixToLib3dsMatrix(Lib3dsMatrix lib3ds_matrix, const
>> osg::Matrix&  osg_matrix)
>>  {
>>
>> Modified src/osgPlugions/3ds/WriteNodeVisitor.cpp file attached.
>>
>> I can check this change into the 2.8 branch if you wish.
>>
>> Robert.
>>
>>
>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
>
> --
>  -Paul Martz  Skew Matrix Software
>   http://www.skew-matrix.com/
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OpenGL invalid operation error

2011-06-01 Thread Paul Palumbo
I'm getting the following warning:
Warning: detected OpenGL error 'invalid operation' at end of 
Geometry::drawImplementation().

How do I narrow down what the problem is?

I have OSG_GL_ERROR_CHECKING set to ONCE_PER_ATTRIBUTE.

I only started seeing this warning when I switch from 260.19.21 of the NVIDIA 
driver to 270.41.06 (I have an FX 5800).

I get this message when I'm using OSG 2.9.9 and OSG 2.9.12.

I'm running with a version of the osgOcean code and my ocean doesn't seem to be 
displayed when I get this error.  I get this with the VBO and non-VBO 
implementation. I also don't get this warning when I run the pure osgOcean code 
and I'm not having much success trying to isolate the problem. The problem 
seems to be associated with the ocean polygons.

Any advice on how to debug this would be appreciated. I've been pulling my hair 
out for a week trying to figure this out. Anybody else having trouble with 
270.41.06?

Paul P.

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





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


Re: [osg-users] Meta-data in core OSG - project started

2011-06-01 Thread Robert Osfield
Hi All,

On Tue, May 31, 2011 at 5:01 PM, Robert Osfield
 wrote:
> Right now my main priority is working out how to provide the IO support

Yesterday afternoon and this morning I tried to get serializer support
working, and it now
works for osg::Object subclasss that provide their own serializer
wrappers, but I have
struggled to get things to work for the ValueObject templates and hit
what looks like a
bit of dead end.

So have had to back up a little and implement a ValueObject base class
that provides
two Vistor interface classes for getting and setting the values that
the ValueObject subclasses
provided.  I now have a TemplateValueObject that sublcasses from
ValueObject and make it
easy to provide the support various basic data types.

Attached is my modification to my include/osg/Object and the new
osguserdata.cpp example code.
In the example I've tested the new vistor interface to list all the
data values and types via:

class MyGetValueVisitor : public osg::ValueObject::GetValueVisitor
{
public:
virtual void apply(bool value) { OSG_NOTICE<<" bool "<
class GetNumeric : public osg::ValueObject::GetValueVisitor
{
public:

GetNumeric():
_set(false),
_value(0) {}

virtual void apply(bool value) { _value = value; _set = true; }
virtual void apply(char value) { _value = value; _set = true;  }
virtual void apply(unsigned char value) { _value = value; _set
= true;  }
virtual void apply(short value) { _value = value; _set = true;  }
virtual void apply(unsigned short value) { _value = value;
_set = true;  }
virtual void apply(int value) { _value = value; _set = true;  }
virtual void apply(unsigned int value) { _value = value; _set = true;  }
virtual void apply(float value) { _value = value; _set = true;  }
virtual void apply(double value) { _value = value; _set = true; }

bool_set;
T   _value;
};

template
T getNumeric(osg::Object* object)
{
osg::ValueObject* bvo = dynamic_cast(object);
if (bvo)
{
GetNumeric gn;
if (bvo->get(gn) && gn._set) return gn._value;
}
return T(0);
}

Which is invoked:

  std::cout<<"Numerical Value is
"<(node->getUserObject("myvalue"));

I'm not sure we should provide such a specific template function as
once you get started down this route one really has to wonder where to
draw the line.  Also how users might want to handle cases where the
UserObject doesn't exist or is an imcompatible type - this all is
rather opened and while we could code something complete enough to do
this it's just more code and more complexity to overload the OSG
headers with.  So I'm inclined to provide examples in the osguserdata
example and then leave it to end users to decide how they want to
manage things.

Robert.


Object
Description: Binary data
/* OpenSceneGraph example, osganalysis.
*
*  Permission is hereby granted, free of charge, to any person obtaining a copy
*  of this software and associated documentation files (the "Software"), to deal
*  in the Software without restriction, including without limitation the rights
*  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
*  copies of the Software, and to permit persons to whom the Software is
*  furnished to do so, subject to the following conditions:
*
*  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
*  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
*  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
*  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
*  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
*  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
*  THE SOFTWARE.
*/


#include 

#include 
#include 
#include 

class MyGetValueVisitor : public osg::ValueObject::GetValueVisitor
{
public:
virtual void apply(bool value) { OSG_NOTICE<<" bool "<
class GetNumeric : public osg::ValueObject::GetValueVisitor
{
public:

GetNumeric():
_set(false),
_value(0) {}

virtual void apply(bool value) { _value = value; _set = true; }
virtual void apply(char value) { _value = value; _set = true;  }
virtual void apply(unsigned char value) { _value = value; _set = true;  }
virtual void apply(short value) { _value = value; _set = true;  }
virtual void apply(unsigned short value) { _value = value; _set = true;  }
virtual void apply(int value) { _value = value; _set = true;  }
virtual void apply(unsigned int value) { _value = value; _set = true;  }
virtual void apply(float value) { _value = value; _set = true;  }
virtual void apply(double value) { _value = value; _set = true; }

bool_set;
T   _value;
};

template
T getNumeric(osg::Object* object)
{
osg::ValueObj

Re: [osg-users] 3d Models for free?

2011-06-01 Thread issam boughanmi
@ Ryan Pavlik :
fantastic !!


testing ...

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





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


Re: [osg-users] 3d Models for free?

2011-06-01 Thread Ryan Pavlik
I've also created a plugin for SketchUp that automates the process of
exporting to collada then converting to OSG-format.
https://github.com/rpavlik/sketchupToOSG

Ryan

On Wed, Jun 1, 2011 at 5:21 AM, Kim Bale  wrote:

> Hi Dimi,
>
> Sketchup allows you to export them as Collada files and then you can either
> read them with the DAE plugin or convert them using osgConv.
>
> Kim.
>
>
> On 1 June 2011 11:19, dimi christop  wrote:
>
>> Hi thanks for the tip,
>> how do you convert the sketchup files into osg?
>>
>> Dimi
>>
>>
>>
>> - Original Message 
>> From: J.P. Delport 
>> To: osg-users@lists.openscenegraph.org
>> Sent: Wed, June 1, 2011 12:52:17 PM
>> Subject: Re: [osg-users] 3d Models for free?
>>
>> Hi,
>>
>> I normally start here:
>>
>> http://sketchup.google.com/3dwarehouse/search?q=wind+turbine&styp=m&btnG=Search
>>
>> It's weird how if one types "free " into search engines the
>> results are close to useless :(
>>
>> jp
>>
>> On 01/06/11 11:19, Torben Dannhauer wrote:
>> > Hi,
>> >
>> > does anyone know sites where I can get free 3d models?
>> > I'm searching models of wind turbine (land based and/or offs shore) to
>> place
>> >them in my landscape (based on OpenStreetmap data).
>> >
>> > Thank you!
>> >
>> > Cheers,
>> > Torben
>> >
>> > --
>> > Read this topic online here:
>> > http://forum.openscenegraph.org/viewtopic.php?p=39991#39991
>> >
>> >
>> >
>> >
>> >
>> > ___
>> > osg-users mailing list
>> > osg-users@lists.openscenegraph.org
>> >
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>> --
>> This message is subject to the CSIR's copyright terms and conditions,
>> e-mail
>> legal notice, and implemented Open Document Format (ODF) standard.
>>
>> The full disclaimer details can be found at
>> http://www.csir.co.za/disclaimer.html.
>>
>> This message has been scanned for viruses and dangerous content by
>> MailScanner,
>> and is believed to be clean.
>>
>> ___
>> 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
>
>


-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 2.8.5 RC2 and final call for testing

2011-06-01 Thread Paul Martz
Thanks, Robert. The person who submitted the backport used new functions from 
FileNameUtils (rather than update that header), and clearly missed some of the 
necessary #includes.

   -Paul


On 6/1/2011 3:27 AM, Robert Osfield wrote:

Hi Paul,

I have just done a build of 2.9.5-rc2 and get a build error:

  46%] Building CXX object src/osgPlugins/lwo/CMakeFiles/osgdb_lwo.dir/Unit.o
/home/robert/temp/OpenSceneGraph-2.8.5-rc2/src/osgPlugins/3ds/WriterNodeVisitor.cpp:
In member function ‘std::string
plugin3ds::WriterNodeVisitor::getUniqueName(const std::string&, bool,
const std::string&, int)’:
/home/robert/temp/OpenSceneGraph-2.8.5-rc2/src/osgPlugins/3ds/WriterNodeVisitor.cpp:759:19:
error: ‘UINT_MAX’ was not declared in this scope

This can be fixed by adding an #include:

Index: WriterNodeVisitor.cpp
===
--- WriterNodeVisitor.cpp   (revision 12475)
+++ WriterNodeVisitor.cpp   (working copy)
@@ -28,6 +28,7 @@
  #include "WriterNodeVisitor.h"
  #include
  #include
+#include

  void copyOsgMatrixToLib3dsMatrix(Lib3dsMatrix lib3ds_matrix, const
osg::Matrix&  osg_matrix)
  {

Modified src/osgPlugions/3ds/WriteNodeVisitor.cpp file attached.

I can check this change into the 2.8 branch if you wish.

Robert.



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



--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Meta-data in core OSG - project started

2011-06-01 Thread Robert Osfield
Hi Sukender,

On Wed, Jun 1, 2011 at 2:00 PM, Sukender  wrote:
> Well I've read your posts and I must admit I'm a bit disapointed because 
> proposed changes seem rather radical to me, and implies some features will be 
> dropped/reduced...

I'm striving to find a good balance between extensibility and
flexibiity and complexity of the implementation and interface.  It's
very easy to get carried away at try to solve too many problems in one
place and end up with a system that might server the needs of small
number of power users but be too complicated for the majority of users
to use easily for their needs.   We also have to maintain and document
and support the API's we come up with, the more complex they are the
greater the burden.

>> For the existing UserData and DescriptionList I'm currently inclined
>> to hardwire this into ValueContainer as getUserData() and
>> getDescitionList().  This is a bit clunky but it'll be less
>> complicated trying to adapt both of these into osg::Object.
>
> I did not understand why you hardwired userData and descriptionList instead 
> of letting them be metadata as any other. I don't think this is less 
> complicated. On the contrary, I feel we must "factorize" code as much as 
> possible. And this seems akward to me because this forces to have more lines 
> of code, and thus have more things to debug. I feel more confortable with 
> less methods and less lines of code, don't you?

My reason to provide the UserData and Descriptions list hardwired is
three fold - backwards compatibility is much easier when the data
strucutres are mapped 1:1, compatibility with older files is much to
achieve when the same granulatiry is kept, and finally I I found the
solution that you came up with a real cludge - it wasn't easy to read
and follow what was going on, it is was possible to break it due to
the hardwiring of the names not being protected.

> BTW, moving descriptionList availability from Node to Object seems not a good 
> idea as we're trying to make them disapear. However this may centralize 
> metadata to one place, so why not, as long as deprecation is clear and 
> explicit...? This is subject to discussion!

It's all just access methods, the Descrptions list will be available
via osg::Object no matter what solution we go for, it's just whether
we have public accessors for it that make it convinient to use.
Originally I had felt that we should probably not be encouraging use
of UserData and the Descriptions list, but now I'm not sure they do
any harm, and if this functionality is exactly what you wanted in the
first place then any other access to it other than through the current
conience methods will be more awkward to use.   I now feel there is
little harm in keeping this methods available and making placing them
in osg::Object, there is no memory overhed, it's more consistent.


>> The idea of having a ValueBase class which only provides the
>> Referenced class and a local clone() seems rather too minimal. Object
>> has clone functionality built into it and hooks into the OSG's
>> serializers
>
> I'm quite in favor of using osg::Object as a base for metadata, especially 
> for serialization.
>
> But the fact it already stores a name is problemetic when you want your data 
> to be indexed by name, or if you wish your data be put in a database backend. 
> For instance, using a map would require names duplicaion (one in the map, one 
> in osg::Object), or a strange map 
> thing.
>
> Any opinion/idea on this? Mine is that an osg::Object without name would be 
> ideal, but this would bring another class! Unless we move the name as a 
> metadata too? Well this could be a nice idea: some meta names would be 
> reserved, and especially one for the name, one for userData, and one for 
> descriptionList. Thoughts?

I don't think using a map or equivilant backend is sensible due to the
duplication and potential for maps and containers getting out of sync.
 osg::Object has a Name field, we can't just remove this because it
doesn't fit nicely with using a std::map<> in a nieche feature like
User data values, we can't just go breaking compatibility for small
stuff like this.   Given we have to keep the Object Name field it
makes sense to use it in the context of user data.


>> I also wonder if perhaps ValueContainer and ValueContainerMap might
>> just become oen class ValueMap
>
> I'm not in favor of this. Grégoire and I explicitely made two classes to let 
> the user choose the container. Especially we wanted to let database backend 
> (a requirement of some OSG users) be easy to plug.
> As Peter told, I guess the "ability to subclass a custom UserDataContainer 
> implementation" is important.
> However I uderstand your point of view on sharing containers, especially 
> regarding to serialization. So what about something not sharable, but which 
> user can subclass?


I am yet to be convienced providing the ability to subclass from the
UserDataContainer is worthwhile.  Subclassing fro

Re: [osg-users] osgEarth in OpenSceneGraph

2011-06-01 Thread Chris 'Xenon' Hanson
On 6/1/2011 12:17 AM, Sivaram Konanki wrote:
> osgViewer flawlessly worked with .osg files. But, it could view .earth models.
> It says there's a plugin named osg71-osg.dll. But I've osg55-osg.dll. I am 
> using osg 2.8.4. I have checked for the missing dlls in the osg 2.9 version, 
> but couldn't find one.

  Did you compile osgEarth yourself? It sounds like osgEarth is looking for an 
OSG 2.9.x
release and your OSG is 2.8.4.

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com 
http://www.alphapixel.com/
  Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. 
Contracting.
"There is no Truth. There is only Perception. To Perceive is to Exist." - 
Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Meta-data in core OSG - project started

2011-06-01 Thread Sukender
Hi Robert, hi all,

Sorry for being silent these days... I just got back on the OSG development.

Well I've read your posts and I must admit I'm a bit disapointed because 
proposed changes seem rather radical to me, and implies some features will be 
dropped/reduced...

> The backwards compatibility support for UserData looks like it'll
> introduce a memory leak

Ok. You're right. Sorry!


> For the existing UserData and DescriptionList I'm currently inclined
> to hardwire this into ValueContainer as getUserData() and
> getDescitionList().  This is a bit clunky but it'll be less
> complicated trying to adapt both of these into osg::Object.

I did not understand why you hardwired userData and descriptionList instead of 
letting them be metadata as any other. I don't think this is less complicated. 
On the contrary, I feel we must "factorize" code as much as possible. And this 
seems akward to me because this forces to have more lines of code, and thus 
have more things to debug. I feel more confortable with less methods and less 
lines of code, don't you?

BTW, moving descriptionList availability from Node to Object seems not a good 
idea as we're trying to make them disapear. However this may centralize 
metadata to one place, so why not, as long as deprecation is clear and 
explicit...? This is subject to discussion!


> The idea of having a ValueBase class which only provides the
> Referenced class and a local clone() seems rather too minimal. Object
> has clone functionality built into it and hooks into the OSG's
> serializers

I'm quite in favor of using osg::Object as a base for metadata, especially for 
serialization.

But the fact it already stores a name is problemetic when you want your data to 
be indexed by name, or if you wish your data be put in a database backend. For 
instance, using a map would require names duplicaion (one in the map, one in 
osg::Object), or a strange map thing.

Any opinion/idea on this? Mine is that an osg::Object without name would be 
ideal, but this would bring another class! Unless we move the name as a 
metadata too? Well this could be a nice idea: some meta names would be 
reserved, and especially one for the name, one for userData, and one for 
descriptionList. Thoughts?


> I also wonder if perhaps ValueContainer and ValueContainerMap might
> just become oen class ValueMap 

I'm not in favor of this. Grégoire and I explicitely made two classes to let 
the user choose the container. Especially we wanted to let database backend (a 
requirement of some OSG users) be easy to plug.
As Peter told, I guess the "ability to subclass a custom UserDataContainer 
implementation" is important.
However I uderstand your point of view on sharing containers, especially 
regarding to serialization. So what about something not sharable, but which 
user can subclass?


> Another route for adding extra flexiblity would be to just subclass
> your own user data scheme from osg::Object and assign it as UserData
> or as UserObject

The proposal of putting a user-defined container as a metadata may solve the 
problem but seems also a bit a burden for the user.


> The container used within ValueContainer could be an
> std::vector> to allow indexing via a
> conventional array style access

The proposal of a vector > seems okay for a default 
implementation (instead of a map). You're right about trying "to keep the class 
count down" (and my implementation is certainely not optimal), but I keep 
thinking the container should be customizable and I would keep the 
ValueContainer class.

As a conclusion, I can say this subject is not closed yet! ;-)

Cheers,

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/

- "Robert Osfield"  a écrit :

> Hi Peter,
> 
> I'm open to suggestions on making the implementation more flexible,
> however, any extra complexity has to be strongly justified - i.e.
> with
> concrete usage case, so could you flesh out what you'd want to do
> with
> the subclassing from UserDataContainer.
> 
> Another route for adding extra flexiblity would be to just subclass
> your own user data scheme from osg::Object and assign it as UserData
> or as UserObject, then do a dynamic cast to get access to your custom
> implementation.   Currenly you can share UserData and UserObjects
> between their owner osg::Object.
> 
> As for sharing whole UserDataContainer objects between their owner
> osg::Objects, this is something I considered and implemented
> initially
> but then decided to make things simpler and just have an internal
> data
> container subclassed from osg::Referenced.  Adding the capability of
> sharing UserDataContainer won't be difficult, but will require us to
> push the declaration of the UserDataContainer into the public scope
> something that will constain how flexibile we can be with the
> implementation and it's interface, and would require us to implement
> UserDataContainer as an osg::Object rather than Referenced so we
> cou

Re: [osg-users] 3d Models for free?

2011-06-01 Thread issam boughanmi
http://creativefan.com/top-30-sites-to-download-free-3d-models/
http://www.hongkiat.com/blog/60-excellent-free-3d-model-websites/

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





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


Re: [osg-users] 3d Models for free?

2011-06-01 Thread Torben Dannhauer
Hi,

thanks for the hint, Googles 3D library seems good for the beginning.
I assume I have to modify materials etc because it looks strange sometimes

Another source for 3D objects is flightgear and it's scenery collenction.


Thank you!

Cheers,
Torben

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





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


[osg-users] Re: 3d Models for free?

2011-06-01 Thread Tony Vasile
There are some maybe free models associated with the FlightGear project.
There seems to be a repository of background models at
http://scenemodels.flightgear.org . Most of the models appear to be airport
related but there are some other geographic objects, so you may be lucky and
find something of use.

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


Re: [osg-users] 3d Models for free?

2011-06-01 Thread issam boughanmi
for converting from sketchup :

1 -  export using the trial version of sketchup (8 hours) , from my experience 
the obj exporter do the best job


2 - buy sketchup and enjoy exporting for the rest of your life

3 -  convert to dae or kmz and then export to osg either directely via osgconv
or by using blender as an intermediare


hope it help

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





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


Re: [osg-users] 3d Models for free?

2011-06-01 Thread Maxim Gammer
http://cde.tsogu.ru/3D_upravlenie/
http://cde.tsogu.ru/lybrery/
http://cde.tsogu.ru/3d_equipment/

2011/6/1 Kim Bale :
> Hi Dimi,
> Sketchup allows you to export them as Collada files and then you can either
> read them with the DAE plugin or convert them using osgConv.
> Kim.
>
> On 1 June 2011 11:19, dimi christop  wrote:
>>
>> Hi thanks for the tip,
>> how do you convert the sketchup files into osg?
>>
>> Dimi
>>
>>
>>
>> - Original Message 
>> From: J.P. Delport 
>> To: osg-users@lists.openscenegraph.org
>> Sent: Wed, June 1, 2011 12:52:17 PM
>> Subject: Re: [osg-users] 3d Models for free?
>>
>> Hi,
>>
>> I normally start here:
>>
>> http://sketchup.google.com/3dwarehouse/search?q=wind+turbine&styp=m&btnG=Search
>>
>> It's weird how if one types "free " into search engines the
>> results are close to useless :(
>>
>> jp
>>
>> On 01/06/11 11:19, Torben Dannhauer wrote:
>> > Hi,
>> >
>> > does anyone know sites where I can get free 3d models?
>> > I'm searching models of wind turbine (land based and/or offs shore) to
>> > place
>> >them in my landscape (based on OpenStreetmap data).
>> >
>> > Thank you!
>> >
>> > Cheers,
>> > Torben
>> >
>> > --
>> > Read this topic online here:
>> > http://forum.openscenegraph.org/viewtopic.php?p=39991#39991
>> >
>> >
>> >
>> >
>> >
>> > ___
>> > osg-users mailing list
>> > osg-users@lists.openscenegraph.org
>> >
>> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>> --
>> This message is subject to the CSIR's copyright terms and conditions,
>> e-mail
>> legal notice, and implemented Open Document Format (ODF) standard.
>>
>> The full disclaimer details can be found at
>> http://www.csir.co.za/disclaimer.html.
>>
>> This message has been scanned for viruses and dangerous content by
>> MailScanner,
>> and is believed to be clean.
>>
>> ___
>> 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
>
>



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


Re: [osg-users] "OSGReaderWriter wrappers failed to load" loading osg files

2011-06-01 Thread Robert Osfield
On Wed, Jun 1, 2011 at 10:46 AM, Aitor Ardanza  wrote:
> I'm using osg 2.9.11.71 and I builded myseft. I work on windows xp machine 
> and I don't remember the build options... I did it with cmake.
> But it didn't give me any error in this process and generate good dlls.
>
> I have that error every time I try to load a osg file.

What happens when you do something like:

 osgviewer cow.osg

Please post all the output.

Make sure that the directory that contains your osgPlugins-version in your path.

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


Re: [osg-users] 3d Models for free?

2011-06-01 Thread Kim Bale
Hi Dimi,

Sketchup allows you to export them as Collada files and then you can either
read them with the DAE plugin or convert them using osgConv.

Kim.

On 1 June 2011 11:19, dimi christop  wrote:

> Hi thanks for the tip,
> how do you convert the sketchup files into osg?
>
> Dimi
>
>
>
> - Original Message 
> From: J.P. Delport 
> To: osg-users@lists.openscenegraph.org
> Sent: Wed, June 1, 2011 12:52:17 PM
> Subject: Re: [osg-users] 3d Models for free?
>
> Hi,
>
> I normally start here:
>
> http://sketchup.google.com/3dwarehouse/search?q=wind+turbine&styp=m&btnG=Search
>
> It's weird how if one types "free " into search engines the
> results are close to useless :(
>
> jp
>
> On 01/06/11 11:19, Torben Dannhauer wrote:
> > Hi,
> >
> > does anyone know sites where I can get free 3d models?
> > I'm searching models of wind turbine (land based and/or offs shore) to
> place
> >them in my landscape (based on OpenStreetmap data).
> >
> > Thank you!
> >
> > Cheers,
> > Torben
> >
> > --
> > Read this topic online here:
> > http://forum.openscenegraph.org/viewtopic.php?p=39991#39991
> >
> >
> >
> >
> >
> > ___
> > osg-users mailing list
> > osg-users@lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
> --
> This message is subject to the CSIR's copyright terms and conditions,
> e-mail
> legal notice, and implemented Open Document Format (ODF) standard.
>
> The full disclaimer details can be found at
> http://www.csir.co.za/disclaimer.html.
>
> This message has been scanned for viruses and dangerous content by
> MailScanner,
> and is believed to be clean.
>
> ___
> 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] 3d Models for free?

2011-06-01 Thread dimi christop
Hi thanks for the tip,
how do you convert the sketchup files into osg?

Dimi



- Original Message 
From: J.P. Delport 
To: osg-users@lists.openscenegraph.org
Sent: Wed, June 1, 2011 12:52:17 PM
Subject: Re: [osg-users] 3d Models for free?

Hi,

I normally start here:
http://sketchup.google.com/3dwarehouse/search?q=wind+turbine&styp=m&btnG=Search

It's weird how if one types "free " into search engines the 
results are close to useless :(

jp

On 01/06/11 11:19, Torben Dannhauer wrote:
> Hi,
>
> does anyone know sites where I can get free 3d models?
> I'm searching models of wind turbine (land based and/or offs shore) to place 
>them in my landscape (based on OpenStreetmap data).
>
> Thank you!
>
> Cheers,
> Torben
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=39991#39991
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail 
legal notice, and implemented Open Document Format (ODF) standard. 

The full disclaimer details can be found at 
http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.

___
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] 3d Models for free?

2011-06-01 Thread J.P. Delport

Hi,

I normally start here:
http://sketchup.google.com/3dwarehouse/search?q=wind+turbine&styp=m&btnG=Search

It's weird how if one types "free " into search engines the 
results are close to useless :(


jp

On 01/06/11 11:19, Torben Dannhauer wrote:

Hi,

does anyone know sites where I can get free 3d models?
I'm searching models of wind turbine (land based and/or offs shore) to place 
them in my landscape (based on OpenStreetmap data).

Thank you!

Cheers,
Torben

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





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


--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.


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


Re: [osg-users] "OSGReaderWriter wrappers failed to load" loading osg files

2011-06-01 Thread Aitor Ardanza
I'm using osg 2.9.11.71 and I builded myseft. I work on windows xp machine and 
I don't remember the build options... I did it with cmake.
But it didn't give me any error in this process and generate good dlls.

I have that error every time I try to load a osg file.

Cheers,
Aitor

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





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


[osg-users] 3d Models for free?

2011-06-01 Thread Torben Dannhauer
Hi,

does anyone know sites where I can get free 3d models?
I'm searching models of wind turbine (land based and/or offs shore) to place 
them in my landscape (based on OpenStreetmap data).

Thank you!

Cheers,
Torben

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





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


Re: [osg-users] "OSGReaderWriter wrappers failed to load" loading osg files

2011-06-01 Thread Robert Osfield
Hi Aitor,

On Wed, Jun 1, 2011 at 9:42 AM, Aitor Ardanza  wrote:
> I have tried to find information about this error, but I haven't found 
> anything.
> I can't load osg format files any help?!

This is rather too little information to go on for us to be able to help.

What OS, compilers, version of the OSG are you using?  Did you build
the OSG yourself? What build options did you use?

How easily can you reproduce the error?  Could you post the exact
application invocation options and output.

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


Re: [osg-users] Meta-data in core OSG - project started

2011-06-01 Thread Robert Osfield
Hi Peter,

I'm open to suggestions on making the implementation more flexible,
however, any extra complexity has to be strongly justified - i.e. with
concrete usage case, so could you flesh out what you'd want to do with
the subclassing from UserDataContainer.

Another route for adding extra flexiblity would be to just subclass
your own user data scheme from osg::Object and assign it as UserData
or as UserObject, then do a dynamic cast to get access to your custom
implementation.   Currenly you can share UserData and UserObjects
between their owner osg::Object.

As for sharing whole UserDataContainer objects between their owner
osg::Objects, this is something I considered and implemented initially
but then decided to make things simpler and just have an internal data
container subclassed from osg::Referenced.  Adding the capability of
sharing UserDataContainer won't be difficult, but will require us to
push the declaration of the UserDataContainer into the public scope
something that will constain how flexibile we can be with the
implementation and it's interface, and would require us to implement
UserDataContainer as an osg::Object rather than Referenced so we could
get the cloning support that osg::Object provides.

A subclassable UserDataContainer would also push us towards
subclassing from osg::Object, which isn't difficult, but it does open
the doors users nesting UserDataContainer within a UserDataContainer,
now this could be seen as an advantage or just extra complexity.
Initially I implemented UserDataContainer as a subclass from
osg::Object but then pulled back as the public interface for access to
the
internal UserDataContainer conflicted with the UserDataContainer's own
access functions - I had to make the osg::Object methods virtual and
override then in UserDataContainer and it ended up being rather messy.

The other issue that a subclassable UserDataContainer brings is that
what happens during serialization - when we writing out we could use
the standard UserDataContainer access methods, but when reading back
in you'd want to construct explitly the custom UserDataContainer for
each node than needs it.  You can probably solve this by serializng
the UserDataContainer itself, and have a custom wrapper to implement
the CustomUserDataContainer so that the serializer creates everything
appropriately.  This is fine but it leaves the question of how to map
the old UserData and Description list in a backwards compatible way.

For now I am going to get the serializers working for
.osgb/.osgt,/osgx as they are and if that all works I'll check my work
in so that others can test the build and runtime side.  Once we have
the simplicist implementation working fine we'll be able to a base for
concrete proposals for adding even greater flexibility, but be
prepared to fight your corner if the extra flexibility comes with
extra complexity ;-)

Robert.

On Tue, May 31, 2011 at 5:36 PM, Peter Amstutz
 wrote:
> Hi Robert,
>
> This looks pretty straightforward and I agree that less complexity is
> good.  However a would modify it slightly to support two related
> features I have been lobbying for, which are the ability to share
> UserDataContainers between osg::Objects, and the ability to subclass a
> custom UserDataContainer implementation.
>
> The idea is that there is generally not a 1:1 correlation between the
> application entity model and the scene graph.  Because of this, one
> often wants to be able to share or inherit metadata information, or look
> up metadata on the fly to avoid copying large amounts of application
> data into the scene graph.
>
> I think it feasible to add one level of indirection without adding too
> much complexity.  For example:
>
> - Make osg::UserDataContainer a pure abstract class.
>
>        class OSG_EXPORT UserDataContainer : public osg::Referenced
>        {
>            public:
>        void addUserObject(Object* owner, Object* obj) = 0;
>        void setUserObject(Object* owner, unsigned int i, Object* obj) = 0;
>        void removeUserObject(Object* owner, unsigned int i);
>
>        unsigned int getUserObjectIndex(Object* owner, const osg::Object* obj) 
> const = 0;
>        unsigned int getUserObjectIndex(Object* owner, const std::string& 
> name) const = 0;
>
>        Object* getUserObject(Object* owner, unsigned int i) = 0;
>        const Object* getUserObject(Object* owner, unsigned int i) const = 0;
>
>        Object* getUserObject(Object* owner, const std::string& name) = 0;
>        const Object* getUserObject(Object* owner, const std::string& name) 
> const = 0;
>
>        unsigned int getNumUserObjects(Object* owner) const = 0;
>
>        };
>
> - Provide a default implementation which doesn't do anything with the "owner" 
> field
>        class OSG_EXPORT DefaultUserDataContainer : public UserDataContainer
>        {
>                ref_ptr     _userData;
> b               DescriptionList         _descriptionList;
>                ObjectList              _objectL

[osg-users] "OSGReaderWriter wrappers failed to load" loading osg files

2011-06-01 Thread Aitor Ardanza
Hi,

I have tried to find information about this error, but I haven't found anything.
I can't load osg format files any help?!

Thank you!

Cheers,
Aitor

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





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


Re: [osg-users] osgEarth in OpenSceneGraph

2011-06-01 Thread Robert Osfield
HI Sivaram,

On Wed, Jun 1, 2011 at 7:17 AM, Sivaram Konanki
 wrote:
> osgViewer flawlessly worked with .osg files. But, it could view .earth models.
> It says there's a plugin named osg71-osg.dll. But I've osg55-osg.dll. I am 
> using osg 2.8.4. I have checked for the missing dlls in the osg 2.9 version, 
> but couldn't find one.

Could it be that you are using 3rd party builds of the OSG and
osgEarth both of which target different versions of the OSG?  If the
osgviewer is working fine then it suggests it was built against the
same version as osgEarth.

The only other possibility is as Glenn suggests - it's a path issue,
none of us are party to where what versions of the software your've
built and installed and where you've installed them and what paths
you've set up to find them, so we can only point you in likely
directions.  You will have to step through and find the problem
yourself.   Setting the osg::NotifyLevel to DEBUG might help you track
this down as it'll output the debug output to the console.  You can
set this via the env var OSG_NOTIFY_LEVEL.  As part of the output
you'll see the paths and the plugins that the OSG is attempting to
read.

> It's very important as we're developing a good application.

It's safe to assume that all OSG users are developing important and
good applcations, so there isn't any need to try some how make your
requirest more important.  It's best to just stick the facts of the
problem inhand and not trying fluff things up, as I'm sure I'm not the
only one who find such fluff an useless distaction.

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


Re: [osg-users] glGenBuffers + OSG - returns 0 for all buffer IDs

2011-06-01 Thread J.P. Delport

Hi,

On 31/05/11 23:52, Kris Dale wrote:

Greetings all,

I've been learning PBOs here lately, and I can't seem to find any
tutorials about how to use OSG::PixelBufferObjects.  If anyone can
point me in the direction of one, that would be awesome, as I
wouldn't have to mix OGL and OSG code quite as much as I'm doing
now.

Right now what I'm doing is trying to copy back the frame buffer to a
PBO each frame, but I can't get glGenBuffers to return a valid buffer
ID.  I've tried passing in a single int or an array, but all I get
back are 0's.  (In a strict GLUT/GL project, I get 1,2,3..)

I've made sure (as much as I can) that I have a context..  I've
created a graphicscontext, a window exists, I've called
viewer.realize(), even tried one viewer.frame() before glGenBuffers.
All I can get back are 0's.  So naturally when I try to bindbuffer /
readpixels / mapbuffer, I just get back a null pointer because my
bufferID is zero.

Can anyone suggest a reason this might be happening?  (Even if you
can point me to a good OSG tutorial on using OSG::PixelBufferObjects,
I'd still be curious to know.)

Thanks in advance for any guidance anyone can offer..


you'll probably have to stick your code into a camera callback to make 
sure you have a valid context.


See the osgscreencapture example for some use of PBO. I also paste some 
small example below that shows some methods for reading back texture data.


HTH
jp

--8<--

struct GPURegionOfInterestCallback : public osg::Camera::DrawCallback
{
GPURegionOfInterestCallback(ImageFormat& imf,
osg::Image *osg_im,
osg::TextureRectangle *tex) :
ImageFormat_(imf),
osg_im_(osg_im),
trect_(tex)
{
pdbo_ = new osg::PixelDataBufferObject();
pdbo_->setDataSize(ImageFormat_.getBytesPerImage());
}
virtual void operator() (osg::RenderInfo& renderInfo) const
{
// first get the texture into the pbo
pdbo_->bindBufferInWriteMode(*renderInfo.getState());
renderInfo.getState()->applyTextureAttribute(0, //unit
 trect_);
glGetTexImage(trect_->getTextureTarget(),
  0, //level
  GL_LUMINANCE,
  GL_UNSIGNED_BYTE,
  NULL);

// now copy to cpu
osg::GLBufferObject::Extensions* ext = 
osg::GLBufferObject::getExtensions(renderInfo.getState()->getContextID(), true);
GLubyte* src = 
(GLubyte*)ext->glMapBuffer(GL_PIXEL_PACK_BUFFER_ARB,


GL_READ_ONLY_ARB);
if(src)
{
memcpy(osg_im_->data(), src, 
osg_im_->getTotalSizeInBytes());

ext->glUnmapBuffer(GL_PIXEL_PACK_BUFFER_ARB);
}

pdbo_->unbindBuffer(renderInfo.getState()->getContextID());

/*
// direct to image from texture
renderInfo.getState()->applyTextureAttribute(0, //unit
 trect_);
glGetTexImage(trect_->getTextureTarget(),
  0, //level
  GL_LUMINANCE,
  GL_UNSIGNED_BYTE,
  osg_im_->data());
*/
}

ImageFormat ImageFormat_;
osg::Image* osg_im_;
osg::TextureRectangle* trect_;
osg::ref_ptr pdbo_;

};



Kris

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





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



--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.


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