Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3507 Members - Latest Member: Edgebteme

26. May 2012, 05:51:26 am
Xith3D CommunityGeneral CategoryNews (Moderators: Marvin Fröhlich, 'n ddrylliog)Multiple Viewports
Pages: [1]
Print
Author Topic: Multiple Viewports  (Read 1292 times)
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« on: 22. January 2007, 10:54:38 pm »

It is now possible to define one viewport per RenderPass Smiley. See RenderPassConfig.setViewport().

For those, who don't know, what a viewport is: A viewport defines a virtual rectangle on the Canvas3D and is handled by the renderer just as if this was the whole canvas. So everything gets translated and scaled (affine transform) to fit into this new "virtual screen".

Marvin
Logged
'n ddrylliog
Moderator
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #1 on: 23. January 2007, 08:13:47 pm »

Great work (as always). Thank you !
Logged
'n ddrylliog
Moderator
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #2 on: 23. January 2007, 08:14:11 pm »

I suppose, if viewports are overlapping the one which is seen is the latest rendered ?
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #3 on: 23. January 2007, 09:17:11 pm »

I suppose, if viewports are overlapping the one which is seen is the latest rendered ?

The order in which they are rendered is exactly the order of the RenderPasses. Each viewport is attached to exactly one RenderPass.

Marvin
Logged
hawkwind
Getting respectable
***
Offline Offline

Posts: 363



View Profile Email
« Reply #4 on: 24. January 2007, 01:05:39 am »

So how would I use this??  A separate scene??  For example a a user walks through my world in a FPS display, I could have an overhead camera of the entire map??
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #5 on: 24. January 2007, 08:41:13 am »

So how would I use this??  A separate scene??  For example a a user walks through my world in a FPS display, I could have an overhead camera of the entire map??

Yeah, good example Smiley.

In my own game I needed this feature because previously I have multiple Canvas3DPanels on a JFrame (not overlapping). One showed the entire solar system and one showed one planet in detail. Then a HUD is drawn over the whole canvas. So I have three RenderPasses, where the order of the first two ones is irrelevant. They are sized smaller than the canvas and don't overlap. The HUD's RenderPass'es viewport is Canvas-sized.

But I think, there are several ways, where this viewport thing could help.

Remeber, that the layered/non-layered behaviour of the RenderPasses also comes into effect for the assotiated viewports.

Marvin
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic