ATTN Mac users: Cocoa back end testing needed
-
Blzut3
-

- Posts: 3215
- Joined: Wed Nov 24, 2004 12:59 pm
- Operating System Version (Optional): Kubuntu
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
- Contact:
ATTN Mac users: Cocoa back end testing needed
Update: http://forum.zdoom.org/viewtopic.php?p=794265#p794265
Alexey Lysiuk (_mental_) recently agreed to bring the native Cocoa back end code from GZDoom for OS X over to ZDoom. This is great news for Mac users as the Cocoa back end performs far better than the SDL backend, and the app bundle no longer needs to modify itself to switch SDL versions based on OS X version. To give a taste of the performance difference for those not already using GZDoom for OS X, on my Mac Mini (cheapest late 2009 model), I'm able to run vanilla content at 1600x1200 while maintaining nearly 60fps, compared to 20fps with SDL. The back end utilizes OpenGL much in the same way that Direct3D is used on Windows so vid_vsync is also now supported (there's no canvas acceleration so it's still fully limited to 256 colors).
At the moment there is one down side. The back end requires OS X 10.6 or later and thus an Intel Mac. For the handful of PowerPC users out there, we do plan to try to reduce the requirement. We will need your help though as neither of us have access to OS X 10.4/10.5 nor a PowerPC Mac.
Alexey is also working on enabling retina support. The issue at the moment is making sure that using the retina APIs don't break compatibility with 10.6.
Grab the osx_native builds from DRD Team: http://devbuilds.drdteam.org/zdoom-mac/
Source code: https://github.com/alexey-lysiuk/gzdoom/tree/z_osx
Please report any regressions, comment, or make feature requests for the back end code in this thread.
Alexey Lysiuk (_mental_) recently agreed to bring the native Cocoa back end code from GZDoom for OS X over to ZDoom. This is great news for Mac users as the Cocoa back end performs far better than the SDL backend, and the app bundle no longer needs to modify itself to switch SDL versions based on OS X version. To give a taste of the performance difference for those not already using GZDoom for OS X, on my Mac Mini (cheapest late 2009 model), I'm able to run vanilla content at 1600x1200 while maintaining nearly 60fps, compared to 20fps with SDL. The back end utilizes OpenGL much in the same way that Direct3D is used on Windows so vid_vsync is also now supported (there's no canvas acceleration so it's still fully limited to 256 colors).
At the moment there is one down side. The back end requires OS X 10.6 or later and thus an Intel Mac. For the handful of PowerPC users out there, we do plan to try to reduce the requirement. We will need your help though as neither of us have access to OS X 10.4/10.5 nor a PowerPC Mac.
Alexey is also working on enabling retina support. The issue at the moment is making sure that using the retina APIs don't break compatibility with 10.6.
Grab the osx_native builds from DRD Team: http://devbuilds.drdteam.org/zdoom-mac/
Source code: https://github.com/alexey-lysiuk/gzdoom/tree/z_osx
Please report any regressions, comment, or make feature requests for the back end code in this thread.
Last edited by Blzut3 on Sat Nov 15, 2014 10:14 am, edited 2 times in total.
Re: ATTN Mac users: Cocoa back end testing needed
This is just great. It is indeed a lot faster than SDL. Stable 60 FPS (w/ V-Sync enabled) on 1440x900 on MacBook Pro w/ Retina Display (tried with HD4000 enabled). Adding the fact that now it's a lot easier to switch between apps, basically every hotkey+multitouch works, this is an amazing improvement for ZDoom on the Mac. Can't wait for the Retina support.
However, one thing that could have been long waited (especially for multiplayer ports now that this might get ported to them over time) is copy-paste, which works flawlessly in GZDoom OS X but is missing (not working) here. Please check this one.
Other than that, awesome work! Thanks!
EDIT: by the way, as for me, mouse behaves a lot better.
However, one thing that could have been long waited (especially for multiplayer ports now that this might get ported to them over time) is copy-paste, which works flawlessly in GZDoom OS X but is missing (not working) here. Please check this one.
Other than that, awesome work! Thanks!
EDIT: by the way, as for me, mouse behaves a lot better.
Re: ATTN Mac users: Cocoa back end testing needed
I didn't integrate the clipboard operations from GZDoom. I thought no one uses it...Mazintosh wrote:However, one thing that could have been long waited (especially for multiplayer ports now that this might get ported to them over time) is copy-paste, which works flawlessly in GZDoom OS X but is missing (not working) here. Please check this one.
Re: ATTN Mac users: Cocoa back end testing needed
Well, you've met someone who actually uses it! And it is quite clear it's going to be used in multiplayer-oriented ZDoom forks (in case this gets ported to them over time). So yeah, please add 
- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: ATTN Mac users: Cocoa back end testing needed
Of course people use it. It's just that this is nothing they talk about.
Re: ATTN Mac users: Cocoa back end testing needed
Some peculiarities:
Reproduce by standing in the same spot.
fps seems to be capped at 56, although that might just be because of how it is calculated, doesn't seem jerky.
Also, using the default keyboard controls causes switching tasks out of the game, so a way to disable some of those shortcuts might be the way to go.
Reproduce by standing in the same spot.
fps seems to be capped at 56, although that might just be because of how it is calculated, doesn't seem jerky.
Also, using the default keyboard controls causes switching tasks out of the game, so a way to disable some of those shortcuts might be the way to go.
-
Blzut3
-

