Gdx.gl10.glPushMatrix();
Gdx.gl10.glTranslatef(center.x, center.y, 0);
Gdx.gl10.glRotatef(0, 0, 1, angle * 360f / (2f * (float)Math.PI));
texture.bind();
mesh.render(GL10.GL_TRIANGLE_STRIP);
Gdx.gl10.glPopMatrix();
...这里有一些绘制文本的代码:
spriteBatch.begin();
spriteBatch.setColor(1, 1, 1, 1);
float fps = 1f / Gdx.graphics.getDeltaTime();
font.draw(spriteBatch, "fps: " + fps, 0, 50);
spriteBatch.end();
第一段代码可以正常运行,但当第二段代码运行后,第一段代码的三角形带只会使用最新的glMaterial进行渲染。你知道为什么会这样吗?我该怎么做才能在绘制时保留两种材质(网格的“texture”和它的精灵纹理,它们应该不同)?