Changing the Size of Memory DC for large Size FBO Off-Screen Rendering

Hi all,

I’m working on Opengl ES 2.0 using PowerVR shell on OMAP3530 development board.



I’d like to load a image(1024x768) as a texture to a quad & rotate it & save the image by using FBO concept.

When i tried to do this the Image gets shrink to the Display size(480x360) & remaining Area of the Image was left blank with background color.

I think this is because of the memory DC created while Creating window using CreateWindow() API. But i couldn’t understand how to change this by using PowerVR shell.

Could anyone pls tell me how to change the FBO Size & Window Size by using PowerVR shell?

Kindly refer any link referring to loading large size image.

Thank you

Balaji_mcr

Hi,



Our PVRShell framework’s default behaviour is to render at the devices screen resolution. FBO sizes are configured at an application level. The RenderToTexture Example in our SDK (ExamplesIntermediateRenderToTexture) demonstrates how to create an FBO surface, render to it and apply the resultant texture to a 3D object. The “m_i32TexSize” variable in this Example is used to set the FBO resolution.



If you’re having any issues after referring to this Example, can you please share screenshots and code snippets with us?



Regards,

Joe

Thank you @Joe for your kind reply.

I’ve tried to understand how to Re size FBO from the sample application. Some how i managed to get the Output Image by changing the WINDOW SIZE by using Create window() API with Image Size. still I’m not clear about creating FBO’s which are greater than Window size without affecting Display window Size.

It would be very helpful if u include any sample creating FBO’s which are greater than window(Screen) size.

Thank you



Regards,

Balaji

We can view large size image by changing the View port size to the desired Size by using this function

glViewport(0,0,g_ImageWidth,g_ImageHeight);