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

Draw text in Texture mode cause flickering #4702

Closed
3 of 4 tasks
sent44 opened this issue Jan 18, 2025 · 3 comments
Closed
3 of 4 tasks

Draw text in Texture mode cause flickering #4702

sent44 opened this issue Jan 18, 2025 · 3 comments

Comments

@sent44
Copy link

sent44 commented Jan 18, 2025

Please, before submitting a new issue verify and check:

  • I tested it on latest raylib version from master branch
    I don't know. I use raysan5/raylib-game-template for test on minimal reproduction.
  • 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
    I don't think this is misuse.

Issue description

Flickering when draw long string or draw string multiple time in texture mode.

Environment

Linux/Siduction Wayland KDE Plasma OpenGL 4.6.0 NVIDIA GTX 2070 driver 550.142

Issue Screenshot

No screenshot but here is video.

Screencast_20250118_071151.webm

Code Example

#include "raylib.h"

int main(){
    InitWindow(800, 450, "");
    RenderTexture2D unusedtexture = LoadRenderTexture(200, 200);

    while(!WindowShouldClose()){
        BeginTextureMode(unusedtexture);
        DrawText("number: 10", 10, 10, 20, BLACK);
        // Comment below draw text to unflickering
        // Comment other but change text to long string will still flickering
        DrawText("number: 10", 10, 40, 20, RED);
        DrawText("number: 10", 10, 70, 20, GREEN);
        DrawText("number: 10", 10, 100, 20, BLUE);
        EndTextureMode();

        BeginDrawing();
        ClearBackground(RAYWHITE);
        DrawText("This and FPS counter are flickering.", 20, 200, 20, BLACK);
        DrawFPS(10, 10);
        EndDrawing();
    }
    UnloadRenderTexture(unusedtexture);
    CloseWindow();
    return 0;
}
@sent44 sent44 changed the title Draw string in Texture mode cause flickering Draw text in Texture mode cause flickering Jan 18, 2025
@sent44
Copy link
Author

sent44 commented Jan 18, 2025

@asdqwe wayland

@sent44
Copy link
Author

sent44 commented Jan 18, 2025

I attempt to test on x11 on my machine but computer freeze up in x11 for some reason.
Setting target FPS at 1 is still flickering, I forgot to mention before.
But oddly enough if I don't cache render texture variable, it is flickering less.

@sent44
Copy link
Author

sent44 commented Jan 18, 2025

@asdqwe I install 560 driver and it is now working. Maybe I config driver wrong somehow before or 550 has bug.
Thank you for assisting in this issue.

@sent44 sent44 closed this as completed Jan 18, 2025
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