Re: [osg-users] custom vertex attribut, using BIND_OVERALL

2012-10-24 Thread Tassilo Glander
Hi Daniel,

you are right, with BIND_OVERALL and just one element in the array, OSG should 
apply the single attribute to all vertices of the geometry. You can check this 
behavior in Geometry.cpp searching for BIND_OVERALL. Also there is the 
createTexturedQuadGeometry() function which does setup a geometry like you 
want, so check it out if you do it the same way. If it does not work, try to 
put a breakpoint into Geometry.cpp  and debug to see what happens. 

As you say, setting Uniforms requires a state change, while with an attribute 
the rendering is done at the GPU completely.

Thank you!

Cheers,
Tassilo

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





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


Re: [osg-users] custom vertex attribut, using BIND_OVERALL

2012-10-24 Thread Tassilo Glander
Hi,

sorry, I was wrong. It really seems the same in terms of state changes.

A  use case for a BIND_OVERALL attribute is probably that you have different 
types of geometry with and without individual attributes (for example color) in 
your scene that you want to render using the same shader.

Thank you!

Cheers,
Tassilo

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





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


Re: [osg-users] Memory leak notify handler

2012-09-17 Thread Tassilo Glander
OSG uses smart pointers to manage memory (and release it if the last pointer is 
destroyed). The handler created with new in your cited code is stored in a 
smart pointer variable (see Notify.cpp)
osg::ref_ptrosg::NotifyHandler _handler;
(if the cast is a NotifyStreamBuffer). So I guess a memory leak could occur, if 
a StreamBuffer different than NotifyStreamBuffer is used.

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





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


Re: [osg-users] Merging geometry data

2012-09-14 Thread Tassilo Glander
Hi Kirill,

the Optimizer class has some code to aggregate geometry to reduce the number of 
separate drawcalls. You can try if it works in your case by running your *.osg 
file with the osgconv application and look at the output file with osgViewer. 
Also play with the optimizer options that you can set in the environment 
variable (osgconv explains its usage), there are some explicit merge options. I 
do not know which of them are part of the default optimizations. In the code of 
osgConv you can see how the Optimizer is used (two lines of code).

However this is just a quick shot. If it does not improve the performance maybe 
a manual optimization is needed. Then you have to provide more details: what is 
the size of the model (vertices), what kind of instancing did you try? 

Cheers,
Tassilo

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





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


Re: [osg-users] Merging geometry data

2012-09-14 Thread Tassilo Glander
Hi Kirill,

can you post source code and maybe the *.osgfile?

Is it a static scene (300 positions do not change)? If yes, merging should work 
and accelerate the rendering sufficiently. Did you try optimizing with 
ALL_OPTIMIZATIONS (replicates geometry subnodes and applies transformations)?

BTW, did you look at the examples provided by osg, especially osgforest and 
osgdrawinstanced? They both show different methods to draw the same geometry a 
number of times...

Cheers,
Tassilo

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





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


Re: [osg-users] [forum] Anyone knows how to load CityGML files in OSG?

2012-09-12 Thread Tassilo Glander
Hi Fan,

not sure what you mean with load citygml files with codes. You want to access 
the citygml semantics and attributes in addition to just see the graphical 
model? Then you have to take a look at the reader in libcitygml to see how it 
stores the citygml nodes and maybe write your own.

Cheers,
Tassilo

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





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


Re: [osg-users] [forum] Anyone knows how to load CityGML files in OSG?

2012-09-12 Thread Tassilo Glander
Hi Fan,

can you post a code snippet of what you tried? And some details about how it 
failed? Because it should work with the readNodeFIle method, for example like 
this:

osg::Node* n = osgDB::readNodeFile(pathToCityGMLFile);
osgViewer::Viewer viewer;

// add model to viewer.
viewer.setSceneData( n);

return viewer.run();

This is independent from the data you try to load (CityGML, 3ds, obj, ...), as 
long as a plugin exists it will be loaded.

Cheers,
Tassilo

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





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


Re: [osg-users] [forum] Anyone knows how to load CityGML files in OSG?

2012-09-12 Thread Tassilo Glander
Hi Fan,

I do not see something wrong in this moment. I would try a few things:
* Do you get commandline output while loading? (libcitygml usually puts out 
something text while loading)
* You could check that something is loaded with a debugger to check what is 
returned or add some code to see if a node is returned.
* You could try to load another model that is known to work, like the cow.osg 
model
* Do you have only one osg on your machine? Might be that when you try 
osgviewer you actually use another version...

