Resolution of Jit.GL.Render

Dec 29, 2012 at 5:55pm

Resolution of Jit.GL.Render

Hi, I’m trying to get OpenGL in to a matrix, and I want to be able to readily set the resolution. However, it’s not working how I expect, and when I try to set the dimensions it does not seem responsive. Can anyone help me to understand the object better?

My patch is rigged up to give some simple OpenGL graphics, and to render to a matrix. However, the resolution doesn’t seem to be being set.

– Pasted Max Patch, click to expand. –
#65847
Dec 29, 2012 at 6:58pm

Try this. Jit.gl.render gets its resolution from its render destination. In this case the matrix so it should be set explicitly there.

– Pasted Max Patch, click to expand. –
#237151
Dec 29, 2012 at 7:02pm

Here’s the same but stripped of the confusing @drawto’s.

– Pasted Max Patch, click to expand. –
#237152
Dec 29, 2012 at 9:31pm

Hey dtr, thanks for the response.

When I try sending the matrix dimensions settings to go from 1080 to 720, the image then appears cropped. Do you get this too? I wonder how to stop this cropping and preserve the full frame?

#237153
Dec 29, 2012 at 10:00pm

Not entirely sure why that’s happening but here’s an alternative. The matrix will have the same size as the render destination window.

– Pasted Max Patch, click to expand. –
#237154
Dec 30, 2012 at 5:59am

Interesting. Your patch seems to work as expected. I tried recreating my problem after looking through Tutorial 31, and am still having the same issue – it seems to be that new matrix dimensions are relative to the initial dimensions, as illustrated in the patch below.

It still seems strange that I can’t change the dimensions in the way expected :-?

I wonder what I am overlooking??

– Pasted Max Patch, click to expand. –
#237155
Dec 30, 2012 at 9:35pm

you can fix this problem by re-sending the drawto attribute to jit.gl.render after changing the matrix dimensions.

eg, send dim 160 120 to the matrix, then send drawto clyde to the gl.render.

– Pasted Max Patch, click to expand. –
#237156
Dec 31, 2012 at 3:32am

That has sorted me out! Much appreciated

Is this a bug, or just the way it’s supposed to work?

#237157

You must be logged in to reply to this topic.