[osg-users] OT: Qt binary builds on 32 & 64 bit Linux, OSX, Windows MSVC++ 2008/2010 available for download

2012-12-12 Thread Chris Hanson
  Since we make OSG binaries, we thought we'd make some Qt binaries
available for download too:

http://alphapixel.com/content/download-qt-binaries-free


-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio •
LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
@alphapixel  facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Skinning with osg / osgAnimation

2012-12-12 Thread Sergey Polischuk
Hi

fbx plugin support skinning animation.

Cheers.

12.12.2012, 21:05, "Janna Terde" :
> Hi,
>
> I am looking into doing hardware skinning (such as animating some cables for 
> a example). I will provide transformation matrices for bones.
>
> So far I've found that osgAnimation provides support for hardware skinning. 
> However I am not sure what file formats are supported for gathering influence 
> data? So far only saw support for collada. However I have not tested if it is 
> working and how easy to set it up yet.
> Does any other plugin supports importing of influence data into osg 
> animation? And what is typically used to create skinning mesh/bones to work 
> with osgAnimation?
>
> Thank you!
> Janna
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=51545#51545
>
> ___
> 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] Visibility of lines

2012-12-12 Thread Robert Osfield
Hi Jen,

I haven't personally used the OcclusionQueryNode for work myself, perhaps
Paul Martz the author of this feature might be able to chip in.

Robert.

On 12 December 2012 12:39, Jen Hunter  wrote:

> Hi Robert,
>
> thank you for your reply. I appreciate your help :)
>
> I'm sorry if I didn't express myself correctly. I also have to admit I'm
> not quite the expert on computer graphics.
>
> Let's try to make it clearer. I want to know which of the lines on my
> model are visible in a rendered image. That would be the case if a line
> results in at least one drawn pixel.
>
> I need to have this information for an AR application which performs edge
> tracking. Such approaches work with 2D-3D correspondences for each frame to
> estimate the camera parameters.
> The recorded webcam image of an object shows of course only the edges of
> the object which are visible from the cameras point of view. To get the
> correspondences I need excactly the same lines on the model (from the last
> frame).
>
> I programmed a working OPENGL example for finding out the visible lines
> using occlusion query glGetOcclusionQueryuivNV.
>
> At the moment I fail to understand how to make that work for OSG. I had a
> look at osgocclusionquery and the used OcclusionQueryNode and understand
> that it uses ARB_occlusion_query to check the pixel count.
>
> I tried the following but the output of the visible lines is still
> incorrect:
>
>
> Code:
>
> osg::Node* scene = osgDB::readNodeFile("file.dae");
> if (!scene) return 1;
>
> osg::Group* rootnode = new osg::Group;
> rootnode->addChild(scene);
> viewer.setSceneData(rootnode);
>
> GetLinesVisitor lineFinder;
> scene->accept(lineFinder);
> lines = lineFinder.getLineVector();
>
> for(int i = 0; i < lines.size(); i++){
>
> osg::ref_ptr parent = new
> osg::OcclusionQueryNode;
> parent->setVisibilityThreshold( 0 );
>
> osg::Geometry* linesGeom = new osg::Geometry();
> osg::Vec3Array* vertices = new osg::Vec3Array;
> vertices->push_back(lines.at(i).start);
> vertices->push_back(lines.at(i).end);
> linesGeom->setVertexArray(vertices);
> linesGeom->addPrimitiveSet(new
> osg::DrawArrays(osg::PrimitiveSet::LINES,0,2));
>
> osg::Geode* geode = new osg::Geode();
> geode->addDrawable(linesGeom);
> parent->addChild(geode);
>
>
> //A std::vector for all OcclusionQueryNodes. I later ask in a loop
> for each element oqNodes.at(i).get()->getPassed() and count the trues
> oqNodes.push_back(parent);
> rootnode->addChild(parent);
> }
>
>
>
>
>
>
> So here are my questions:
>
> (1) How do I set up an OcclusionQueryNode for each line?
>
> (2) Why does the approach from my previous post not work? Is the
> calculation of screen coordinates (using MVPW matrix) for a given vertex
> really so imprecise that I cannot count on this being the correct
> coordinates to look up in the depth buffer?
>
>
> Cheers,
> Dakota
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=51538#51538
>
>
>
>
>
> ___
> 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] Skinning with osg / osgAnimation

