Hi all,

I am migrating our simulation environment from OSG 2.8.3 to OSG 3.0.0-rc1 and have some problems with a quite huge multi LOD database we use daily. Indeed we receive continuously an openGL error "Warning: detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)". After a very long tracking in optmization options and in the database itself we finally were able to find the problem... but not the solution.
In the joined file you will find a simple geometry (these are in reality two roofs of houses placed on the database) causing the OpenGL error.
In order to reproduce the error set the OSG_OPTIMZER environment variable to "MERGE_GEOMETRY MAKE_FAST_GEOMETRY"
Removing MAKE_FAST_GEOMETRY from the OSG_OPTIMIZER variable suppress the warning...

The other way to correct this error is to transform in the osg file

          PrimitiveSets 2
          {
            DrawArrays TRIANGLES 0 18
            DrawArrays TRIANGLES 18 18
          }

to

          PrimitiveSets 1
          {
            DrawArrays TRIANGLES 0 36
          }

Does anyone have an idea of the origin of this problem and how to correct (or avoid) this error (other solution than modifying the OSG_OPTIMIZER or correcting all the different lods..) ?

Cheers,

SCHULTE Christian
Research  Engineer
in charge of the Simulation Laboratory
System Control and Flight Dynamics Department
Simulation and Flight Testing Unit

ONERA - The French Aerospace Lab
Ecole de l'Air - BA 701
13661 SALON cedex AIR
FRANCE




Group {
  name "Obj Group"
  nodeMask 0xffffffff
  cullingActive TRUE
  num_children 1
  LOD {
    name "GeomObject_0-4378"
    nodeMask 0xffffffff
    cullingActive TRUE
    Center 238.723 -437.402 8.54999
    Radius -1
    RangeMode DISTANCE_FROM_EYE_POINT
    RangeList 1 {
      0 4378.56
    }
    num_children 1
    Group {
      DataVariance STATIC
      name "Merge Group"
      nodeMask 0xffffffff
      cullingActive TRUE
      num_children 1
      Geode {
        DataVariance STATIC
        name "merged Objects"
        nodeMask 0xffffffff
        cullingActive TRUE
        StateSet {
          UniqueID StateSet_0
          rendering_hint DEFAULT_BIN
          renderBinMode INHERIT
          GL_CULL_FACE ON
          GL_LIGHTING ON
          textureUnit 0 {
            GL_TEXTURE_2D ON
          }
        }
        num_drawables 1
        Geometry {
          DataVariance STATIC
          Use StateSet_0
          useDisplayList TRUE
          useVertexBufferObjects FALSE
          PrimitiveSets 2
          {
            DrawArrays TRIANGLES 0 18
            DrawArrays TRIANGLES 18 18
          }
          VertexArray Vec3Array 28
          {
            389.165 -234.038 11.9992
            394.657 -240.028 11.9992
            394.872 -235.067 14.5505
            394.126 -234.253 14.5505
            394.341 -229.291 11.9992
            389.165 -234.038 11.9992
            394.126 -234.253 14.5505
            399.833 -235.282 11.9992
            394.341 -229.291 11.9992
            394.126 -234.253 14.5505
            394.872 -235.067 14.5505
            394.657 -240.028 11.9992
            399.833 -235.282 11.9992
            394.872 -235.067 14.5505
            346.808 -266.449 12.0013
            351.408 -266.736 12.0013
            349.251 -264.292 13.6757
            347.307 -258.461 12.0013
            346.808 -266.449 12.0013
            349.251 -264.292 13.6757
            349.463 -260.905 13.6757
            351.907 -258.748 12.0013
            347.307 -258.461 12.0013
            349.463 -260.905 13.6757
            351.408 -266.736 12.0013
            351.907 -258.748 12.0013
            349.463 -260.905 13.6757
            349.251 -264.292 13.6757
          }
          VertexIndices UIntArray 36
          {
            0 1 2 2 3 0 4 5 6 7
            8 9 9 10 7 11 12 13 14 15
            16 17 18 19 19 20 17 21 22 23
            24 25 26 26 27 24 
          }
          NormalBinding PER_VERTEX
          NormalArray Vec3Array 28
          {
            -0.329549 -0.416106 0.847498
            -0.329549 -0.416106 0.847498
            -0.329549 -0.416106 0.847498
            -0.329549 -0.416106 0.847498
            -0.299824 0.450371 0.840995
            -0.299824 0.450371 0.840995
            -0.299824 0.450371 0.840995
            0.329549 0.416106 0.847498
            0.329549 0.416106 0.847498
            0.329549 0.416106 0.847498
            0.329549 0.416106 0.847498
            0.299824 -0.450371 0.840995
            0.299824 -0.450371 0.840995
            0.299824 -0.450371 0.840995
            -0.0266145 -0.586828 0.809274
            -0.0266145 -0.586828 0.809274
            -0.0266145 -0.586828 0.809274
            -0.465507 0.0400426 0.884138
            -0.465507 0.0400426 0.884138
            -0.465507 0.0400426 0.884138
            -0.465507 0.0400426 0.884138
            0.0266145 0.586828 0.809274
            0.0266145 0.586828 0.809274
            0.0266145 0.586828 0.809274
            0.465507 -0.0400423 0.884138
            0.465507 -0.0400423 0.884138
            0.465507 -0.0400423 0.884138
            0.465507 -0.0400423 0.884138
          }
          NormalIndices UIntArray 36
          {
            0 1 2 2 3 0 4 5 6 7
            8 9 9 10 7 11 12 13 14 15
            16 17 18 19 19 20 17 21 22 23
            24 25 26 26 27 24 
          }
          ColorBinding OVERALL
          ColorArray Vec4ubArray 1
          {
            255 255 255 255
          }
        }
      }
    }
  }
}
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to