измени код , чтобы он поддерживал ImageBuffer CPU

<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.geometry.*?>
<?import javafx.scene.canvas.Canvas?>
<?import javafx.scene.control.*?>
<?import javafx.scene.input.*?>
<?import javafx.scene.layout.*?>
<AnchorPane fx:id="anchorPane" xmlns="http://javafx.com/javafx/17.0.2-ea" xmlns:fx="http://javafx.com/fxml/1"
            fx:controller="com.cgvsu.GuiController">
    <MenuBar>
        <Menu mnemonicParsing="false" text="File">
            <MenuItem mnemonicParsing="false" onAction="#loadModelFromFile" text="Load Model">
                <accelerator>
                    <KeyCodeCombination alt="UP" code="F" control="DOWN" meta="UP" shift="UP" shortcut="UP"/>
                </accelerator>
            </MenuItem>
            <MenuItem mnemonicParsing="false" onAction="#saveModelFromFile" text="Save Model">
                <accelerator>
                    <KeyCodeCombination alt="UP" code="S" control="DOWN" meta="UP" shift="UP" shortcut="UP"/>
                </accelerator>
            </MenuItem>
        </Menu>
        <Menu mnemonicParsing="false" text="Camera Options">
            <MenuItem mnemonicParsing="false" onAction="#handleCameraForward" text="Forward">
                <accelerator>
                    <KeyCodeCombination alt="UP" code="UP" control="UP" meta="UP" shift="UP" shortcut="UP"/>
                </accelerator>
            </MenuItem>
            <MenuItem mnemonicParsing="false" onAction="#handleCameraBackward" text="Backward">
                <accelerator>
                    <KeyCodeCombination alt="UP" code="DOWN" control="UP" meta="UP" shift="UP" shortcut="UP"/>
                </accelerator>
            </MenuItem>
            <MenuItem mnemonicParsing="false" onAction="#handleCameraLeft" text="Left">
                <accelerator>
                    <KeyCodeCombination alt="UP" code="LEFT" control="UP" meta="UP" shift="UP" shortcut="UP"/>
                </accelerator>
            </MenuItem>
            <MenuItem mnemonicParsing="false" onAction="#handleCameraRight" text="Right">
                <accelerator>
                    <KeyCodeCombination alt="UP" code="RIGHT" control="UP" meta="UP" shift="UP" shortcut="UP"/>
                </accelerator>
            </MenuItem>
            <MenuItem mnemonicParsing="false" onAction="#handleCameraUp" text="Up">
                <accelerator>
                    <KeyCodeCombination alt="UP" code="W" control="UP" meta="UP" shift="UP" shortcut="UP"/>
                </accelerator>
            </MenuItem>
            <MenuItem mnemonicParsing="false" onAction="#handleCameraDown" text="Down">
                <accelerator>
                    <KeyCodeCombination alt="UP" code="S" control="UP" meta="UP" shift="UP" shortcut="UP"/>
                </accelerator>
            </MenuItem>
        </Menu>
    </MenuBar>

    <Canvas fx:id="canvas" height="870" onMouseClicked="#onClickCanvas" width="1600" AnchorPane.rightAnchor="420.0"
            AnchorPane.topAnchor="30.0"/>
    <ScrollPane layoutX="1186.0" prefHeight="900.0" AnchorPane.bottomAnchor="0.0" AnchorPane.rightAnchor="0.0"
                AnchorPane.topAnchor="0.0">
        <content>
            <VBox prefHeight="884.0" prefWidth="412.0">
                <children>
                    <Label text="Objects">
                        <VBox.margin>
                            <Insets top="5.0"/>
                        </VBox.margin>
                    </Label>
                    <TitledPane animated="false" expanded="false" text="Models">
                        <VBox.margin>
                            <Insets top="10.0"/>
                        </VBox.margin>
                        <content>
                            <VBox spacing="10">
                                <Button text="Add Model" onAction="#loadModel"/>
                                <VBox fx:id="modelsManager" prefHeight="200.0" prefWidth="100.0"/>
                            </VBox>
                        </content>
                    </TitledPane>

                    <HBox prefHeight="100.0" prefWidth="200.0">
                        <children>
                            <VBox prefHeight="100.0" prefWidth="140.0">
                                <children>
                                    <Label text="Scale"/>
                                    <HBox prefHeight="100.0" prefWidth="200.0">
                                        <children>
                                            <Label text="X:  "/>
                                            <TextField fx:id="textFieldScaleX" prefHeight="25.0" prefWidth="100.0"
                                                       promptText="0.0" text="1"/>
                                        </children>
                                    </HBox>
                                    <HBox prefHeight="100.0" prefWidth="200.0">
                                        <children>
                                            <Label text="Y:  "/>
                                            <TextField fx:id="textFieldScaleY" prefHeight="25.0" prefWidth="100.0"
                                                       promptText="0.0" text="1"/>
                                        </children>
                                    </HBox>
                                    <HBox prefHeight="100.0" prefWidth="200.0">
                                        <children>
                                            <Label text="Z:  "/>
                                            <TextField fx:id="textFieldScaleZ" prefHeight="25.0" prefWidth="100.0"
                                                       promptText="0.0" text="1"/>
                                        </children>
                                    </HBox>
                                </children>
                                <HBox.margin>
                                    <Insets/>
                                </HBox.margin>
                            </VBox>
                            <VBox prefHeight="200.0" prefWidth="140.0">
                                <children>
                                    <Label text="Rotation"/>
                                    <HBox prefHeight="100.0" prefWidth="200.0">
                                        <children>
                                            <Label text="X:  "/>
                                            <TextField fx:id="textFieldRotationX" prefHeight="25.0" prefWidth="100.0"
                                                       promptText="0.0" text="0"/>
                                        </children>
                                    </HBox>
                                    <HBox prefHeight="100.0" prefWidth="200.0">
                                        <children>
                                            <Label text="Y:  "/>
                                            <TextField fx:id="textFieldRotationY" prefHeight="25.0" prefWidth="100.0"
                                                       promptText="0.0" text="0"/>
                                        </children>
                                    </HBox>
                                    <HBox prefHeight="100.0" prefWidth="200.0">
                                        <children>
                                            <Label text="Z:  "/>
                                            <TextField fx:id="textFieldRotationZ" prefHeight="25.0" prefWidth="100.0"
                                                       promptText="0.0" text="0"/>
                                        </children>
                                    </HBox>
                                </children>
                            </VBox>
                            <VBox prefHeight="200.0" prefWidth="140.0">
                                <children>
                                    <Label text="Translation"/>
                                    <HBox prefHeight="100.0" prefWidth="200.0">
                                        <children>
                                            <Label text="X:  "/>
                                            <TextField fx:id="textFieldTranslationX" prefHeight="25.0" prefWidth="100.0"
                                                       promptText="0.0" text="0"/>
                                        </children>
                                    </HBox>
                                    <HBox prefHeight="100.0" prefWidth="200.0">
                                        <children>
                                            <Label text="Y:  "/>
                                            <TextField fx:id="textFieldTranslationY" prefHeight="25.0" prefWidth="100.0"
                                                       promptText="0.0" text="0"/>
                                        </children>
                                    </HBox>
                                    <HBox prefHeight="100.0" prefWidth="200.0">
                                        <children>
                                            <Label text="Z:  "/>
                                            <TextField fx:id="textFieldTranslationZ" prefHeight="25.0" prefWidth="100.0"
                                                       promptText="0.0" text="0"/>
                                        </children>
                                    </HBox>
                                </children>
                            </VBox>
                        </children>
                        <VBox.margin>
                            <Insets left="5.0" top="10.0"/>
                        </VBox.margin>
                    </HBox>
                    <Button mnemonicParsing="false" onAction="#recalculationOfNormals" text="Recalculate the normals">
                        <VBox.margin>
                            <Insets left="5.0" top="10.0"/>
                        </VBox.margin>
                    </Button>
                    <Button mnemonicParsing="false" onAction="#returnToTheStartingPosition"
                            text="Return to the starting position">
                        <VBox.margin>
                            <Insets left="5.0" top="10.0"/>
                        </VBox.margin>
                    </Button>
                    <VBox prefHeight="200.0" prefWidth="100.0">
                        <children>
                            <Label text="Rendering mode">
                                <VBox.margin>
                                    <Insets top="10.0"/>
                                </VBox.margin>
                            </Label>
                            <CheckBox fx:id="checkBoxDrawPolygonalGrid" mnemonicParsing="false"
                                      text="Draw a polygonal grid">
                                <VBox.margin>
                                    <Insets top="10.0"/>
                                </VBox.margin>
                            </CheckBox>
                            <CheckBox fx:id="fillPolygons" mnemonicParsing="false"
                                      text="Fill Polygons">
                                <VBox.margin>
                                    <Insets top="10.0"/>
                                </VBox.margin>
                            </CheckBox>
                            <CheckBox fx:id="checkBoxUseTexture" mnemonicParsing="false" text="Use texture">
                                <VBox.margin>
                                    <Insets top="10.0"/>
                                </VBox.margin>
                            </CheckBox>
                            <CheckBox fx:id="checkBoxUseLighting" mnemonicParsing="false" text="Use lighting">
                                <VBox.margin>
                                    <Insets top="10.0"/>
                                </VBox.margin>
                            </CheckBox>
                        </children>
                        <VBox.margin>
                            <Insets left="5.0"/>
                        </VBox.margin>
                    </VBox>
                    <TitledPane animated="false" text="Cameras">
                        <VBox.margin>
                            <Insets top="10.0"/>
                        </VBox.margin>
                        <content>
                            <VBox fx:id="camerasManager" prefHeight="200.0" prefWidth="100.0">
                                <children>
                                    <Button mnemonicParsing="false" onAction="#addNewCamera" text="Add a new camera"/>
                                </children>
                            </VBox>
                        </content>
                    </TitledPane>
                    <HBox prefHeight="100.0" prefWidth="200.0">
                        <children>
                            <VBox prefHeight="200.0" prefWidth="200.0">
                                <children>
                                    <Label text="Position"/>
                                    <HBox prefHeight="100.0" prefWidth="200.0">
                                        <children>
                                            <Label text="X:  "/>
                                            <TextField fx:id="textFieldCameraPositionX" promptText="0.0"/>
                                        </children>
                                    </HBox>
                                    <HBox prefHeight="100.0" prefWidth="200.0">
                                        <children>
                                            <Label text="Y:  "/>
                                            <TextField fx:id="textFieldCameraPositionY" promptText="0.0"/>
                                        </children>
                                    </HBox>
                                    <HBox prefHeight="100.0" prefWidth="200.0">
                                        <children>
                                            <Label text="Z:  "/>
                                            <TextField fx:id="textFieldCameraPositionZ" promptText="0.0"/>
                                        </children>
                                    </HBox>
                                </children>
                            </VBox>
                            <VBox prefHeight="100.0" prefWidth="200.0">
                                <children>
                                    <Label prefHeight="17.0" prefWidth="181.0" text="The point of direction"/>
                                    <HBox prefHeight="100.0" prefWidth="200.0">
                                        <children>
                                            <Label text="X:  "/>
                                            <TextField fx:id="textFieldCameraPointOfDirectionX" promptText="0.0"/>
                                        </children>
                                    </HBox>
                                    <HBox prefHeight="100.0" prefWidth="200.0">
                                        <children>
                                            <Label text="Y:  "/>
                                            <TextField fx:id="textFieldCameraPointOfDirectionY" promptText="0.0"/>
                                        </children>
                                    </HBox>
                                    <HBox prefHeight="100.0" prefWidth="200.0">
                                        <children>
                                            <Label text="Z:  "/>
                                            <TextField fx:id="textFieldCameraPointOfDirectionZ" promptText="0.0"/>
                                        </children>
                                    </HBox>
                                </children>
                            </VBox>
                        </children>
                        <VBox.margin>
                            <Insets left="5.0" top="10.0"/>
                        </VBox.margin>
                    </HBox>
                    <Button mnemonicParsing="false" onAction="#moveToTheModel" text="Move to the model">
                        <VBox.margin>
                            <Insets left="5.0" top="10.0"/>
                        </VBox.margin>
                    </Button>
                    <TitledPane animated="false" text="Lighting Models ">
                        <VBox.margin>
                            <Insets top="10.0"/>
                        </VBox.margin>
                        <content>
                            <VBox fx:id="lightingModelsManager" prefHeight="200.0" prefWidth="100.0">
                                <children>
                                    <Button mnemonicParsing="false" onAction="#addNewLightingModel"
                                            text="Add a new lighting model"/>
                                </children>
                            </VBox>
                        </content>
                    </TitledPane>
                    <HBox prefHeight="100.0" prefWidth="200.0">
                        <VBox.margin>
                            <Insets left="5.0" top="10.0"/>
                        </VBox.margin>
                        <children>
                            <VBox prefHeight="200.0" prefWidth="150.0">
                                <children>
                                    <Label text="Direction"/>
                                    <HBox prefHeight="100.0" prefWidth="200.0">
                                        <children>
                                            <Label text="X:  "/>
                                            <TextField fx:id="textFieldLightingModelDirectionX" prefHeight="25.0"
                                                       prefWidth="130.0" promptText="0.0"/>
                                        </children>
                                    </HBox>
                                    <HBox prefHeight="100.0" prefWidth="200.0">
                                        <children>
                                            <Label text="Y:  "/>
                                            <TextField fx:id="textFieldLightingModelDirectionY" prefHeight="25.0"
                                                       prefWidth="130.0" promptText="0.0"/>
                                        </children>
                                    </HBox>
                                    <HBox prefHeight="100.0" prefWidth="200.0">
                                        <children>
                                            <Label text="Z:  "/>
                                            <TextField fx:id="textFieldLightingModelDirectionZ" prefHeight="25.0"
                                                       prefWidth="130.0" promptText="0.0"/>
                                        </children>
                                    </HBox>
                                </children>
                            </VBox>
                        </children>
                    </HBox>
                </children>
            </VBox>
        </content>
    </ScrollPane>
</AnchorPane>