2012-12-12 Thread Janna Terde
Hi,

I am looking into doing hardware skinning (such as animating some cables for a 
example). I will provide transformation matrices for bones.

So far I've found that osgAnimation provides support for hardware skinning. 
However I am not sure what file formats are supported for gathering influence 
data? So far only saw support for collada. However I have not tested if it is 
working and how easy to set it up yet.
Does any other plugin supports importing of influence data into osg animation? 
And what is typically used to create skinning mesh/bones to work with 
osgAnimation?

Thank you!
Janna

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





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


[osg-users] Depthmap from light's point of view

2012-12-12 Thread Peterakos
Hello.

Lets say there is cessna as a child in LightSource group.
LightSource has 1 light.

What i want to do is to get the depth map from light's point of view.
How can i do this ?

I am thinking of placing a Camera as a child in LightSource.
This camera will look at exactly the same direction as the light and
will also has the same position.
Is this the right way to do it ?

( I know how to make camera render to texture)

Thank you for your time.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgearth terrain problem

2012-12-12 Thread jamie robertson
I'm not very familiar with osgearth terrains but I'm pretty sure the quad tree 
is made up of something like osg::PagedLOD nodes, each with a TerrainTile and a 
group of similar child osg::PagedLOD nodes. As each osg::PagedLOD is loaded, 
the range is evaulated to decide whether to load the next LOD (child). 

I found the following post very helpful when trying to understand the structure 
of virtualPlanetBuilter terrains 
http://forum.openscenegraph.org/viewtopic.php?t=4255 It's a really good way of 
making quadtrees using OSG which gives very good perfomance on very large 
datasets

Jamie

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





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


[osg-users] Texture compilation using PixelBufferObject

2012-12-12 Thread Lionel Lagarde

Hi,

Let's imagine this scenario:

   The database pager loads the file "x.osgb".
   This file contains 3 geometries (A, B, C). A has a texture that uses
   A.jpg, B uses B.jpg and C uses C.jpg. These textures are not used by
   the already rendered geometry (i.e. not compiled)
   The FindCompileableGLObjectsVisitor is configured to set a pixel
   buffer object on the texture's image. An unique buffer object
   (shared by the 3 images) is created.
   The buffer object is configured to release it's GL buffer once the
   texture is applied (setCopyDataAndReleaseGLBufferObject(true)).
   After the draw dispatch, the IncrementalCompileOperation compiles
   the new geometries and textures:

   for each textures

   texture->apply(. . .) =

   bind the buffer object
   copy A.jpg, b.jpg and C.jpg in the buffer (the 3 images
   are copied because the buffer object is shared)

   glTex[Sub]Image(. . ., offset of the current image in
   the buffer)

   if (getCopyDataAndReleaseGLBufferObject())

   release GL buffer

   So, for each texture, a GL buffer is created, the 3 images are
   copied, the data is copied in the texture using the current image
   offset in the buffer and the buffer is deleted.

The GL buffer should not be released before all the images are copied 
into their textures(i.e. glTex[Sub]Image for all the textures).


There are few usages cases of a pixel buffer object:

 * texture paging (IncrementalCompileOperation): the GL buffer release
   can be done after the compilation loop
 * rendering (a noncompiled texture is used to render geometry): the GL
   buffer release can be done once all the textures using the buffer
   are compiled
 * texture streaming (movie): the GL buffer should not be released

