Skip to content
This repository has been archived by the owner on Apr 15, 2023. It is now read-only.

Black Window with WINDOW_TRANSPARENT #77

Open
qb-0 opened this issue Jun 4, 2022 · 1 comment
Open

Black Window with WINDOW_TRANSPARENT #77

qb-0 opened this issue Jun 4, 2022 · 1 comment

Comments

@qb-0
Copy link

qb-0 commented Jun 4, 2022

Heya,

I don't get a transparent framebuffer with the window state. Not sure if it's a issue on my end, a issue with raylib itself or with the wrapper.

echo isWindowState(WINDOW_TRANSPARENT) returns false

import nimraylib_now

const screenWidth = 1000
const screenHeight = 1000

setWindowState(WINDOW_TRANSPARENT)
initWindow screenWidth, screenHeight, "Window"

while not windowShouldClose():
    drawLine 500, 0, 500, getScreenHeight(), fade(LIGHTGRAY, 0.6)
    echo isWindowState(WINDOW_TRANSPARENT)
    clearBackground Blank
    endDrawing()
closeWindow()

Bildschirmfoto vom 2022-06-04 07-09-07

@greenfork
Copy link
Owner

You can use core_window_flags example as a reference

setConfigFlags(VsyncHint or Msaa4xHint or WindowHighdpi)

adding or WindowTransparent to the list activates transparency. For me it is also black screen.

You can check the C version as well
https://github.com/raysan5/raylib/blob/0851960397f02a477d80eda2239f90fae14dec64/examples/core/core_window_flags.c#L39

adding | FLAG_WINDOW_TRANSPARENT will activate transparency. Compiles with gcc -lraylib -lm core_window_flags.c on Linux. For me same effect - black screen.

I suppose this is a question for a general topic on discord, I saw that you asked it in a Nim-specific channel.

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

No branches or pull requests

2 participants