Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport creating offscreen contexts using ANGLE #140
Merged
+56
−58
Conversation
|
LGTM, not sue why we're passing API types by reference rather than by value, but that's just a matter of taste. |
| @@ -35,16 +35,16 @@ impl<Native> GLContext<Native> | |||
| api_version: GLVersion, | |||
| shared_with: Option<&Native::Handle>) | |||
| -> Result<Self, &'static str> { | |||
| Self::create_shared_with_dispatcher(api_type, api_version, shared_with, None) | |||
| Self::create_shared_with_dispatcher(&api_type, api_version, shared_with, None) | |||
This comment has been minimized.
This comment has been minimized.
asajeffrey
Jul 10, 2019
Member
Nit: not sure it's worth making a reference here, copying a GlType shouldn't be that expensive?
This comment has been minimized.
This comment has been minimized.
| // On OpenGLES 2 detect via extensions if the GPU supports RGB8 and RGBA8 renderbuffer/texture storage formats. | ||
| // GL_ARM_rgba8 extension is similar to OES_rgb8_rgba8, but only exposes RGBA8. | ||
| let has_rgb8 = api_version.major_version() >= 3 || extensions.iter().any(|s| s == "GL_OES_rgb8_rgba8"); | ||
| let has_rgba8 = has_rgb8 || extensions.iter().any(|s| s == "GL_ARM_rgba8"); | ||
|
|
This comment has been minimized.
This comment has been minimized.
|
@bors-servo r=asajeffrey |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
jdm commentedJul 10, 2019
This ensures that the GL functions are loaded from the appropriate DLL when EGL is in use, and that the right formats are selected based on GL/GLES rather than hardcoded by platform.