SebKuzminsky / pycam

Other
340 stars 98 forks source link

OpenGL visualization requires legacy features (before 3.0) #134

Open sumpfralle opened 5 years ago

sumpfralle commented 5 years ago

Sadly pycam currently uses many OpenGL legacy functions (removed from the 3.0 specification).

Thus modern graphic cards fail to work with with invalid operation errors at various places in the code (usually at least for glMatrixMode).

This breaks the 3D visualization for many (and soon: most) systems.

sumpfralle commented 5 years ago

The migration of the legacy functions to the new API seems to be non-trivial.

Personally I have no interest in gaining OpenGL-related knowledge. Thus the OpenGL visualization will need to be removed, unless someone contributes this migration.

I researched possible alternatives (high-level 3D visualization toolkits or 3D exchange formats). For now I am favoring an export to X3D (see #135).

lava commented 5 years ago

Note that most modern graphics cards (in particular all Nvidia and AMD cards) still support legacy OpenGL, e.g. the famous glxgears test program is still written using the legacy API and works basically everywhere I tried.

The reason why it doesn't work for PyCAM in particular is that Gdk is by default requesting the legacy features to be turned off for the OpenGL contexts it creates. After applying #140, I'm able to run the OpenGL code unchanged without any errors.

sumpfralle commented 5 years ago

Thank you for the clarification!