Cheers,
Tassilo[/list]

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





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


Re: [osg-users] [vpb] Building Virtual Planet Builder in Linux

2012-09-11 Thread Tassilo Glander
Hi Nav,

sounds like the libraries are not found at the usual places, both for the 
plugins (that is why the cow is not loading) and for the configuration of VPB. 
Did you do the sudo make install?
Also sometimes I had to do ldconfig when I installed new libraries for the 
first time.

I am not too familiar with linux, these are just ideas until the experts join :)

Thank you!

Cheers,
Tassilo

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





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


[osg-users] [build] CPack'ing OSG broken (VS2008)

2012-06-07 Thread Tassilo Glander
Hi everone,

did anyone recently try out the packaging on Windows with VS2008? I get an 
error message when I build the package project, e.g.

CPack Error: Problem creating temporary directory: 
[code]
D:/Tassilo/Lib/osg/buildGLES/_CPack_Packages/ZIP/libopenscenegraph-3.1.3-win64-x86-vc90-$(OutDir)D:/Tassilo/Lib/INSTALL_GLES2
[/code]

It looks like there are two problems:
- a Visual Studio variable $(OutDir) is appended to the file name without being 
expanded into, e.g., Release or Debug
- the Cmake install variable is appended (which contains directory separators 
/)

With some experimenting in OsgCPackConfig.cmake.in I found that if line 49 is 
commented
[code]
#SET(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
[/code]
 the zip file is created, though with $(OutDir) as part of the name:

[code]
1CPack: - package: 
D:/Tassilo/Lib/osg/buildGLES/libopenscenegraph-3.1.3-win64-x86-vc90-$(OutDir).zip
 generated.
[/code]

I think this got introduced in revision 12230 (Alan Dickinson). I will look 
into it further, but if there are any ideas, I am glad to hear them.

Thank you!

Cheers,
Tassilo

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





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


Re: [osg-users] Uniform array naming problem

2011-08-24 Thread Tassilo Glander
Hi Robert,

I encountered the same problem (Win7 64 Bit, nVidia current driver 280.26), 
while it does not occur on older versions (like 266.58).
The solution of McKay Davis 
(http://forum.openscenegraph.org/viewtopic.php?t=1828)
works around this.

Code:

// Strip [0] from uniform array name to work around driver bugs 
const int len = strlen(name); 
if (len = 3  name[len-1] == ']') 
name[len-3] = 0;




Apparently uniform arrays are not used so widely, hence there are just few 
complaints about this.
Anyway, I would support McKay and Glenn. I understand your reluctance to 
support particular platforms / drivers, but in this case the fix would be still 
according to the standard to query the location of the array without brackets. 
So no need to change it back for future drivers, as far as I can see.

Thank you!

Cheers,
Tassilo

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





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


Re: [osg-users] [ANN] New version of 3rdParty Package

2011-07-12 Thread Tassilo Glander
Hey Torben,

thanks for this great package, it really simplifies developing with OSG (on 
Windows).

One small thing that occurred: the gdal_vrt.h header file is missing in the x64 
folder (it does exist in the x86 folder). While it's not needed by OSG, 
osgEarth does need it and it is handy to use the same 3rdParty folder.

Best regards,
Tassilo

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





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


Re: [osg-users] integrating tessellation shaders into osg

2010-10-21 Thread Tassilo Glander
Hi Waldemar,

I found the samples pack on g-truc very instructing for opengl 4 related stuff, 
including tessellation shaders:
http://www.g-truc.net/post-0333.html 

Cheers,
Tassilo

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





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


Re: [osg-users] [osgPlugins] Error when loading DirectX .x files

2010-08-16 Thread Tassilo Glander
Hi all,

as the bug is still in the reader, I would like to submit a fix that deals with 
2 more cases of how to format the material names. The current version crashes 
when encountering materials as mentioned by Judy.
I think, the format supported in the current version of mesh.cpp is not 
correct, as the DirectX-Viewer included in DirectX-SDK (August 2009) cannot 
read model files refering to materials without curly brackets. 

I would be happy, if someone could try the patch with other models.

Thank you!

Cheers,
Tassilo

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




Attachments: 
http://forum.openscenegraph.org//files/fix_x_plugindiff_312.txt


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