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

More convenient pixel format strings #13

Open
annevk opened this issue May 2, 2017 · 4 comments
Open

More convenient pixel format strings #13

annevk opened this issue May 2, 2017 · 4 comments

Comments

@annevk
Copy link

annevk commented May 2, 2017

"10-10-10-2" doesn't seem great. Are there no names for this kind of thing we could use?

@junov
Copy link
Member

junov commented May 2, 2017

OpenGL uses this notation: RGB10_A2

@annevk
Copy link
Author

annevk commented May 2, 2017

Converted to a string enum that would be "rgb10-a2", which seems more reasonable to me.

@yell0wd0g
Copy link

yell0wd0g commented Jan 5, 2019

It was indeed surprising to see float16, 8-8-8-8 (and, in the WhatWG Spec PR, 10-10-10-2). I guess the idea of avoiding OpenGL's Sized Internal Format (GL_RGBA16F, GL_RGBA8 and GL_RGB10_A2, respectively), is to not specify the channel endianness and using instead what the platform provides.

Alternatively, what we can do is to use OpenGL's Type which will give us: GL_UNSIGNED_BYTE, GL_UNSIGNED_INT_2_10_10_10_REV and GL_HALF_FLOAT, specifying the storage of the channels but leaving the channels undefined.

@fserb WDYT?

OpenGL's relevant Spec is glTexImage2D, see the Table 2 here.

@yell0wd0g
Copy link

I see now that 10-10-10-2 (and 12-12-12-12, for the case) were removed in #22 in an effort to simplify the options offered.

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

3 participants