-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSX White Screen on first game loop interaction / Infinite loop freezing #224
Comments
Does it hang in the Also, could you provide a minimal repro (or your whole project if it's open source) so I can try and reproduce it under Linux? EDIT: can you try cloning this repo and running |
Hello @Gustorn, thanks for replying 👍 It seems that the infinite loop is hanging it.. Im not sure though if its Rust or C. The libtcod I compiled has samples that work correctly but Im not sure about the bundled version. How can I check that? tcod-rs samples also show the white screen. This is my current code -> https://gist.github.com/paezao/0babb33796b588dbd3d812bde6b3e5ec |
Unfortunately it just works on Linux, so this will probably be difficult to debug (unless someone with OSX shows up). As for checking the bundled version:
#include "include/libtcod.hpp"
int main() {
TCODConsole::initRoot(80, 60, "Test", false);
while (!TCODConsole::isWindowClosed()) {
TCODSystem::checkForEvent(TCOD_EVENT_KEY_PRESS, NULL, NULL);
TCODConsole::root->clear();
TCODConsole::root->putChar(40, 30, '@');
TCODConsole::flush();
}
return 0;
}
If this works then the problem is on our end: either a What you can also try is using a different renderer, by doing something like this: let mut root = Root::initializer()
.font("arial10x10.png", FontLayout::Tcod)
.font_type(FontType::Greyscale)
.size(SCREEN_WIDTH, SCREEN_HEIGHT)
.title("Roguerust")
.renderer(Renderer::GLSL) // or Renderer::OpenGL
.init(); Try both alternative renderers and see if any of them works ( |
Hello @Gustorn, This example also does flash the screen with white. It seems to be a problem with It does work correctly with |
It seems to work on my Mac.
@paezao Does the C++ example works for you with a different renderer? |
Have you installed SDL1? I don't know why it would even start without it, but you could try running |
|
I'm out of ideas. As far as I can tell OSX is not even officially supported by |
Hello,
Im having trouble in OSX. It shows a white screen and then renders correctly but only if I use
root.wait_for_keypress(true);
If I don't use
root.wait_for_keypress(true);
then it just freezes and doesn't even show the window.White screen screenshot: https://screencloud.net/v/uYLD
The text was updated successfully, but these errors were encountered: