-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add Etc2 texture format support. #6864
Conversation
I really need the ETC2 texture formats. 😃 |
@@ -35,7 +35,7 @@ public class GraphicsContext : IGraphicsContext | |||
{ | |||
public GraphicsContext () | |||
{ | |||
Context = new EAGLContext (EAGLRenderingAPI.OpenGLES2); | |||
Context = new EAGLContext (EAGLRenderingAPI.OpenGLES3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation is sparse, so I don't know what happens here if the device does not support GLES3. I assume it will either throw or return null. I don't see an easy way to fallback to GLES2 in the API. I think we need to create a context and use glGetString
to check the supported version if we want to continue to support GLES2.
Not sure if we should still support GLES2 on iOS though. A quick search indicates iPhone supported GLES3 in iOS 7+ since iPhone 5S/iPad Air.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, iOS devices have good upgrade rate to latest version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah i think for now it would be best to fallback to GLES2 if possible. It would suck to hurt install base of existing users unless we really have to.
if (major >= 3) | ||
Context = new EAGLContext (EAGLRenderingAPI.OpenGLES3); | ||
else | ||
Context = new EAGLContext (EAGLRenderingAPI.OpenGLES2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just added the fallback check. Could you be sure this is capable? @tomspilman @Jjagg
Commit Edit: Init EGALContext with GLES3 if ios version is 7 or above. |
Yeah, this is great! Thanks @ryancheung! |
No description provided.