- throw InvalidState("Textures storage may only be specified once");
- if(w==0 || h==0 || d==0)
- throw InvalidParameterValue("Invalid texture dimensions");
-
- width = w;
- height = h;
- depth = d;
- ifmt = f;
-
- image(0, ifmt, UNSIGNED_BYTE, 0);
+ throw invalid_operation("Texture3D::storage");
+ if(wd==0 || ht==0 || dp==0)
+ throw invalid_argument("Texture3D::storage");
+ require_pixelformat(fmt);
+
+ width = wd;
+ height = ht;
+ depth = dp;
+ ifmt = fmt;