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

zcwaa22's icon

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 1280x720 so I want the "multiple gridshapes" to be sent to the mixer at that 1280x720 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 1280x720- 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 320x240 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,

Max Patch
Copy patch and select New From Clipboard in Max.

Hope someone can help.

zcwaa22's icon

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.

Max Patch
Copy patch and select New From Clipboard in Max.

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