Message 1 of 1
How to Render to Texture with a Larger Viewport?

Not applicable
09-02-2015
08:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey guys,
I'm developing a Maya C++ plugin for which I need to render the current view into a texture/FBO. The texture should be larger than the on-screen viewport. For simplicity, let's assume the texture is twice as large in x and y.
How can I do that? I tried changing the viewport size in the M3DView pre-render callback (add3dViewPreRenderMsgCallback), but it seems to have no effect. The result is that only lower left quarter of the texture is rendered to.
Another problem I have is, that I'd like to divide the focal length of the camera by two for the texture render. Changing the value in the M3DView pre-render callback has no effect either.
Best regards,
Marius