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

please help-me

Started by jeppa Nov 26, 2003 at 1:06 PM 3 replies 1.2k views
Original Post
jeppa
jeppa
hi! I would want make a editor for my engine with the classic 4 view like Lightwave and so on.I would want load my object into this editor and diplay it into this 4 different view.someone know to make this 4 view and the way to draw into this view?? sorry for my bad english... Thanks Sandro
hplus0603
hplus0603
That depends entirely on your API. Typically, you''ll draw the object 4 times, with 4 different positions/transformations.

Typically, on OpenGL, it might look something like:

glViewport( 0, 0, WIDTH/2, HEIGHT/2 );
glClear(...);
glLoadMatrix( whateverViewForViewport0 );
DrawMyObjects();

glViewport( WIDTH/2, 0, WIDTH, HEIGHT/2 );
glClear(...);
glLoadMatrix( whateverViewForViewport0 );
DrawMyObjects();

glViewport( 0, HEIGHT/2, WIDTH/2, HEIGHT );
glClear(...);
glLoadMatrix( whateverViewForViewport0 );
DrawMyObjects();

glViewport( WIDTH/2, HEIGHT/2, WIDTH, HEIGHT );
glClear(...);
glLoadMatrix( whateverViewForViewport0 );
DrawMyObjects();
enum Bool { True, False, FileNotFound };
Newfound Ajarn
Newfound Ajarn
Thefour whateverViewForViewport0 should be

whateverViewForViewport0
whateverViewForViewport1
whateverViewForViewport2
whateverViewForViewport3
VLAjarn: Cause it (linux) NEVER crashesMrPr0Grmer: lol ur wrongMrPr0Grmer: RedHat crashesVLAjarn: I'm saying good builds of linux
stephenfx
stephenfx
You can use glFrustum() build a perspective matrix for the perspective view, and use glOrtho() for others, they are all orthographic view. The cameras of the 4 view are the same math, you can use gluLookat(),etc.

Hope this help.

[edited by - stephenfx on November 26, 2003 9:11:22 PM]

Topic Locked

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

Sign in to reply to this topic.