I have a project that sometimes when I open it nothing draws, just the background color (checked by having mousepressed change the background color). At first I thought it was project specific, like I made a mistake in how I draw stuff but if an error comes up there's also a chance that it will just show that baby baby blue (which I'm guessing is the background color).
What can cause this? Changing default filters? Shaders?(though I didn't mess with those).
What can cause love2d not to draw
- Gunroar:Cannon()
- Party member
- Posts: 1143
- Joined: Thu Dec 10, 2020 1:57 am
Re: What can cause love2d not to draw
Is it just text that don't get drawn, or all graphics? It has happened that text has gotten corrupted for me, but only while I was recording the game with Fraps. It was weird indeed.
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
"If each mistake being made is a new one, then progress is being made."
Re: What can cause love2d not to draw
I've experienced some weird behaviour with auto-batching; some missing tiles for example. But nothing so extreme as nothing at all being drawn, like you're describing.
- Gunroar:Cannon()
- Party member
- Posts: 1143
- Joined: Thu Dec 10, 2020 1:57 am
Re: What can cause love2d not to draw
It's weird because it doesn't happen all the time and seems random. I wasn't going to make a topic because I thought it was too specific to my project and I'll have to work with it but the error screen also being blank really got me puzzled.
Nothing draws. In the error screen it's just the blue background, so no text, and in my game that draws images nothing appears except for the white background. I made it change to black and then zoom out to see whether things were in the wrong position but it shows nothing still (+log output says the position of things I'm drawing is correct, 0x, 0y for example).
Nothing draws. In the error screen it's just the blue background, so no text, and in my game that draws images nothing appears except for the white background. I made it change to black and then zoom out to see whether things were in the wrong position but it shows nothing still (+log output says the position of things I'm drawing is correct, 0x, 0y for example).
Re: What can cause love2d not to draw
Please attach the minimal code example .love file with the issue.
Re: What can cause love2d not to draw
I just ran into the empty blue screen myself. It happened while I had a shader active, so that's a possible cause; it looks like Löve is not restoring a clean context for displaying error messages. Sorry, no, the shader was not active; the error happened while compiling the shader.
The cause seems to be that I had set the environment variable LOVE_GRAPHICS_USE_OPENGLES=1. The error was:
The cause seems to be that I had set the environment variable LOVE_GRAPHICS_USE_OPENGLES=1. The error was:
Code: Select all
Error: [love "boot.lua"]:282: Cannot compile vertex shader code:
0(105) : error C7506: OpenGL/ES does not define the global function texture3D
stack traceback:
[love "boot.lua"]:345: in function <[love "boot.lua"]:341>
[C]: in function 'setMode'
[love "boot.lua"]:282: in function <[love "boot.lua"]:126>
[C]: in function 'xpcall'
[love "boot.lua"]:355: in function <[love "boot.lua"]:348>
- Gunroar:Cannon()
- Party member
- Posts: 1143
- Joined: Thu Dec 10, 2020 1:57 am
Re: What can cause love2d not to draw
Here's my project, using my notorious coding style. The game starts from deadend/game.lua if that helps. Didn't really want to share the ... messy(?) code but ...
It can take a few runs before it shows a blank white screen (I set the background color to white, if you press the mouse the color becomes black, though you won't be able to tell unless it does the strange phenomenon.
Any key press will toggle zooming in/zooming out of the screen and make the background color change.
It can take a few runs before it shows a blank white screen (I set the background color to white, if you press the mouse the color becomes black, though you won't be able to tell unless it does the strange phenomenon.
Any key press will toggle zooming in/zooming out of the screen and make the background color change.
- Attachments
-
- lovegame.love
- (605.05 KiB) Downloaded 89 times
Re: What can cause love2d not to draw
I can not reproduce it on my system but I have also experienced similar, except in my case sprites were not simply just not drawn but they were not initialised at all and for example, collision detection failed too. My solution to that was to move all my initialisation code out of love.load just to the top of the code. I have not experienced this problem since. So in my case it was cause by love.load and I try to avoid using it since.
No idea if it solves your problem but figured it worth sharing, maybe helps.
No idea if it solves your problem but figured it worth sharing, maybe helps.
Re: What can cause love2d not to draw
I can't reproduce it either.
- slime
- Solid Snayke
- Posts: 3166
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: What can cause love2d not to draw
Maybe it's a graphics driver problem - what GPU and operating system do you have, and are you using the latest available drivers for your GPU?
Who is online
Users browsing this forum: Semrush [Bot] and 1 guest