jklimke/libcitygml

Is it possible to compile without OpenGL?

Closed this issue · 4 comments

I wanted to know about critical OpenGL is to libcitygml? I see that it is only used in tesselator.
Would it be possible to disable this via a CMake option? How would this impact the rest of the loading pipeline?

Note: I am not using OSG.

Hi,

i guess it should be possible to deactivate the OpenGL (glu) dependency, but this would require some restructuring work since the tesselator is passed around all of the objects to parse.

One solution could be to replace the tesselator by an noop implementation of the tesselator interface that is provided if compiled without opengl.

since glu tesselation functions are deprecated in modern OpenGL anyway, a different solution for tesselation of citygml geomtry would be welcomed. Nevertheless, i can't see much of a poblem with requiring OpenGL as a dependency, since it should be available on all platforms, at least as mesa software implementation implementation of GLU.

My assumption is that the tessalator is creating the triangles from linear rings (and other positions lists). If this is replaced by a noop, this behavior in the loader would change right?

I've only worked with linear rings thus far, and I believe the tessellation is happening as indices [0 n n+1]. This should be fairly easy to replicate. That said, I'm not sure of other this would affect other representations of geometry.

hallo , guys i made a build with cmake, but i dont have idea about next step , i mean how to give .gml file as input and where i will get output .could u plzz guide me
thanks

The idea of this library is not to have a specific output, but to provide C++-Datastructures to work and program with in order to process CityGML documents.