The first 2 cases can be handledusing some king of reference counter 
(the buffer contains X segments, each glTex[Sub]Image decrements this 
counter, when it reaches 0the buffer can be released).


In the third case, the buffer should never be released. The counter 
should not be decremented.


What do you think about this? I'm not sure all the usage cases are 
covered, especially if the buffer is a vertex buffer or an indices buffer.


Lionel Lagarde

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


Re: [osg-users] osgearth terrain problem

2012-12-12 Thread Glenn Waldron
See my response on the osgearth list.
http://forum.osgearth.org/osgearth-terrain-tile-calculating-problem-td7580152.html

Glenn Waldron / @glennwaldron



On Tue, Dec 11, 2012 at 11:12 PM, caijun  wrote:

> Thanks for glennwaldron's answer!
>
> And I want to know in which file the osgearth calculate the current lod
> and which tiles to load and show? I've read all the files in osgearth and
> osgearth_engine_osgterrain,but I've not found the right file.Can you or
> anyone else tell me which file contains the infomation?
>
>  Thanks very much!
>
>
>
> ___
> 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] Rendering sets of objects in layers/passes

2012-12-12 Thread Sergey Polischuk
Hi using separate renderbin ID for each set of objects should do exactly what you want, as they should be sorted by depth inside each set, and sets rendered in order of renderbin ID's. How you assigning render bin ids? You may need to set RenderBinMode to USE_RENDERBIN_DETAILS or OVERRIDE_RENDERBIN_DETAILS to make it work. And back to front depth sorted renderbin prototypes names are "DepthSortedBin" and "SORT_BACK_TO_FRONT", check if you typed it right.Dont use setRenderingHint(...) after you've set bin number or mode, as it overrides them. Best to use only setRenderBinDetails call like:setRenderBinDetails(binID, "DepthSortedBin", osg::StateSet::USE_RENDERBIN_DETAILS);Cheers. 09.12.2012, 01:34, "Preet" :Hiya,I have multiple sets of depth sorted geometry that I'd like rendered in a specific order. So the depth sorted part itself only matters within a single set, if that makes any sense. For example, I might have three sets, each containing 100 osg::Geometry objects. I'd like each of the objects to render correctly with respect to the other objects in their own set, but I'd like all the objects in the first set to show up over all the objects in the second set and so on.I'm not sure how to do this with OpenSceneGraph. I tried giving each set of objects a separate DepthSorted render bin... but this doesn't do what I want. I'd appreciate any advice.Preet,___osg-users mailing listosg-users@lists.openscenegraph.orghttp://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] RigTransformHardware skinning on DAE models

2012-12-12 Thread Sergey Polischuk
Hi

default implementation uses vertex attribs from slot 11 upwards for bone 
weights, and most implementations have GL_MAX_VERTEX_ATTRIBS = 16, so with more 
than 4 attributes you are probably hitting hardware limits on vertex attributes 
count, i think gl error comes from this too.

Cheers.

