gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > glPushMatrix and gLPopMatrix more than one once

#46521 - delfare - Sun Jun 26, 2005 6:11 pm

how can I use glPushMatrix and gLPopMatrix more than one once?
_________________
If I speak badly, it's because I speak french and I am 15

PA 3d tutorial : http://delfare.pizz.biz

#46525 - strager - Sun Jun 26, 2005 7:50 pm

delfare wrote:
how can I use glPushMatrix and gLPopMatrix more than one once?


This prolly means: How can I push/pop more than one matrix to/from the stack at once?

I do not know the answer. Sorry.

#46526 - delfare - Sun Jun 26, 2005 7:59 pm

I want to do ex :
Code:

glPushMatrix();
glTranslate3f32(floatof32(10.0),floatof32(0.0),floatof32(2.0));
glBegin(GL_QUAD);
glVertex3f32(intof32(-1), intof32( 1), 0);
glVertex3f32(intof32( 1), intof32( 1), 0);
glVertex3f32(intof32( 1), intof32(-1), 0);
glVertex3f32(intof32(-1), intof32(-1), 0);
glEnd();
glPopMatrix(1);
glPushMatrix();
glTranslate3f32(floatof32(5.0),floatof32(1.0),floatof32(5.0));
glBegin(GL_QUAD);
glVertex3f32(intof32(-1), intof32( 1), 0);
glVertex3f32(intof32( 1), intof32( 1), 0);
glVertex3f32(intof32( 1), intof32(-1), 0);
glVertex3f32(intof32(-1), intof32(-1), 0);
glEnd();
glPopMatrix(1);

_________________
If I speak badly, it's because I speak french and I am 15

PA 3d tutorial : http://delfare.pizz.biz