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 WebGL support #99

Merged
merged 1 commit into from Dec 2, 2015
Merged

Add WebGL support #99

merged 1 commit into from Dec 2, 2015

Conversation

@emilio
Copy link
Member

emilio commented Dec 1, 2015

For now it only has support for clear/clearColor, but adding support for more is easy (see apply_webgl_command).

It depends on a few more PRs (to servo and webrender_traits) and on the webrender branch of offscreen_gl_context, that currently lacks support for OS X since I don't own a Mac, but it should fail gracefully (just returning null on context creation).

It uses the last approach discussed in #73

cc: @pcwalton @mrobinson

@@ -288,6 +288,7 @@ impl FBOId {
fn bind(&self) {
let FBOId(id) = *self;
gl::bind_framebuffer(gl::FRAMEBUFFER, id);
gl::bind_framebuffer(gl::READ_FRAMEBUFFER, id);

This comment has been minimized.

@glennw

glennw Dec 1, 2015

Member

I don't think we need this - can it be removed?

Specifically, it's not supported on android/es2, and I believe binding to FRAMEBUFFER binds to both READ_ and WRITE_FRAMEBUFFER bindings anyway.

This comment has been minimized.

@emilio

emilio Dec 1, 2015

Author Member

Yeah sure, It's been a rebase issue. Good catch, sorry!

@glennw
Copy link
Member

glennw commented Dec 1, 2015

This looks good apart from the one comment.

glennw added a commit that referenced this pull request Dec 2, 2015
@glennw glennw merged commit a98efe3 into servo:master Dec 2, 2015
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.