0

我想让这个盒子成为一张与这个盒子的属性相同的图片。我真的只想在上面叠加一张图片。建议?

public void draw(GLAutoDrawable gld) {
        final GL2 gl = gld.getGL().getGL2();
        // set color
        gl.glColor3d(0.1, 0.0, 0.9);
        // draw the object
        gl.glBegin(GL2.GL_QUADS);
        // x, y, z coordinates of the corners
        gl.glVertex3d(posx-size, posy-size, 0);
        gl.glVertex3d(posx+size, posy-size, 0);
        gl.glVertex3d(posx+size, posy+size, 0);
        gl.glVertex3d(posx-size, posy+size, 0);
        gl.glEnd();
    }
4

0 回答 0