Closed Yoshiyuka closed 9 years ago
I've resolved the "missing :camera" error by doing the following
(update! screen :camera (orthographic) :renderer (stage))
I'm not sure if this should be necessary though as from what I'm reading in the libgdx docs about Stage, shouldn't it have a camera associated with it already that could be used?
Thanks!
I don't currently use the camera built into the stage, so you must create it explicitly. As for the issue regarding table contents disappearing, I am confused. I cloned your project and ran it, and I see the word "Title". I do not see anything appear and then disappear. Perhaps if you can narrow it down to a smaller amount of code, it would help. Right now, there is a lot of stuff going on.
That's the confusing thing for me as well. It might happen or it might not. There's nothing that indicates when or why its going to happen. This is what it looks like when the labels disappear from the table with :debug-all set for the table:
I've removed :on-resize completely and this still happens. Puzzling.
Further investigation reveals that the GC is having a heart attack. It's probably not the smartest thing to create a new object every render frame. My guess is that the labels disappear when there's limited-to-no memory left.
Thanks for the follow up.
Hello again. I've come across another "issue" which I'm perceiving to be a bug of some sort. In my current project I'm working on the UI of my game and I have things set up so that the namespaces get reloaded whenever a save is detected. I create new UI entities every render frame to see these changes happen in the game window immediately without any input from me after saving the file.
I haven't determined the cause, but certain UI elements will suddenly disappear (for instance, the label I've added to the table element). There's no rhyme or reason to it and I've tried to reproduce it.
My code:
After an element disappears, I decided to try resizing the game window to see what happens. I get a blue screen (clear color is black though). I attempt to restart from the repl with
(on-gl (set-screen! closure main-screen))
and get the following error dump:Here's a screenshot of the end result: