PowerVRshell-Changing the Size of DC for Off-Screen Rendering

Hi all,
I’m working on Opengl ES 2.0 using PowerVR Lib on OMAP3 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(480x480) & remaining Area of the Image was left blank.
I think this is because of the DC size created in the ShellData->PrefWidth variable which was created during CreateWindow() API. Buti 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?

[QUOTE=Balaji_mcr;29566]Hi all,
I’m working on Opengl ES 2.0 using PowerVR Lib on OMAP3 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(480x480) & remaining Area of the Image was left blank.
I think this is because of the DC size created in the ShellData->PrefWidth variable which was created during CreateWindow() API. Buti 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?[/QUOTE]

You can just set the viewport directly before rendering to the FBO by calling glViewport(). Then, set it back before rendering to the framebuffer again. There is a good example program that does this attached to this article, which also uses PowerVR on OMAP3:

http://processors.wiki.ti.com/index.php/Render_to_Texture_with_OpenGL_ES

Regards, Clay

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.