Skip to main content
GameDev.net gamedev.net
🔒 Locked

convert opengl matrix stack code

Started by Metus Mar 6, 2004 at 1:15 PM 2 replies 400+ views
Original Post
Metus
Metus
I''m writing an md3 renderer using directx, but i just cant convert this opengl code to directx code
glPushMatrix();
			
glTranslatef(vPosition.x, vPosition.y, vPosition.z);
DrawLink(pLink);

glPopMatrix();
 
so i can''t really tell if my code works.. could someone please tell me how to convert this code? i''ve tried to implement an ID3DXMatrixStack, but with no luck..
Ethereal
nhatkthanh
nhatkthanh
don't you just use the translation for the object and leave the previous world transformation for the user to manage.

[edited by - nhatkthanh on March 7, 2004 12:34:58 PM]
neneboricua19
neneboricua19
You could also try to use a regular stl::stack. They work pretty much the same way.

neneboricua
aker_jus
aker_jus
D3DXMatrixStack acts just like the default matrix ops for opengl.

D3DXCreateMatrixStack <-- check out this function and the docs cover all the functions u can use.
GraphicsWare|RenderTechhttp://www.graphicsware.com3D Graphics & Solutions

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.