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

Android build and crash fixes #92

Merged
merged 2 commits into from Jul 30, 2014
Merged

Android build and crash fixes #92

merged 2 commits into from Jul 30, 2014

Conversation

@mbrubeck
Copy link
Contributor

mbrubeck commented Jul 29, 2014

Fixes load_shader failing on Android due to an unrelated error flag. Also silences some compiler warnings.

@@ -123,13 +124,9 @@ pub fn load_shader(source_string: &str, shader_type: GLenum) -> GLuint {
shader_source(shader_id, [ source_string.as_bytes() ]);
compile_shader(shader_id);

if get_error() != NO_ERROR {

This comment has been minimized.

@glennw

glennw Jul 30, 2014

Member

I think what we should do here is still check the error, but make sure that get_error() is cleared before we try to compile a shader. You can do this by calling get_error() in a loop until it returns NO_ERROR (see http://www.khronos.org/opengles/sdk/docs/man/xhtml/glGetError.xml for details).

mbrubeck added 2 commits Jul 29, 2014
This code was failing on Android because of an error flag set during an
earlier operation (`enable(TEXTURE_2D)`).  The logging was also broken because
get_error was called twice.
@glennw
Copy link
Member

glennw commented Jul 30, 2014

r+

glennw added a commit that referenced this pull request Jul 30, 2014
Android build and crash fixes
@glennw glennw merged commit d816c7c into servo:master Jul 30, 2014
mbrubeck added a commit to servo/servo that referenced this pull request Aug 1, 2014
Fixes accidental revert of servo/rust-layers#92.
glennw pushed a commit to glennw/servo that referenced this pull request Aug 5, 2014
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.