29.11.2012, 01:01, "Peterakos" :
> Hello.
>
> I use the default RigTransformHardware for skinning on a dae Model
> with skeleton.
> My model consists of 4 RigGeometries (image 1). The number of bones
> per vertex is 7, 2, 20 and 15 respectively.
> After enabling the OSG_NOTIFY as INFO i see that it creates vec4
> boneWeightX attributes based on the 4 previous numbers
> (num_of_bones/2).
>
> The vertex shader i use for skinning is the following:
>
> #version 120
>
> attribute vec4 boneWeight0;
> attribute vec4 boneWeight1;
> attribute vec4 boneWeight2;
> attribute vec4 boneWeight3;
>
> uniform int nbBonesPerVertex;
> uniform mat4 matrixPalette[MAX_MATRIX];
>
> vec4 position;
>
> void computeAcummulatedNormalAndPosition(vec4 boneWeight){
> int matrixIndex = int(boneWeight[0]);
> float matrixWeight = boneWeight[1] ;
> mat4 matrix = matrixPalette[matrixIndex];
> position += matrixWeight * (matrix * gl_Vertex );
> }
>
> void main( void ){
> position =  vec4(0.0,0.0,0.0,0.0);
>
> if (nbBonesPerVertex > 0) 
> computeAcummulatedNormalAndPosition(boneWeight0);
> if (nbBonesPerVertex > 2) 
> computeAcummulatedNormalAndPosition(boneWeight1);
> if (nbBonesPerVertex > 4) 
> computeAcummulatedNormalAndPosition(boneWeight2);
> if (nbBonesPerVertex > 6) 
> computeAcummulatedNormalAndPosition(boneWeight3);
>
> gl_Position = gl_ModelViewProjectionMatrix * position;
> }
>
> The problem is that when i try to use all the boneWeight attributes it
> creates (which are 10), the model breaks (image 2).
> On the other hand the code above (with only 4 attributes) works like
> the RigTransformSoftware.
>
> On a different high detail model (which creates 25 bone weight
> attributes max), i get the following results:
> -With only the first 4 attributes: the model is broken and animated
> -With all the attributes: the model is correct but there is no 
> animtion.
>
> Can anyone help me through this ?
> Is this behavior normal?
>
> I also get a lot of Warning: detected OpenGL error 'invalid value'
> after RenderBin::draw()
>
> Thank you for your time and sorry for the long post.
>
> ,
> ___
> 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] Visibility of lines

2012-12-12 Thread Jen Hunter
Hi Robert,

thank you for your reply. I appreciate your help :)

I'm sorry if I didn't express myself correctly. I also have to admit I'm not 
quite the expert on computer graphics.

Let's try to make it clearer. I want to know which of the lines on my model are 
visible in a rendered image. That would be the case if a line results in at 
least one drawn pixel.

I need to have this information for an AR application which performs edge 
tracking. Such approaches work with 2D-3D correspondences for each frame to 
estimate the camera parameters.
The recorded webcam image of an object shows of course only the edges of the 
object which are visible from the cameras point of view. To get the 
correspondences I need excactly the same lines on the model (from the last 
frame).

I programmed a working OPENGL example for finding out the visible lines using 
occlusion query glGetOcclusionQueryuivNV. 

At the moment I fail to understand how to make that work for OSG. I had a look 
at osgocclusionquery and the used OcclusionQueryNode and understand that it 
uses ARB_occlusion_query to check the pixel count.

I tried the following but the output of the visible lines is still incorrect:


Code:

osg::Node* scene = osgDB::readNodeFile("file.dae");
if (!scene) return 1;

osg::Group* rootnode = new osg::Group;
rootnode->addChild(scene);
viewer.setSceneData(rootnode);

GetLinesVisitor lineFinder; 
scene->accept(lineFinder);
lines = lineFinder.getLineVector();

for(int i = 0; i < lines.size(); i++){

osg::ref_ptr parent = new 
osg::OcclusionQueryNode;
parent->setVisibilityThreshold( 0 );

osg::Geometry* linesGeom = new osg::Geometry();
osg::Vec3Array* vertices = new osg::Vec3Array;
vertices->push_back(lines.at(i).start);
vertices->push_back(lines.at(i).end);
linesGeom->setVertexArray(vertices);
linesGeom->addPrimitiveSet(new 
osg::DrawArrays(osg::PrimitiveSet::LINES,0,2));

osg::Geode* geode = new osg::Geode();
geode->addDrawable(linesGeom);
parent->addChild(geode);


//A std::vector for all OcclusionQueryNodes. I later ask in a loop for 
each element oqNodes.at(i).get()->getPassed() and count the trues
oqNodes.push_back(parent);
rootnode->addChild(parent);
}






So here are my questions:

(1) How do I set up an OcclusionQueryNode for each line?

