Forums > Jitter

Render to texture, texture size independent of context's window size

April 27, 2011 | 12:43 am

Hello,

I’m having a problem rendering "multiple gridshapes" to a texture.

So far the "multiple gridshapes" are all getting rendered to a texture, I then want this texture to be mixed in a 4way mixer with some videos and jit.gl.ogre, the videos and the ogre are all being rendered at 1280×720 so I want the "multiple gridshapes" to be sent to the mixer at that 1280×720 resolution.

The only way I can get the above to work is set the "multiple gridshapes" contexts window with @size 1280 720, however this leaves me with 2 windows being rendered at 1280×720- my final mixed output’s jit.window and the multiple gridshapes jit.window.

Ideally I would like the "multiple gridshapes" window to be rendered small say 320×240 and used as a preview window, but as soon as I reduce the size of the "multiple gridshapes" window the texture being sent to the mix is reduced in size.

I’ve searched the forums extensively and tried messing about with @adapt, @dst_dim, @dim, @usedstdim but im going on guesswork and it isnt working, hopefully someone understands this render to texture business better than me!

Here’s a patch that illustrates what im doing,

Hope someone can help.

– Pasted Max Patch, click to expand. –

April 29, 2011 | 4:08 pm

Ok, note to self don’t post messages that make no sense at 3am!

I ended up using vades render to texture method to drive 2 gl scenes, see below hopefully it can help someone else out…

It also incorporates a preview window for each scene, hopefully its commented well enough so people can make sense of it.

There might be an extra videoplane or two in there but it works halleluyah!

– Pasted Max Patch, click to expand. –

Viewing 2 posts - 1 through 2 (of 2 total)