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 upNew GLLimits struct to access GL "limit values". #48
Conversation
src/gl_context.rs
Outdated
| @@ -61,6 +65,7 @@ impl<Native> GLContext<Native> | |||
| let mut context = try!(Self::create(shared_with)); | |||
|
|
|||
| context.formats = GLFormats::detect(&attributes); | |||
| context.limits = GLLimits::detect(); | |||
This comment has been minimized.
This comment has been minimized.
emilio
Jan 9, 2016
Member
There should be no need to re-detect the limits here.
The formats are needed because the new attributes don't have to be the old ones, but the limits should always be the same.
src/gl_limits.rs
Outdated
| use gleam::gl::types::GLint; | ||
| use gleam::gl; | ||
|
|
||
| #[derive(Deserialize, Serialize)] |
This comment has been minimized.
This comment has been minimized.
emilio
Jan 9, 2016
Member
Probably want to derive Clone too here, to send it around without calling detect() again.
|
Left a few comments, but this looks good to me :) The CI failures are due to: rust-lang/rust#30713 |
|
Thanks, PR updated accordingly |
|
Great! LGTM |
emilio
added a commit
that referenced
this pull request
Jan 9, 2016
New GLLimits struct to access GL "limit values".
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.
simartin commentedJan 9, 2016
Implement suggestion in code review for my fix for servo issue #9097 at https://reviewable.io/reviews/servo/servo/9102#-K6p6P67OPgZjXKhbiD8