- Posts: 3215
- Joined: Wed Nov 24, 2004 12:59 pm
- Operating System Version (Optional): Kubuntu
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
- Contact:
Re: ATTN Mac users: Cocoa back end testing needed
This is normal.cacouser wrote:Reproduce by standing in the same spot.
Even though I would find a 56Hz display a bit odd, is vid_vsync off? It's possible that's just as fast as your processor goes, although that would surprise me a little since your specs aren't that much lower than my Mac Mini.cacouser wrote:fps seems to be capped at 56, although that might just be because of how it is calculated, doesn't seem jerky.
I would be highly surprised if OS X allows a program to disable the short cuts, but I defer to _mental_.cacouser wrote:Also, using the default keyboard controls causes switching tasks out of the game, so a way to disable some of those shortcuts might be the way to go.
Re: ATTN Mac users: Cocoa back end testing needed
Yes, it's all or nothing as far as I know. Display capturing turns off all system shortcuts. Use SDL-based version for thatBlzut3 wrote:I would be highly surprised if OS X allows a program to disable the short cuts, but I defer to _mental_.cacouser wrote:Also, using the default keyboard controls causes switching tasks out of the game, so a way to disable some of those shortcuts might be the way to go.
BTW, what is the particular shortcut you mentioned? Ctrl+Up/Ctrl+Down?
- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: ATTN Mac users: Cocoa back end testing needed
Blzut3 wrote: Even though I would find a 56Hz display a bit odd, is vid_vsync off? It's possible that's just as fast as your processor goes, although that would surprise me a little since your specs aren't that much lower than my Mac Mini.
I got the same strange behavior with my work Mac - both with this and with GZDoom for Mac. When I disable vsync I am still locked at 56 fps but with horrible screen tearing.
Re: ATTN Mac users: Cocoa back end testing needed
I need more information about hardware and OS.Graf Zahl wrote:I got the same strange behavior with my work Mac - both with this and with GZDoom for Mac. When I disable vsync I am still locked at 56 fps but with horrible screen tearing.Blzut3 wrote: Even though I would find a 56Hz display a bit odd, is vid_vsync off? It's possible that's just as fast as your processor goes, although that would surprise me a little since your specs aren't that much lower than my Mac Mini.
- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: ATTN Mac users: Cocoa back end testing needed
I can't tell you the precise CPU type right now, only that it's 2 GHz. GPU is an Intel GMA 3000. OS is 10.9.2.
Re: ATTN Mac users: Cocoa back end testing needed
MacBook Air? Or Mac Mini? It's enough to tell the model in most cases. Apple has a site with all specs.Graf Zahl wrote:I can't tell you the precise CPU type right now, only that it's 2 GHz. GPU is an Intel GMA 3000. OS is 10.9.2.
Does change the resolution help to improve FPS? Is there any differences between fullscreen and windowed modes?
I don't have access to the given hardware, so I need to ask a lot of questions.
- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: ATTN Mac users: Cocoa back end testing needed
Doesn't all matter. The system always maxes out on 56 fps, no matter what I do. It may occasionally go a bit higher for a few frames but always go back to 56.
It's a Mac Mini, but that's all I can tell right now, the thing is in my office and I'm at home now.
It's a Mac Mini, but that's all I can tell right now, the thing is in my office and I'm at home now.
Re: ATTN Mac users: Cocoa back end testing needed
My bad. Haven't seen that for too long, didn't realize.Blzut3 wrote: This is normal.
That's the cap with vsync on, with it off, fps goes above 60, but doesn't look completely "smooth" to my eye.Even though I would find a 56Hz display a bit odd, is vid_vsync off?
I believe the shortcuts were from using ctrl + arrow keys
Re: ATTN Mac users: Cocoa back end testing needed
The 56 FPS problem does not happen to me. 59-60 FPS with VSync enabled, 100-250 with VSync disabled. Tried with internal monitor and externally connected HDMI LG TV.
MacBook Pro w/ Retina Display Mid 2012, Core i7-3615QM, HD4000/GT650M
MacBook Pro w/ Retina Display Mid 2012, Core i7-3615QM, HD4000/GT650M