webgl: texture: Make initialize only mark as initialized the current face

Also refactor a bit the code, and remove the unused `is_initialized`
flag.
This commit is contained in:
Emilio Cobos Álvarez 2016-04-20 20:27:37 +02:00
parent 21e2f97cfa
commit d152c7fe88
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 31 additions and 15 deletions

View file

@ -389,7 +389,8 @@ impl WebGLRenderingContext {
// TODO(emilio): Flip Y axis if necessary here
// TexImage2D depth is always equal to 1
handle_potential_webgl_error!(self, texture.initialize(width as u32,
handle_potential_webgl_error!(self, texture.initialize(target,
width as u32,
height as u32, 1,
internal_format,
level as u32));