Hi Robert,
Both:
osgprecipitation textured_box.osg
osgprecipitation non_textured_box.osg
Work just fine for me, with SVN version of the OSG. Note, there has
been a shader related bug fix to GLObjectVistor that may well have a
baring on this issue.
Did you change the vbo lines in the PrecipitationEffect.cpp?
As for VBO/non VBO on objects in the scene, this should have
absolutely no effect on the precipitation, suggesting either a bug on
the OSG side or a driver bug. Could you try out the SVN version of
the OSG to see if this fixes things.
Sure, will do it right away.
Talk to you later,
Raymond
Robert.
Hi,
I am diving deep into the precipitation and trying out things (osg 2.4.0,
win xp, MS Visual Studio 2005 SP1). One of the things I did is to disable
the usage of vbos, in lines 480, 487 and 494:
_quadGeometry->setUseVertexBufferObjects(false);
_lineGeometry->setUseVertexBufferObjects(false);
_pointGeometry->setUseVertexBufferObjects(false);
When I do so, the precip is not drawn properly at all anymore, and it
depends if a load a textured or non-textured object (see the attached models
+ image):
- non-textured: box rendered ok, no precip at all although it seems to be
rendered judging from the performance
- textured: box rendered ok, precip is rendered not right at all (seems like
large polygons or so)
So the general question is: should I be able to disable vbo at all times? I
expected this would be possible (resulting in a performance penalty of
course). If so, there is an issue somewhere... I don't know where, although
I spent many hours on this.
Thanks a lot
Raymond
MatrixTransform {
DataVariance STATIC
name "Scene Root"
nodeMask 0xff
cullingActive TRUE
StateSet {
UniqueID StateSet_0
DataVariance STATIC
rendering_hint DEFAULT_BIN
renderBinMode INHERIT
GL_LIGHTING ON
}
referenceFrame RELATIVE
Matrix {
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
}
num_children 1
MatrixTransform {
DataVariance STATIC
name "Box01"
nodeMask 0xff
cullingActive TRUE
referenceFrame RELATIVE
Matrix {
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
}
num_children 1
Geode {
UniqueID Geode_1
DataVariance STATIC
name "Box01-GEODE"
nodeMask 0xff
cullingActive TRUE
num_drawables 1
Geometry {
DataVariance DYNAMIC
StateSet {
DataVariance STATIC
rendering_hint DEFAULT_BIN
renderBinMode INHERIT
}
useDisplayList TRUE
useVertexBufferObjects FALSE
PrimitiveSets 1
{
DrawArrays TRIANGLES 0 36
}
VertexArray Vec3Array 36
{
-14.7209 -13.6026 0
-14.7209 13.6026 0
14.7209 13.6026 0
14.7209 13.6026 0
14.7209 -13.6026 0
-14.7209 -13.6026 0
-14.7209 -13.6026 15.8052
14.7209 -13.6026 15.8052
14.7209 13.6026 15.8052
14.7209 13.6026 15.8052
-14.7209 13.6026 15.8052
-14.7209 -13.6026 15.8052
-14.7209 -13.6026 0
14.7209 -13.6026 0
14.7209 -13.6026 15.8052
14.7209 -13.6026 15.8052
-14.7209 -13.6026 15.8052
-14.7209 -13.6026 0
14.7209 -13.6026 0
14.7209 13.6026 0
14.7209 13.6026 15.8052
14.7209 13.6026 15.8052
14.7209 -13.6026 15.8052
14.7209 -13.6026 0
14.7209 13.6026 0
-14.7209 13.6026 0
-14.7209 13.6026 15.8052
-14.7209 13.6026 15.8052
14.7209 13.6026 15.8052
14.7209 13.6026 0
-14.7209 13.6026 0
-14.7209 -13.6026 0
-14.7209 -13.6026 15.8052
-14.7209 -13.6026 15.8052
-14.7209 13.6026 15.8052
-14.7209 13.6026 0
}
NormalBinding PER_VERTEX
NormalArray Vec3Array 36
{
0 0 -1
0 0 -1
0 0 -1
0 0 -1
0 0 -1
0 0 -1
0 0 1
0 0 1
0 0 1
0 0 1
0 0 1
0 0 1
0 -1 0
0 -1 0
0 -1 0
0 -1 0
0 -1 0
0 -1 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
0 1 0
0 1 0
0 1 0
0 1 0
0 1 0
0 1 0
-1 0 0
-1 0 0
-1 0 0
-1 0 0
-1 0 0
-1 0 0
}
ColorBinding OVERALL
ColorArray Vec4Array 1
{
0.109804 0.584314 0.694118 1
}
}
}
}
}
MatrixTransform {
DataVariance STATIC
name "Scene Root"
nodeMask 0xff
cullingActive TRUE
StateSet {
UniqueID StateSet_0
DataVariance STATIC
rendering_hint DEFAULT_BIN
renderBinMode INHERIT
GL_LIGHTING ON
}
referenceFrame RELATIVE
Matrix {
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
}
num_children 1
MatrixTransform {
DataVariance STATIC
name "Box01"
nodeMask 0xff
cullingActive TRUE
referenceFrame RELATIVE
Matrix {
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
}
num_children 1
Geode {
UniqueID Geode_1
DataVariance STATIC
name "Box01-GEODE"
nodeMask 0xff
cullingActive TRUE
num_drawables 1
Geometry {
DataVariance DYNAMIC
name "01 - Default"
StateSet {
UniqueID StateSet_2
DataVariance STATIC
rendering_hint DEFAULT_BIN
renderBinMode INHERIT
GL_CULL_FACE ON
GL_LIGHTING ON
0xba1 ON
Material {
DataVariance STATIC
ColorMode OFF
ambientColor 0.588235 0.588235 0.588235 1
diffuseColor 1 1 1 1
specularColor 0 0 0 1
emissionColor 0 0 0 1
shininess 0
}
textureUnit 0 {
GL_TEXTURE_2D ON
Texture2D {
DataVariance STATIC
file "br00.jpg"
wrap_s CLAMP_TO_EDGE
wrap_t CLAMP_TO_EDGE
wrap_r CLAMP_TO_EDGE
min_filter LINEAR_MIPMAP_LINEAR
mag_filter LINEAR
maxAnisotropy 1
borderColor 0 0 0 0
borderWidth 0
useHardwareMipMapGeneration TRUE
unRefImageDataAfterApply FALSE
internalFormatMode USE_IMAGE_DATA_FORMAT
resizeNonPowerOfTwo TRUE
}
}
}
useDisplayList TRUE
useVertexBufferObjects FALSE
PrimitiveSets 1
{
DrawArrays TRIANGLES 0 36
}
VertexArray Vec3Array 36
{
-14.7209 -13.6026 0
-14.7209 13.6026 0
14.7209 13.6026 0
14.7209 13.6026 0
14.7209 -13.6026 0
-14.7209 -13.6026 0
-14.7209 -13.6026 15.8052
14.7209 -13.6026 15.8052
14.7209 13.6026 15.8052
14.7209 13.6026 15.8052
-14.7209 13.6026 15.8052
-14.7209 -13.6026 15.8052
-14.7209 -13.6026 0
14.7209 -13.6026 0
14.7209 -13.6026 15.8052
14.7209 -13.6026 15.8052
-14.7209 -13.6026 15.8052
-14.7209 -13.6026 0
14.7209 -13.6026 0
14.7209 13.6026 0
14.7209 13.6026 15.8052
14.7209 13.6026 15.8052
14.7209 -13.6026 15.8052
14.7209 -13.6026 0
14.7209 13.6026 0
-14.7209 13.6026 0
-14.7209 13.6026 15.8052
-14.7209 13.6026 15.8052
14.7209 13.6026 15.8052
14.7209 13.6026 0
-14.7209 13.6026 0
-14.7209 -13.6026 0
-14.7209 -13.6026 15.8052
-14.7209 -13.6026 15.8052
-14.7209 13.6026 15.8052
-14.7209 13.6026 0
}
NormalBinding PER_VERTEX
NormalArray Vec3Array 36
{
0 0 -1
0 0 -1
0 0 -1
0 0 -1
0 0 -1
0 0 -1
0 0 1
0 0 1
0 0 1
0 0 1
0 0 1
0 0 1
0 -1 0
0 -1 0
0 -1 0
0 -1 0
0 -1 0
0 -1 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
0 1 0
0 1 0
0 1 0
0 1 0
0 1 0
0 1 0
-1 0 0
-1 0 0
-1 0 0
-1 0 0
-1 0 0
-1 0 0
}
TexCoordArray 0 Vec2Array 36
{
1 0
1 1
0 1
0 1
0 0
1 0
0 0
1 0
1 1
1 1
0 1
0 0
0 0
1 0
1 1
1 1
0 1
0 0
0 0
1 0
1 1
1 1
0 1
0 0
0 0
1 0
1 1
1 1
0 1
0 0
0 0
1 0
1 1
1 1
0 1
0 0
}
}
}
}
}
_______________________________________________
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