FrameBuffer resize

Started by kkl, February 05, 2013, 04:48:18 PM

Previous topic - Next topic

kkl

Hi I'm trying to resize the framebuffer from (800, 600) to (360, 600), but any object located outside of (360, 600) bound is clipped. Is it possible to resize the framebuffer while objects are still displayed beyond the resized bound?

EgonOlsen

 ??? I don't get it...you want to resize it but you also want to render objects outside of the resized buffer? I don't understand....

kkl

Yea. The reason I'm doing that is to simulate android live wallpaper in pc so that object's scale factor and location stays the same in both platforms for easier development. The resized buffer represents the device screen while outside of boundary represents the entire live wallpaper. I tried simulating it by changing camera frustum, but I'm not sure how. Perhaps I'm not doing right? Or is there any alternative? Thanks.

EgonOlsen

I still don't get it...maybe a drawing might help.

kkl

#4
I tried to upload some pics, but it doesn't hav the attachment option to upload in the new forum. ;( There is "Choose file" option in jpct android forum though.

kkl

I posted the drawings in JPCT-android forum anyway~






The first image is the one I would like achieve while the second image is the one without framebuffer resizing.

EgonOlsen

I see...what's wrong with calling buffer.resize(360,600); ? It's not meant to be used for that, but it actually does what i think you want. It limits the viewport to (0,0)-(360,600) and adjusts yFov accordingly.

BTW: I've checked board permissions...the old board (once imported from phpBB) seemed to have different permissions than the new ones (which were all set to "default"). I've set them all to "default" now. Maybe that fixes the problem with the image upload.

kkl

Yea. I guess I'm using the wrong way to do it. Any good suggestion for that case? Perhaps changing the viewport and adjust yFov manually?

p/s: The fix works. Now I see the "Choose file" option.

EgonOlsen

By default yFov adjust automatically to ensure that it fits the xFov without distorting the rendered objects at the given resolution. It's the same on Android, so i'm still failing to see the problem... ???

kkl

Well~ It's not really a problem though... I think it works perfectly... Just that if I could adjust manually for viewport, it would be easier for me to develop android app in pc (like game engine). It's ok.. I'll just use whatever available.. Thanx alot ;)