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.setValues(0, 0, width.toDouble(), height.toDouble());
  scissor.setValues(0, 0, width.toDouble(), height.toDouble());
}