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

Configure the control to allow transparency #71

Merged
merged 2 commits into from Jun 18, 2022

Conversation

luiscuenca
Copy link

Issue 59

Changing the frame buffer format to A8R8G8B8, the alpha channel of the color passed to the function GL.ClearColor will determine now the level of transparency of the control.

Format.X8R8G8B8,// this is like A8 R8 G8 B8, but avoids issues with Gamma correction being applied twice.
format,// this is like A8 R8 G8 B8, but avoids issues with Gamma correction being applied twice.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this comment hold up? Is gamma correction applied twice with the A8R8G8B8 format?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what that comment is referring to. Enabling automatic gamma correction by including GL.Enable(EnableCap.FramebufferSrgb); on the example, does not have any effect on final render. But just in case, this is reasoning behind making this format configurable.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have removed this comment on my last commit. If there is a specific example where gamma correction is a problem, I could take a look.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@varon do you remember what this is about?
The comment was added in this commit: 4bb4064

@NogginBops
Copy link
Member

I'm still slightly suspicious of the gamma thing, hopefully varon can answer what that was about.
But otherwise I think this is a good addition.

Really appreciate the PR, hopefully I'll have some time soon to make a new release of this package with this PR in it.

@ypicard
Copy link

ypicard commented Jun 16, 2022

This is a fantastic addition! Could we hope to see this merged soon? Thanks to you both.

@NogginBops NogginBops added this to the 4.2.0 milestone Jun 17, 2022
@NogginBops NogginBops added enhancement New feature or request 4.0 labels Jun 17, 2022
@NogginBops
Copy link
Member

I will merge this, and if this results in gamma issues I hope that people will open an issue here so we can fix it in that case.

@NogginBops NogginBops merged commit 9ae5542 into opentk:master Jun 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.0 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants