create and manipulate 3D world

hello,
how to create 3d world in opengl+MFC? how to move objects in 3d space like placing one over another? can anybody guide? any good links on the net?
thanx in advance.

hi
Sorry am using win32 api but i think the core code shall be the same in MFC & win32.
1st u get a DC then check if the pixel format u wanna use is supported on VGA card or you can find a closet match of ur required pixel format. Then u choose it as the current pixel format into the Device context by calling the function

SetPixelFormat(hDC,pixel format structure)

then u create an opengl rendering context from the DC. Make the redering context as current rendering context & thats it.I recommend you to go to beginner’s forum for detailed information.
bye

hey
thanks for the info but i have already done it. my main query was how to manipulate objects in the world like dragging with the mouse, rotating, placing one object on top of another etc.? can u guide me?

Originally posted by immy:
[b]hi
Sorry am using win32 api but i think the core code shall be the same in MFC & win32.
1st u get a DC then check if the pixel format u wanna use is supported on VGA card or you can find a closet match of ur required pixel format. Then u choose it as the current pixel format into the Device context by calling the function

SetPixelFormat(hDC,pixel format structure)

then u create an opengl rendering context from the DC. Make the redering context as current rendering context & thats it.I recommend you to go to beginner’s forum for detailed information.
bye [/b]

Stop bloody cross-posting!!

Why dont you actually look for links on the net, or is that just a stupid idea?!

hi
for rotation u can use
glRotatef(value,x,y,z);
you can place one object on top of another by just translating
glTranslatef(x,y,z);
the third dragging i havn’t tried but you can use
gluProject(…) to do that
hope you the best bye bye