public Framebuffer(int width, int height) { this.width = width; this.height = height; // Cache the total size of the pixel array and initialize pixelCount = width * height; pixels = new int[pixelCount]; }