1
我面臨的一個問題,當我提出通過我的立方體看到立方體形狀干擾(如看圖像) 我使用代碼繪製立方體is--如何在使透視時保持OpenGL立方體的形狀?
//繪製 gl.glTranslatef(0.0F, 0.0f,-5.0f); //將5個單位到屏幕
float scaling = (PhotoCube3DLWPActivity.scaleValue)/100.0f;
gl.glScalef(scaling,scaling,scaling); //Scale the Cube to 80 percent, otherwise it would be too large for the screen
//Check if the blend flag has been set to enable/disable blending
if(PhotoCube3DLWPActivity.blend)
{
gl.glEnable(GL10.GL_BLEND); //Turn Blending On
gl.glDisable(GL10.GL_DEPTH_TEST); //Turn Depth Testing Off
} else {
gl.glDisable(GL10.GL_BLEND); //Turn Blending On
gl.glEnable(GL10.GL_DEPTH_TEST); //Turn Depth Testing Off
}
但在其他情況下,沒有這種類型的probem的,請儘快ELP我。
對不起我的問題仍然unsolve ......在渲染時立方干擾的形狀...... – 2012-02-09 09:16:17