setSize method

  1. @override
void setSize(
  1. int width,
  2. int height, [
  3. int depth = 1
])
override

Implementation

@override
void setSize(int width, int height, [int depth = 1]) {
  if (this.width != width || this.height != height || this.depth != depth) {
    this.width = width;
    this.height = height;
    this.depth = depth;

    texture.image!.width = width;
    texture.image!.height = height;
    texture.image!.depth = depth;

    dispose();
  }

  viewport.set(0, 0, width, height);
  scissor.set(0, 0, width, height);
}