-
Notifications
You must be signed in to change notification settings - Fork 73
Rendering On A High DPI Screen Is Broken #46
Comments
Did you tried to remove |
Seems related to this SDL issue: http://forums.libsdl.org/viewtopic.php?t=9576&sid=090b706304f1829218c9c0f6887cce86 |
Thanks, I am completely new to Dgame and was following the tutorials so I didn't know about that. Style.OpenGL works fine, but Style.Shown and Style.HighDPI crash the process. Is that a bug?
Here is the code |
Also, changing the window call in that code to
crashes the process as well |
It shouldn't crash at all, but in your last example it crashes because OpenGL 0.0.2 does not exists. OpenGL 2.1 is needed at least, but I schould cover this, thanks. ;) |
The last argument to GLSettings is also part of the version? In the tutorial it says that it's for anti-aliasing http://dgame-dev.de/?page=tutorial&tut=gl_settings If that is not for anti-aliasing how do you add it in? Also, yes Style.OpenGL works fine, I was using Style.Default when I had the rendering error. Putting in Style.OpenGL | Style.Shown in works as well, but passing in Style.HighDPI or Style.Shown by themselves crashes the process. |
I'm sorry you're right. I was in a hurry and I've overlooked it, I thought for a momemt you put the patch level to OpenGL, not the Anti-Alias Level. :)
Yes because Besides that it I've got the feeling, that you discoverd the SDL bug which I mentioned before. I'll try to find a solution, but because I have no Mac I would like to notify you then, so that you can test that. Would that be ok? |
Sure, you can notify me. Is the anti-aliasing bug a part of the same issue? |
No I'm sure it has something to do with the absence of |
I am passing in Style.Shown like so:
|
And that makes the application crash? |
Yeah. Also, the terminal output is the same as the error output above. |
And without |
Yup. |
Seems to be an OSX issue. What is your Mac version? |
10.10.3 |
Thanks a lot, I'll examine it tonight. Sorry for your trouble. |
It's cool man, you're working for free :) |
BTW: Do you have some other OS where you can test if it works? Then we could narrow it down to OSX. |
I can boot up a linux VM. I will get back to you when I have D and SDL installed in it. |
Ok, after trying to install OpenGL 3 on linux unsuccessfully for three hours, I am giving up. I am going to try to test this on windows instead. |
Don't rush yourself. I am on Windows 8.1 Pro, 64 bit and it works like a charm. |
I figured that I should create a separate issue for this, but I might as well mention it now. For some reason, the sprite in a player class does not render while sprites defined and drawn in the main loop render fine. Here is the code which demonstrates this: https://gist.github.com/JackStouffer/77f0843449a211e76614 I have tried many different images to make sure that there wasn't something wrong with the png, but each image just renders a blank white square. |
That's not a bug, it's your fault, but maybe I should mention it somehow in the docs. ;) |
Ah, ok. I was able to fix it from your comment, thanks. |
@JackStouffer Did you tried Windows or Linux and can say me that it works? |
Oh sorry, I thought your comment implied that me testing it on Windows would be redundant because you have already tested it. I will test it on my windows machine by the end of the day. |
Each machine is different. :) Would be nice to know if it works on linux,, but since no other issues were reported I'm sure it works. |
Ok, I tried linux agian, this time on a different machine, but now I am getting this error:
I have all of the latest sdl libraries installed as well as libpng. |
AFAIK the default SDL version on linux has no PNG support (which is required for Dgame) and you have to build the SDL by yourself. But you can test it in C++ if you want: https://www.libsdl.org/projects/SDL_image/docs/SDL_image_frame.html |
I can now confirm that anti-aliasing works on linux. Specifically, this was tested with mesa OpenGL 3.0 on Ubuntu 14.04 LTS. |
With Dgame 0.5 or 0.6 or both? |
0.5 |
Thank you very much. If you find the time, it would be very helpful if you would test also Dgame 0.6 beta. |
Is it possible to download the 0.6 beta with dub? |
Yes: |
Unfortunately that causes dub to throw an error:
Here is the dub.json
|
That's odd, maybe you schould clear all Dgame specific dub stuff first. |
I deleted the stored Dgame library in ~/.dub/ and deleted dub.selections.json file, but I am still getting the same error. |
Seems to be a dub issue since it works for me. Maybe you use an outdated version? I use 0.9.23 |
I have the latest version as well
If I place "dgame": ">=0.5.0" back in everything works fine. I am going to test this on linux and see what happens. |
dub upgrade on linux works. I am going to create an issue on the dub project for this. |
Thanks a lot. And the anti-alias/High-DPI works with the 0.6? You have to enable HighDPI now by yourself. |
Well, I couldn't get the linux VM I have on my Mac with the high DPI screen to work, so the linux machine I have been testing on is on a normal 1080p screen. And I can't get dub to download the newest beta on my Mac, so I can't test it. |
Alright, then thank you very much for your effort. I will close this as this is a known bug for Mac OS. |
I wouldn't close this as we don't know for sure if the anti-aliasing is working for Mac yet. |
But Anti-Alias is not the main concern here, that was High-DPI. If Anti-Alias is not working we will see a new issue |
I am on a retina Mac Book Pro, and when the window is rendered, the actual contents of the window are rendered in the bottom left hand side of the window and do not take up the actual space.
The text object for the FPS counter is positioned at 0,0. The content is being rendered at its actual size rather than the scaled resolution.
The text was updated successfully, but these errors were encountered: