Hi,
i am facing problem with object rendering on the screen in OpenGL.
I am having a ring object which i draw on the screen. I am using same object
(scaled) to put it inside first one. The problem is that second object is put over the first and not inside it:
glPushMatrix();
glRotatex( aFrame << 16, 1 << 16 , 0 , 0 );
DrawBox( 1.7f, 1.7f, 1.7f );
glPopMatrix();
glPushMatrix();
glRotatex( (-aFrame-10) << 16, 0 , 1 << 16 , 0 );
DrawBox( 1.f, 1.f, 1.f );
glPopMatrix();
...
DrawBox( GLfloat aSizeX, GLfloat aSizeY, GLfloat aSizeZ ) {
glScalef( aSizeX, aSizeY, aSizeZ );
glDrawElements( GL_TRIANGLES, 512 * 3, GL_UNSIGNED_BYTE, triangles);
}
How can i place one object inside the other?
Thanks.



