Viewport command in vb.net

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
Locked
DGENXP
Posts: 124
Joined: Tue Dec 27, 2005 2:49 am
Contact:

Viewport command in vb.net

Post by DGENXP »

Hi i am looking for help on VB.net to create a viewport does anyone have a code idea that might help me as i have no clue as to how to use it :cry: so it would be appreciated
8)
Andre Odendaal

Post by Andre Odendaal »

Can you be a little bit more specific about what you want to do?
DGENXP
Posts: 124
Joined: Tue Dec 27, 2005 2:49 am
Contact:

Post by DGENXP »

:D Sorry mate

I am working on a 3d Rpg making program i need to know how to use the viewports command to create 4 viewports with different camera angles top,front,side and perspective and as you can tell from the previous post on this forum i am a complete n00b at this iirrlicht SDK, all i need to know is how to use the command basically how do i DIM a viewport i can then do the rest

this is the command that i am haveing trouble with
'-----------------------------------------------------------
device.VideoDriver.ViewPort(New Rect(0, 0, x/2, y/2))
'-----------------------------------------------------------

I hope this has helped me to be more specific
Guest

Post by Guest »

OK, with you now. This is what you want

'------
device.VideoDriver.ViewPort = new Rect(0, 0, x/2, y/2)
'------

ViewPort is a public property not a method
AndreOdendaal
Posts: 16
Joined: Tue Dec 27, 2005 10:13 am
Location: Johannesburg, South Africa

Post by AndreOdendaal »

Darn! I always forget to login before I post!
DGENXP
Posts: 124
Joined: Tue Dec 27, 2005 2:49 am
Contact:

Post by DGENXP »

:) thanks mate that worked a treat

one more question how would i define more than 1 of these viewports if it is possible?

woud i need to create a new device for each viewport?

or is there an easier way to do this

Ok I have tried to create another new device but it crashes, could i possibly need to create an array?

if you can help or at least steer me in the right direction i would very much appreciate it
AndreOdendaal
Posts: 16
Joined: Tue Dec 27, 2005 10:13 am
Location: Johannesburg, South Africa

Post by AndreOdendaal »

You can only have one viewport set at a time. So unless you want to have 4 different windows looking at a scene (I'm not sure how you'd do that, I'll have to play around) you simply have 4 rects and apply the right when when the user selects the view.
Brett19

another way

Post by Brett19 »

Its also possible that you could use render to texture, have 4 textures on screen and have the actual 3d hidden offscreen with the textures rendering from different angles.
Locked