Initial steps to move away from deprecated OpenGL functionality#1530
Conversation
|
Now almost there - just missing text overlays (and labels). In the process I've found and hit a few bugs:
|
|
Should now be almost complete (modulo removing a timing debug statement) if either of you are interested in testing. Particularly interested in testing on non-mac platforms. Aside from just getting it somewhere where we can use modern opengl, there are 2 changes that are actually attractive from a usage point of view:
|
|
Very nice, will try next week, currently travelling. I will also be able to try windows platforms then. I had noticed the bugs in the past but had assumed that these are things not easy to work around. Does the buggy behaviour include the observation that I generally make, when I zoom in hard, that the apparent distances between points appear to increase beyond a certain point? If I recall correctly they appear to increase relative to scale bar size and also in all rendering modes, definitely seen it with sphere rendering. I also noticed that sphere diameter scale seemed to be off on some displays, maybe high res as you say. Hopefully all of these will be fixed with the new code, looking forward to trying it. |
|
Unfortunately the point size cap hasn't been fixed (yet) - just the scaling on high dpi screens. Point size cap (currently maxes out at 64 pixels on mac, which is not very large) is going to be a bit harder to address, but hopefully doable. |
|
That was actually easier than anticipated - point size scaling now works as expected for the 3 main display types. Now need to decide whether to use the quad based rendering for all points (even small ones) rather than switching over when needed, as there doesn't seem to be much (if any) penalty and it would lead to cleaner code. |
|
@barentine - should probably loop you into this as well - it's going to mean a little extra work for #1520, but shouldn't be too bad (mainly changing the I'm inclined to move using the modern opengl interface by default pretty quickly as it addresses a couple of long-standing and slightly embarrassing issues with point sizing. |
|
Thanks! Transparent and shaded points are not a big surpise as I haven't touched them yet (being not well used). The LUT thing is something I saw briefly, but couldn't reliably reproduce ... maybe the saved sessions might be a way to do so ... |
|
Cool, transparent points work now, nice. Session saving seems broken in the latest iteration: Also, I noticed (not sure if always or only sometimes), that spheres become oblong when zooming in hard, screenshot below, all on mac: I hope it is ok to keep posting my observations, perhaps you are already aware of some. |
|
Also, no luck yet on windows (win11) when starting pymevis with the flag |
|
Many thanks! Should have (hopefully) fixed session loading and saving - and the LUT bug. The squashed points is likely to be an aspect ration issue (which I thought I had already addressed) - Points bigger than the max supported point size are actually drawn as rectangles and then made to look like points using some magic in the fragment shader. What is your pyopengl version on windows? On Linux I needed to update the pyopengl version to 3.1.5 to avoid similar issues. |
|
On windows it is running pyopengl 3.1.6. Looks like I cannot easily upgrade from that with conda, could try pip though. Note everything is with Python 3.10 which I run for production work now. Will try the session stuff soonish... |
|
...on windows no luck yet, tried pyopengl 3.1.5., 3.1.6 and 3.1.7. Always same error as above.... |
|
should now be fixed on windows (fingers crossed ...), although windows does not work without the |
|
I did only a 5 min test on windows, so far looking good (win11). What else should one test, a few more windows systems? I could probably try a few win10 machines as well... |
|
Many thanks! I think this is probably now at the point where we can merge and deal with anything else that crops up as it appears. I've switched it so that core profile is now the default, but you can (for now) get the old mode by running with |
|
Many thanks, this is indeed looking pretty good now and I will use in production work, so that any issues should show up sooner than later. Just for my understanding, with pointsprites after zooming in to some extent I still get the familiar smaller point size and debug messages of the type: Is this still expected to happen? This is on higher res displays (I think retina on the macbook and a fairly highish res monitor). In practice for me it is still a little bit annoying as I am looking for small features in the data and really hope to still get the "blurring effect" of the point sprites. But maybe this is a tough thing to implement? |
|
That's super frustrating - point-sprite scaling was working yesterday morning - might be an aspect-ratio linked regression. |
|
should be resolved with #1532 |




PYMEVis has been using the old, deprecated, compatibility profile within OpenGL. This is a first step towards getting stuff working on the more modern "core" profile. To some extent this is an exercise in learning modern OpenGL, as a prelude for doing some WebGL stuff, but should also be good for PYMEVis in the long term.
The main advantages are:
Still very much a work in progress, but points, spheres, and pointsprites work (modulo potential point scaling changes). Pretty much all the other layers don't work yet (surfaces, overlays, scalebars etc ...).
To run, use
PYMEVis --opengl-core-profile