如何在java opengl中添加多重对象?

时间:2016-06-22 19:30:44

标签: java opengl jogl

我正在尝试使用jogl创建一个包含一些对象的房间。当我添加一个对象时,一切都很好,但是当我尝试添加多个对象时,一切都是错误的,并不像我想要的那样。 这是代码:(应该创建对象的部分)

 axeTexture.bind(gl);
    gl.glScalef(0.75f, 0.75f, 0.75f);
    gl.glTranslatef(0.095f, 0.01f, -0.02f);
    axe.drawModel(gl);
    gl.glEnd();


    chairTexture.bind(gl);
    gl.glScalef(0.75f, 0.75f, 0.75f);
    gl.glTranslatef(12.5f, 0.0f,0.9f);
    gl.glRotatef(-90f, 0f, 100f, 0f);
    chair.drawModel(gl);
    gl.glEnd();

As you can see on the picture the axe looks really weird, and the couch isn't at its place, I wanted it to be next to the wall

0 个答案:

没有答案