Hey everyone, I'm working on a project currently and I'm having an issue with my Graphics settings UI.
I'm using several libraries from this forum, all with due credit I assure you, and at first it seemed as though these complexities in my code could have been the cause of this issue but after running a clean environment of only resizing the window to various resolutions as the list from love.window.getFullscreenModes() entails, larger screens than can fit on my screen shut the application down. So why is this? Is there something I'm not doing correctly?
TL;DR What's the appropriate way to go about resolutions in this sense. I'm talking mainly about graphic settings (fullscreen, borderless fullscreen, windowed) with resolutions pulled from the machine.
Downsampling issues
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Downsampling issues
Post your code or love file and we can help you.
-
- Prole
- Posts: 41
- Joined: Thu Sep 05, 2013 8:48 pm
Re: Downsampling issues
For some strange reason it's working today... Before when I would change the size it would occasionally crash the program but it seems to not be doing that after I haven't touched the code. It's strange. Perhaps a computer issue? My testing code was very simple, I have it below. There are some strange flickers from odd-ball resolutions but I think this is expected? Should I also expect some resolutions to render partially off screen in fullscreen mode? I know I see this a lot from games like League of Legends.
Edit: Does anyone know if you need to pass the flags to love.window.setMode in order to retain them. I.E. Does not passing the flags cause them to return to a default?
Code: Select all
function love.load()
res = love.window.getFullscreenModes()
resCount = table.getn(res)
cur = 1
love.window.setFullscreen(true, "desktop")
end
function love.draw()
love.graphics.print(res[cur].width .. "X" .. res[cur].height, 5, 5)
love.graphics.circle("fill", 100, 100, 10, 3)
end
function love.keypressed(key)
resize()
end
function resize()
love.window.setMode(res[cur].width, res[cur].height)
love.window.setFullscreen("normal")
if cur == resCount then
cur = 1
else
cur = cur + 1
end
end
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Downsampling issues
The flags have default values too, yes, and it doesn't retain the old settings for you.khamarr3524 wrote: Edit: Does anyone know if you need to pass the flags to love.window.setMode in order to retain them. I.E. Does not passing the flags cause them to return to a default?
-
- Prole
- Posts: 41
- Joined: Thu Sep 05, 2013 8:48 pm
Re: Downsampling issues
Could you also explain why some resolutions print partially off screen. Specifically it appears as though the "upper left hand corner" of where drawing starts goes beyond my screens to the left and occasionally up. Is this due to the DPI or ?
Re: Downsampling issues
I think it is because its possible your going beyond the resolution of what your graphics card / monitor can handlekhamarr3524 wrote:Could you also explain why some resolutions print partially off screen. Specifically it appears as though the "upper left hand corner" of where drawing starts goes beyond my screens to the left and occasionally up. Is this due to the DPI or ?
When I run this code it gives me all the possible resolutions
Code: Select all
function love.draw()
love.graphics.print(res[cur].width .. "X" .. res[cur].height, 5, 5)
love.graphics.circle("fill", 100, 100, 10, 3)
for _, r in pairs(res) do
love.graphics.print(_.." ) width "..r.width.." height "..r.height, 10, 25*_)
end
end
-
- Prole
- Posts: 41
- Joined: Thu Sep 05, 2013 8:48 pm
Re: Downsampling issues
It's most likely the monitor. I'm only pulling the valid resolutions via love.window.getFullscreenModes() though so idk why that would be an issue. Specifically, I was using only the valid dimensions for my monitor that is being rendered to.
Who is online
Users browsing this forum: No registered users and 207 guests