mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
webgl: Fix texturing
These two tiny changes were making WebGL textures not work. It was not seen in our texturing test since we render to a texture by default, and that texture was bound to `gl::TEXTURE_2D`.
This commit is contained in:
parent
2be60be062
commit
3af24ed119
2 changed files with 2 additions and 2 deletions
|
@ -257,7 +257,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 {
|
||||
|
|
|
@ -70,7 +70,7 @@ impl WebGLTexture {
|
|||
self.target.set(Some(target));
|
||||
}
|
||||
|
||||
self.renderer.send(CanvasMsg::WebGL(CanvasWebGLMsg::BindTexture(self.id, target))).unwrap();
|
||||
self.renderer.send(CanvasMsg::WebGL(CanvasWebGLMsg::BindTexture(target, self.id))).unwrap();
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue