OpenGL transform matrix acts differently on different monitors?

Hey there,

As the title says, I’m running into an issue where my OpenGL components in my plugin are moving at different speeds depending on the monitor the window is open on. I can’t seem to figure out what is making the difference however. This same effect happens in the OpenGLApp demo in the DemoRunner, so am a little lost on this.

Essentially, I have a 3d object that is moving across the screen repeatedly. On my main monitor (2560 * 1440), the plugin draws how I’d like. (Let’s say the object moves 1 unit per frame); On my second monitor (1920 * 1080), the object actually moves half as fast (.5 units per frame). Originally, I thought the resolution was making the difference, but even setting my main monitor to 1920 *1080 does not fix the issue. I also thought it might be the refresh rate of the monitors, but it seems that even settings the OpenGLContext repaint rate to a constant easy speed like 10hz does not change this effect.

And I am already scaling the context by the desktopScale (which is 1 for both of the desktops anyway), so this isn’t a scaling issue I think. Both monitors draw everything to scale properly but just not the transform matrix applied to the 3d object.

Any help would be appreciated! Let me know if you need any more context.

In your animation of the object’s transform, are you accounting for delta time?
Essentially, are you incrementing your animation timeline depending on how long it took for the last frame to render?


I’m not sure if it’s what you meant or not, but your comment made me realize I’m setting the transform matrix for each object inside the renderGL call which is probably incorrect lol. I think what you are saying still applies, as on my main monitor the renderGL was probably being called more often than on my second monitor.

Thank you though! Everything is working correctly now.