class CameraPannel : DockPanel {
    FrameBuffer frameBuffer;
    Environment mainEnv;

    void onRender() {
        if (!frameBuffer.isValid())
            return;
            
        int x = UI::getAvailableSizeX();
        int y = UI::getAvailableSizeY();

        if (x < 10 || y < 10)
            return;

        frameBuffer.resize(x, y);
        frameBuffer.clearRGBA(0, 0, 0, 255);

        UI::drawFrameBufferCentered(frameBuffer, x, y);

    }

    void onInit() {
        frameBuffer = Engine::createRGBA8FrameBuffer("MainFrameBuffer", 400, 400);
        mainEnv = Engine::getMainEnvironment();

        UI::disablePannelPadding(true);
    }

}
                                                