(2) Why does the approach from my previous post not work? Is the calculation of 
screen coordinates (using MVPW matrix) for a given vertex really so imprecise 
that I cannot count on this being the correct coordinates to look up in the 
depth buffer?


Cheers,
Dakota

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





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


Re: [osg-users] Help undrstanding all thing GIS

2012-12-12 Thread Robert Osfield
Hi Bill,

No doubt you are ambitious, maybe even a little mad, but both are fine
assets for a programmer.  The other assets you'll need to temper these
aspect will being patient in learning and coding, and being realistic with
your short and long term goals.

Technically what you want to achieve is all doable with the OSG, and in
terms of scaling to handling whole earth databases it's probably one of the
best SDK's in the world for doing it - lots of the OSG users already use it
for precisely this reason.  With this great power comes complexity though,
the OSG is a power users SDK that professional developers use rather than
an entry level SDK.  This does mean you'll have to accept a steep learning
curve and be patient with getting to grips with it.  Reading the published
OSG books will be an invaluable tool.

On the software tech front I think osgEarth may well be the best tool for
visualizing the data you want.  This NodeKit sits ontop the OSG and
integrates very well. The alternative is to build your own pages databases
using VirtualPlanetBuilder, but for this you'll need your own data.

Robert.

On 2 December 2012 07:29, William Temple  wrote:

> Hi,
>
> I am going to admit straight up front I have no idea what I am doing.
>
> I have an idea in my head for an educational application but since I am
> not a programmer, a cartographer, or an artist I am finding that my
> research has me treading water in a murky fogged coated abyss.
>
> There are so many options and so many paths to take those options, I have
> an on going headache from the confusion
>
> I hope there will be some willing guides here who will point me in the
> direction I need to go.
>
> A little history my 3 year old son loves the television shows Dinosaur
> Train, Curious George, and Sid The Science Kid. He also enjoys helping me
> play my on-line game OpenTTD(a transportation simulation game) So, I
> thought to create a game where he could travel the globe and explore
> history, geography, science, society et cetera.
>
> Details...
> 1) first person so it feels one is walking amongst the pyramids et cetera
> 2) 3D globe
> 3) modes of transportation buses, trains, boats, planes, spaceships (for
> that fantasy feel)
> 4) “cut scenes” 1st person youtube type videos for the interactive feel
> 5) KDE Marble Project GeoDataPlacemark type markers for information
>
> What I believe I need.
> 1) CPU Blitter running a node based 3D terrain engine using tiles (I
> believe this will allow the application to run on older machines)
> 2) 3 Layers..   a) Basic heightmap for terrain
> b) Textures for differing levels of zooming in and
> out (LOD?)
> c) Shapfiles for maintaining data on cities and
> places
> 3) SketchUp images (free 3D graphics creator accessible to any one)
> 4) cross platform so a to be truly open
>
> What I can envision
> 1) an on-line server where people can “play the game” and upload
> information
> 2) 42000 users(I have a shapefile from Natural Earth which has a dbf of
> cities and there are 42000 cities listed with 5+ population. I do
> believe at least one person from each of those cities will get involved.
> 3) Users strapping web-cams onto bike helmets and baseball caps taking
> scooter/walking tours of down town Tokyo, Pharaohs pyramids, the Eiffel
> Tower, Roman Coliseum, and The Grand Canyon and posting to the site.
>
> What I am doing...
> 1) teaching myself C++ using books, on-line forums and tutorials.
> 2) learning how to sort, classify, choose, and then organize all the
> various GIS type data. And there is a lot to understand.
>
> Am I crazy? Maybe my 2 programmer friends say I am. But I am an Aries so I
> will tend to pound my head. So I hope some of you join in and offer advice
> and guidance.
>
> Oh and by the way at this point my ego is in the corner cowering and my
> sanity is hiding in the closet so if you also want to mention I am crazy go
> ahead;)
>
> Thanks,
> Bill
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=51321#51321
>
>
>
>
>
> ___
> 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] Geometry sharing

