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

Replace the use of glBlitFramebuffer in glwindow by a shader #161

Merged
merged 2 commits into from Apr 24, 2020

Conversation

@asajeffrey
Copy link
Member

asajeffrey commented Apr 23, 2020

This doesn't change much by itself, but means we can use more interesting shaders later on.

void main() {
ivec2 size = textureSize(image, 0);
vec2 position = vec2(gl_FragCoord.x / size.x, gl_FragCoord.y / size.y);
color = texture(image, position);

This comment has been minimized.

@pcwalton

pcwalton Apr 24, 2020

Contributor

This is fine, but I just use

// vertex shader
out vec2 vTexCoord;
...
void main() {
    gl_Position = vec4(coord, 0.0, 1.0);
    vTexCoord = coord * 0.5 + 0.5;
}

// fragment shader
...
in vec2 vTexCoord;
void main() {
    color = texture(image, vTexCoord);
}

This comment has been minimized.

@asajeffrey

asajeffrey Apr 24, 2020

Author Member

Done.

@asajeffrey
Copy link
Member Author

asajeffrey commented Apr 24, 2020

@Manishearth
Copy link
Member

Manishearth commented Apr 24, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Apr 24, 2020

📌 Commit f5ac8e0 has been approved by Manishearth

@bors-servo
Copy link
Contributor

bors-servo commented Apr 24, 2020

Testing commit f5ac8e0 with merge 6a32e93...

@bors-servo
Copy link
Contributor

bors-servo commented Apr 24, 2020

☀️ Test successful - checks-travis
Approved by: Manishearth
Pushing 6a32e93 to master...

@bors-servo bors-servo merged commit 6a32e93 into servo:master Apr 24, 2020
3 checks passed
3 checks passed
Travis CI - Pull Request Build Passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
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

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