Discussion:
[Opensg-users] OpenSG2: new GeoHandler
Johannes Brunen
2014-03-24 10:24:22 UTC
Permalink
Hello Gerrit,



I have weird behavior on my VC 2008 (VC9) 64bit platform after enabling
the OSG_ENABLE_NEW_GEOHANDLER flag. More specifically I see the problem
only on my ATI Radeon desktop. On Nvidia I do not experience any
problem.



The geometry is broken on rendering, i.e. I see missing polygon facets
all over the mesh.



Attached you can find a minimalistic example program and a screen shot
which does show the problem on my ATI setup but not on my Nvida machine.



Can you explain what is happening here?

Is this a deficit of OpenSG or of my usage pattern or of the ATI driver?



Any help is appreciated...



Best,

Johannes
Gerrit Voß
2014-03-24 12:25:53 UTC
Permalink
Hi,

sorry for the long silence, I had to many OpenSG unrelated things on my plate ;(.
I'll have a look at this problem as well as the bool mfield one.

kind regards
gerrit
Post by Johannes Brunen
Hello Gerrit,
I have weird behavior on my VC 2008 (VC9) 64bit platform after enabling
the OSG_ENABLE_NEW_GEOHANDLER flag. More specifically I see the problem
only on my ATI Radeon desktop. On Nvidia I do not experience any
problem.
The geometry is broken on rendering, i.e. I see missing polygon facets
all over the mesh.
Attached you can find a minimalistic example program and a screen shot
which does show the problem on my ATI setup but not on my Nvida machine.
Can you explain what is happening here?
Is this a deficit of OpenSG or of my usage pattern or of the ATI driver?
Any help is appreciated...
Best,
Johannes
<Test.zip>
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Opensg-users mailing list
https://lists.sourceforge.net/lists/listinfo/opensg-users
Gerrit Voß
2014-03-25 10:46:26 UTC
Permalink
Hello,
Post by Gerrit Voß
Hi,
sorry for the long silence, I had to many OpenSG unrelated things on my plate ;(.
I'll have a look at this problem as well as the bool mfield one.
good news number one, I could reproduce it for the Windows and ATI
setup. ATI doesn't like the combination of VAO and display lists.

If I disable the display lists at the startup of your test

int main(int argc, char **argv)
{
OSG::osgInit(argc,argv);

OSG::FieldContainer *pProto =
OSG::Geometry::getClassType().getPrototype();

if(pProto != NULL)
{
OSG::Geometry *pGeo = dynamic_cast<OSG::Geometry *>(pProto);

pGeo->setDlistCache(false);
}

I get the correct rendering for the Windows ATI combination.

I will work on a long term fix so that display lists are automatically
disabled if an ATI GPU is detected and VAO are used to render.

I also see the MFBool error and know where the problem is, this one
needs some fcd2code tweaking, I'll work on it as well.

kind regards
gerrit
Gerrit Voß
2014-03-28 03:29:10 UTC
Permalink
Hello,
Post by Gerrit Voß
Hello,
Post by Gerrit Voß
Hi,
sorry for the long silence, I had to many OpenSG unrelated things on my plate ;(.
I'll have a look at this problem as well as the bool mfield one.
good news number one, I could reproduce it for the Windows and ATI
setup. ATI doesn't like the combination of VAO and display lists.
I will work on a long term fix so that display lists are automatically
disabled if an ATI GPU is detected and VAO are used to render.
I also see the MFBool error and know where the problem is, this one
needs some fcd2code tweaking, I'll work on it as well.
I just pushed the patches fixing these two problems.

a) auto disable display list with VAOs on ATI cards
b) change the ret values of editMField(index) to MFieldType::reference
to avoid the MFBool compile errors.

kind regards
gerrit
Johannes
2014-05-21 09:28:02 UTC
Permalink
Hello Gerrit,

today I checked the current OpenSG 2 trunk in my setup. Unfortunately, I
have still problems on my ATI machine (broken Geometry). On my NVidia
machine I have currently no problem.

Attached you can find a screenshot of the rendering.

Basically, I setup my geometry core as follows:

_geometryCore->setTypes (_spMeshToGeomProc->type());
_geometryCore->setLengths (_spMeshToGeomProc->length());
_geometryCore->setIndices (_spMeshToGeomProc->indices());
_geometryCore->setPositions (_spMeshToGeomProc->vertices());
_geometryCore->setNormals (_spMeshToGeomProc->normals());
if (_textured)
_geometryCore->setTexCoords(_spMeshToGeomProc->textures());

_geometryCore->setDlistCache(true);

_spMeshToGeomProc->type() ->setUseVBO(false);
_spMeshToGeomProc->length() ->setUseVBO(false);
_spMeshToGeomProc->indices() ->setUseVBO(false);
_spMeshToGeomProc->vertices()->setUseVBO(false);
_spMeshToGeomProc->normals() ->setUseVBO(false);
if (_textured)
_spMeshToGeomProc->textures()->setUseVBO(false);

If I do not use shader the rendering is fine. However, independent of
the shader I do see the same result you can see on the PNG.

However, if I turn of the use of display list the shader based rendering
is also fine.

In the attached zip file you can also find the CMakeCache.txt file used
at compilation of OpenSG.

Do you have any idea what is going wrong here?

Best,
Johannes

P.S.: I uses a recent GL driver for my graphic board (AMD Radeon HD 5700
series).

Loading...