Closed doggy closed 5 years ago
Mentioned in https://github.com/mpv-player/mpv-examples/issues/22
i think it is also fine to rename the folder and file appropriately. instead of openglcb
i would probably use rendergl
.
i also can confirm it working. i will add a few remarks to the code in a bit.
on a side note, it seems like this example doesn't quit gracefully and causes a segfault or a trap, but this shouldn't hold of this PR.
Segment fault issue has been addressed: all render context's create(), free() api should be called on main thread.
Still considering the vo=opengl-cb
option in this example .. I don't know what latest name it should be.
For what I saw, this option name is just an alias for libmpv
, defined in latest master source code:
// For the vo option
const struct m_obj_list vo_obj_list = {
.get_desc = get_desc,
.description = "video outputs",
.aliases = {
{"gl", "gpu"},
{"direct3d_shaders", "direct3d"},
{"opengl", "gpu"},
{"opengl-cb", "libmpv"},
{0}
},
But, also noticed something in 0.29.0 releaseNotes:
- deprecate the OpenGL cocoa backend, option choice --gpu-context=cocoa
when used with --gpu-api=opengl (use --vo=opengl-cb)
... shows that should be configured with gnu-*
options.
It's a little bit confusing.
i still get a segfault when clicking on the red x at the top left of the window. i believe it would be better to just keep this PR to the render API changes and fix other things with another one.
if you prefer to keep everything in one PR you would need to split your latest commit [cocoa-rendergl] fix segment fault on exiting and misc improvements
appropriately. the parts belonging to the render API changes should go into the first commit, one commit for fixing the deprecation warnings, one/two commit(s) for fixing the segfault(s), and another one for the misc changes. though the left over misc changes seem rather questionable to me.
@Akemi Done. A new PR should be issued for the segfault later.
for consistency prefix the commit titles withcocoa-rendergl:
instead of [cocoa-rendergl]
. also the deprecation warnings for the style mask are related to macOS 10.12 rather than xcode.
Done. Appreciate everything your associates.
LGTM and is fine to merge now.
thx for your work and sorry it took so long. i recently got push rights back so future changes can be merged faster from now on.
Verified with latest mpv head sources.