2012-12-12 Thread Robert Osfield
Hi Ale,

On 26 November 2012 10:41, Ale Maro  wrote:

> I have my own data structure to manage mesh geometry. Is there a way share
> it with OSG to avoid vertex list duplication?
>

You could implement your own osg::Array subclass.  See how the osg::Array
subclasses like Vec3Array are implemented for inspiration.

The other alternative just use osg::Vec3Array in your own mesh
representation.  The OSG uses forms that are very closely mapped to OpenGL
making it efficient to pass data to OpenGL.

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


Re: [osg-users] Memory allocation problem with big models

2012-12-12 Thread Robert Osfield
Hi Ale,

My guess is that it's OpenGL side that is consume all the memory, but as
you haven't provide any stack trace it's impossible for say this
definitively.  Breaking an object into smaller parts won't help if it's
OpenGL objects that are consuming all the memory, it will likely help with
performance once you get things working.  Avoiding use of display lists and
VBO will help with the OpenGL memory consumption but will have an adverse
effect on performance.

Robert.


On 26 November 2012 09:24, Ale Maro  wrote:

> Hi all,
>
> I am testing osg for my application.
> I need to visualize big models. For example I am loading a binary STL
> model with 33 millions triangles and I got a bad_alloc exception.
> May be the problem is on the capacity limit of STL vectors.
> I also tried to write my STL loader and split model during load creating
> different geodes (and grouping them) but I am still got the same error
> after calling "view->setSceneData( _scene )"
> Is there a way to overcome this limitation?
>
> Thank you!
>
> Cheers,
> Ale
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=51238#51238
>
>
>
>
>
> ___
> 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] [build] Simple example link errors with cygwin

2012-12-12 Thread Robert Osfield
HI Micael,

I don't use cygwin, and few others do, so I'm afraid you'll be largely on
your own.  If you need guidance then I'd suggest starting with the OSG
examples - do these compile, then have a look at the make options that
cmake builds for them.  running:

 make VERBOSE=1

Is the way to get the cmake to report all the command line options it's
using.

Robert.

On 16 November 2012 16:33, Micael Pedrosa  wrote:

