Skip to content
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

Issues with BeginDrawing and EndDrawing when creating a Basic Window #3630

Closed
4 tasks done
jcsmurph opened this issue Dec 12, 2023 · 5 comments
Closed
4 tasks done

Issues with BeginDrawing and EndDrawing when creating a Basic Window #3630

jcsmurph opened this issue Dec 12, 2023 · 5 comments

Comments

@jcsmurph
Copy link

Please, before submitting a new issue verify and check:

  • I tested it on latest raylib version from master branch
  • I checked there is no similar issue already reported
  • I checked the documentation on the wiki
  • My code has no errors or misuse of raylib

Issue description

Trying to create a basic window in WSL Ubuntu, the BeginDrawing() and EndDrawing() are not drawing to screen size.

Environment

Platform: WSL
Operating System: Ubuntu
OpenGL version: OpenGL version string: 4.2 (Compatibility Profile) Mesa 23.0.4-0ubuntu1~22.04.1
GPU: NVIDIA 3070

Issue Screenshot

image

Code Example

#include <raylib.h>

int main() {

  InitWindow(800, 450, "Hello World");

  while (!WindowShouldClose()) {
    BeginDrawing();
    ClearBackground(BLACK);
    DrawText("Hello World", 10, 10, 20, WHITE);
    EndDrawing();
  }

  CloseWindow();
  return 0;
}

More info:

I get the same results with the examples provided and the game-premade package. If I run it with breakpoints, the image will be cleaned up when I click on the window but the issue will occur on each iteration of EndDrawing():

image

Seems others may be having this issue as well Raylib glitches and windows size.

I ran all the same tests on my Windows Machine (Windows 10) and the issue did not occur.

@ghost
Copy link

ghost commented Dec 12, 2023

@jcsmurph I could be wrong, but I don't think WSL is supported.

Either way, if you're on Windows, mingw/gcc is likely a better alternative. More info at the wiki.

@jcsmurph
Copy link
Author

@ubkp Thanks for the info! I saw some others who had success setting it up in WSL so was hoping I could as well. But not much can be done if WSL isn't supported. Weirdly enough, it worked just fine this morning for about 5 minutes before the issue occurred again.

If need be, I will use my Windows setup.

@ghost
Copy link

ghost commented Dec 12, 2023

@jcsmurph Yeah, I really don't know what's the current status of WSL support. Perhaps you could check on https://discord.gg/raylib if anyone there got it working.

@jcsmurph
Copy link
Author

Cool. Going to close this out then. Thanks!

@jcsmurph
Copy link
Author

Adding a quick note in case others read this:

This is a new WSL issue with GUI applications:

microsoft/wslg#1148

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant