如果你不明白我在問什麼,我的意思是 -是pushMatrix()/ popMatrix()能夠堆疊嗎?
glPushMatrix();
glPushMatrix();
glPushMatrix();
glPushMatrix(); // push matrix 4 times
glTranslatef(...);
//do stuff
glPopMatrix(); // pull it up 1, so we can do more stuff
glTranslatef(...);
// do stuff
glPopMatrix(); // and again, and again, etc
glTranslatef(...);
// do stuff
glPopMatrix();
glTranslatef(...);
// do stuff
glPopMatrix();
會一切還在工作呢?
仍然無法理解你在問什麼,以及你的意思。你能分享你在做這一切的背景嗎? –
這是一個堆棧的性質。最好從一些文檔,參考或教程開始。 (請注意,SO不在之前的列表中。) – 2012-11-05 05:53:21