> Hi,
>
> I'm trying to run a simple app in windows with cygwin environment.
>
> Code:
>
> #include 
>
> int main() {
>   osgViewer::Viewer viewer;
>   return 0;
> }
>
>
>
>
> My makefile:
>
> Code:
>
> CC=g++
>
> #source, objects and executable
> SOURCES=test.cpp
> OBJECTS=$(SOURCES:.cpp=.o)
> EXECUTABLE=test
>
> #pre-compile, compile and link flags
> PFLAGS := -DNDEBUG
> CFLAGS=-c -Wall
> LDFLAGS=
>
> #include, lib paths and libs
> INC_PATHS := -I/cygdrive/c/dev/sdk/osg_3.0.1/include
> LIB_PATHS := -L/cygdrive/c/dev/sdk/osg_3.0.1/lib
>
> LIBS := -losg -losgGA -losgDB -losgViewer -losgText -losgUtil -lOpenThreads
>
> #compile and link commands
> all: $(SOURCES) $(EXECUTABLE)
>   rm *.o
>   mv test.exe ./bin
>
> clean:
>   rm -f *.o
>   rm -rf ./bin/*.*
>
> $(EXECUTABLE): $(OBJECTS)
>   $(CC) $(LIB_PATHS) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@
>
> .cpp.o:
>   $(CC) $(INC_PATHS) $(CFLAGS) $(PFLAGS) $< -o $@
>
>
>
>
> Windows paths are correct, osgversion works fine and examples also with:
> OpenSceneGraph Library 3.0.1
>
> Now, everything seems to be correct but my "make all" output is:
>
> Code:
>
> make all
> g++ -I/cygdrive/c/dev/sdk/osg_3.0.1/include -c -Wall -DNDEBUG test.cpp -o
> test.o
> g++ -L/cygdrive/c/dev/sdk/osg_3.0.1/lib  test.o -losg -losgGA -losgDB
> -losgViewer -losgText -losgUtil -lOpenThreads -o test
> test.o:test.cpp:(.text+0x13d): undefined reference to
> `__imp___ZN9osgViewer6ViewerC1Ev'
> test.o:test.cpp:(.text+0x14d): undefined reference to
> `osgViewer::Viewer::~Viewer()'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld:
> test.o: bad reloc address 0x0 in section `.ctors'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: final
> link failed: Invalid operation
> collect2: ld returned 1 exit status
> make: *** [test] Error 1
> Makefile:29: recipe for target `test' failed
>
>
>
>
> Don't know what is missing!
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=51124#51124
>
>
>
>
>
> ___
> 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] [vpb] error building VPB

2012-12-12 Thread Robert Osfield
Hi Айдар,

There is nothing other people can do to help without information about
which versions of the OSG/VPB you are using, and what the errors you are
getting.

Robert.

On 15 November 2012 14:22, Айдар Сайфулл  wrote:

> Hi, All!
>
> Sorry my bad English.
>
> I don't build VPB with VS2008.
>
> Please, help me build virtualplanetbuilder
>
>
> Thank you!
>
> Cheers,
> Айдар
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=51108#51108
>
>
>
>
>
> ___
> 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] [osgPlugins] Does FBX (or any other) plugin supports ForceReadingImage ?

2012-12-12 Thread Robert Osfield
Hi Felix,

The OSG is written so that it osg::Image are assumed to be valid and can be
applied to textures, so if the OSG isn't able to load a particular file it
returns NULL, or if you wish to capture the ReaderWriter::ReadResult you'll
get a FILE_NOT_FOUND.  If you want to modify this behaviour then you could
write a osgDB::Registry::ReadFileCallback that catches cases where the
readImage implementation fails to load anything and then could creates an
osg::Image with it's filename set to the problem file's name.

Robert.

On 12 November 2012 03:14, Felix Hu  wrote:

> I want to import an FBX model into osg, and I want osg to create an empty
> image if the referenced image file is not found or not supported by any
> plugin.
>
> I wrote some code like this:
>
>
> Code:
> auto node = osgDB::readNodeFile("model.fbx", new
> osgDB::Options("ForceReadingImage=true"));
>
>
>
>
> but this doesn't seem like to work, only valid images are loaded, no empty
> image created for thos not loaded.
>
> so, what is the correct way to use ForceReadingImage in this case ?
> is ForceReadingImage supported in any plugin other than osg2 ??
> is this option a global thing or only osg2 ?
> the document says "This is useful when converting from other formats.
> Image information won't be erased even without the external reference. "
>
> How can I realize this ?
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=51042#51042
>
>
>
>
>
> ___
> 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] OSG and Qt GLdouble typedef conflicts with OpenGL ES2

2012-12-12 Thread Robert Osfield
Hi Preet,

On 12 December 2012 05:59, Preet  wrote:

> Hiya
>
> I'm using OSG with Qt to create an OpenGL ES 2 application. GL ES2 does
> not have GLdoubles.
>
> When building witHh against ES2, Qt typedefs GLdouble to GLfloat. OSG
> typedefs GLdouble to just 'double'. As a result I get an error when trying
> to compile my application.
>
> How do I get around this?
>
>
It will be an order of include issue, so just be careful which order you
include files, or keep the Qt GL code seperate from the OSG Qt code.
Personally I'm surprised by the Qt downcasting GLdoube to GLfloat, this
could break codes that rely on doubles.  On the OSG side we generally use
floats for all key data that gets passed to OpenGL, it tends to be just
things like glu (which is now part of the OSG) that uses doubles.

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