Split MyOpenGLView into two - #730
Conversation
phkb
left a comment
There was a problem hiding this comment.
Everything looks good from my end.
|
@oocube @LW-archlinux are either of you able to test this? |
|
The commit messages don't mention the reason for the actions.
|
|
@LW-archlinux The dead code in MyOpenGLView was found by using a Python script to look for dead code candidates (ie. code that isn't called from anywhere else). I described it here. I took just the MyOpenGLView ones from that list and checked them manually for usages: I was conservative so I did not remove isAlphabetKeyDown or isCommandDown as it seemed possible they could be used in future. The other functions were not called from anywhere else so I removed those 4 functions. HDR was implemented in Win32 calls because SDL1.2 did not have HDR support. SDL3 does have HDR support. The function isOutputDisplayHDREnabled is used to check if HDR is possible. That 150 lines of Win32 code can now be done in just a few lines of cross platform SDL3 code. Generally where SDL3 equivalents now exist for Win32 code, it is logical and sensible to use it. Many source files in Oolite need splitting. It is very challenging to understand source files of 1000 lines+ of code. Part of the reason for the complexity was probably trying to bolt SDL into a Cocoa first design + code rot as features and hacks were spliced in to add new functionality or solve specific issues without refactoring the code to make it readable and understandable. This split (as well as deleting dead code and replacing OS custom code with SDL3) is a small step towards making the code a bit easier to follow. |
|
It looks like the changes to mk.sh can't apply cleanly to master 942f518 , you may have to rebase this. |
mk.sh doesn't output meson log unless option set # Conflicts: # mk.sh
keep it oon openglview
054311e to
619bec3
Compare
|
@LW-archlinux I rebased. How is it now? |
|
Still fails, the commits that change mk.sh probably should not be present. |
Uh oh!
There was an error while loading. Please reload this page.