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

Add max texture size members to GLLimits #55

Merged
merged 1 commit into from May 12, 2016
Merged

Conversation

@dlrobertson
Copy link
Contributor

dlrobertson commented May 12, 2016

As discussed on IRC. Add max_tex_size and max_cube_map_size to GLLimits. I'll then switch on target to select the appropriate max.

Let me know if this is not what you had in mind.


This change is Reviewable

@@ -4,12 +4,16 @@ use gleam::gl;
#[cfg_attr(feature="serde_serialization", derive(Serialize, Deserialize))]
pub struct GLLimits {
pub max_vertex_attribs: u32,
pub max_tex_size: i32,
pub max_cube_map_size: i32

This comment has been minimized.

@emilio

emilio May 12, 2016

Member

Could you call this max_cube_map_tex_size? I think that way is clearer

@emilio
Copy link
Member

emilio commented May 12, 2016

Yes, this looks great, thanks! :-)

Could you please bump the Cargo.toml version and address the other comment?

@dlrobertson
Copy link
Contributor Author

dlrobertson commented May 12, 2016

Good point. No problem!

@@ -4,12 +4,16 @@ use gleam::gl;
#[cfg_attr(feature="serde_serialization", derive(Serialize, Deserialize))]
pub struct GLLimits {
pub max_vertex_attribs: u32,
pub max_tex_size: i32,

This comment has been minimized.

@emilio

emilio May 12, 2016

Member

Arrgh, missed this previously, sorry! This should be unsigned (texture sizes are guaranteed to be positive).

This comment has been minimized.

@dlrobertson

dlrobertson May 12, 2016

Author Contributor

Ah, true. I originally had this as unsigned, but changed it because level, width, and height are signed, but at the time of comparison they are guaranteed to be positive as well. I'll make the update.

Add max_tex_size and max_cube_map_size to GLLimits
@emilio emilio merged commit 2a4fafb into servo:master May 12, 2016
1 check was pending
1 check was pending
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@emilio
Copy link
Member

emilio commented May 12, 2016

Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.