-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
PixelFormat::R8/A8 and GLES 2.0 #1829
Comments
@smilediver |
@smilediver |
I would prefer for this to be handled on the engine side, since the engine's whole purpose is to abstract out such minor platform differences. But if people don't see this as something useful, then I'll close the issue. |
Can by done #1839 and GLES2 will emulate R8 RG8 via:
|
GLES 2.0 for single channel textures used PixelFormat::A8, but in GLES 3.0 it was removed in favor of PixelFormat::R8. It seems like all other graphics APIs also use PixelFormat::R8. Our and Axmol code is full of hacks like these:
auto pixelFormat = AX_GLES_PROFILE == 200 ? PixelFormat::A8 : PixelFormat::R8;
Maybe it's worth to make
PixelFormat::A8 = PixelFormat::R8
and deal with the difference on the backend side when calling GLES api, so all code could usePixelFormat::R8
everywhere? I'm not aware of unintended consequences, but at first sight it seems it would work. There could also be a macro to help on the shader code side, something like:What do you think?
The text was updated successfully, but these errors were encountered: