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

Cannot draw anything transparent (non trivial alpha) #23

Open
1m1-github opened this issue Sep 6, 2023 · 3 comments
Open

Cannot draw anything transparent (non trivial alpha) #23

1m1-github opened this issue Sep 6, 2023 · 3 comments

Comments

@1m1-github
Copy link

I am not able to produce a partially transparent drawing, no matter which value for alpha i use

example:

using MiniFB

WIDTH=800
HEIGHT=600
window = mfb_open_ex("My Window", WIDTH, HEIGHT, MiniFB.WF_RESIZABLE)

buffer = zeros(UInt32, WIDTH*HEIGHT)
alpha = 0
while true
    
    x = reinterpret(UInt32, [UInt8(100),UInt8(0),UInt8(0), UInt8(alpha%255)])[1]
    alpha += 1
    buffer = fill(x, WIDTH*HEIGHT)

    state = mfb_update(window,buffer)
    if state != MiniFB.STATE_OK
        break
    end
end
@1m1-github
Copy link
Author

1m1-github commented Sep 6, 2023

should add:
this is on newest macOS (M1) and newest julia

@1m1-github
Copy link
Author

is transparency supposed to work? is there any example anyone can share please? ty

@aviks
Copy link
Owner

aviks commented Sep 8, 2023

is transparency supposed to work

Don't no, really. Does it work in a simple C program? As you know, this is a simple wrapper around the C library.

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

2 participants