mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Auto merge of #8788 - ecoal95:fix-webgl-texturing, r=jdm
webgl: Fix texturing These two tiny changes were making WebGL textures not work. It was not seen in our texturing test since it only used one texture, we render to a texture by default, and that texture was bound to `gl::TEXTURE_2D`. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8788) <!-- Reviewable:end -->
This commit is contained in:
commit
2cfcc26d9e
2 changed files with 5 additions and 2 deletions
|
@ -171,6 +171,9 @@ impl WebGLPaintTask {
|
|||
CanvasWebGLMsg::DrawingBufferHeight(sender) =>
|
||||
self.send_drawing_buffer_height(sender),
|
||||
}
|
||||
|
||||
// FIXME: Convert to `debug_assert!` once tests are run with debug assertions
|
||||
assert!(gl::get_error() == gl::NO_ERROR);
|
||||
}
|
||||
|
||||
/// Creates a new `WebGLPaintTask` and returns the out-of-process sender and the in-process
|
||||
|
@ -259,7 +262,7 @@ impl WebGLPaintTask {
|
|||
}
|
||||
|
||||
fn create_texture(&self, chan: IpcSender<Option<NonZero<u32>>>) {
|
||||
let texture = gl::gen_framebuffers(1)[0];
|
||||
let texture = gl::gen_textures(1)[0];
|
||||
let texture = if texture == 0 {
|
||||
None
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue