Different PC restulting in different rendering

Hello good people.

To be honest with You I don’t know how to explain this. So I’m just going to show you a video of the same code running on 2 different PC-s. Here is a link to a video I made of what exactly is the problem.

As You can see there are some artifacts on the left screen that do not appear on the right one. The Image on the left screen gets wider when it’s rolled while the image on the right screen stays the same. I’m sending some images in case there is a problem with the video file I uploaded on my google disk.

Left screen: Jetson AGX Xavier with Jetpack 4.6.2 (Ubuntu 18)
Right screen: Lenovo IdeaPad with Ubuntu 18
Both PCs are running the same code! → same OpenGL version etc.

Thank You for Your help and time!

On the next image you will see that the image gets bigger then the first one (like it’s getting closer)

While the next two images stay the same size

From the videos…

PC2 appears to have a square pixel aspect ratio.
PC1 appears to have a very non-square pixel aspect ratio.

That’s a guess. You haven’t given us much to go on.
This is assuming your app isn’t doing any pixels/inch conversions to ensure a square region of video remains a square on the physical screen.

1 Like


here is a link to the code in my GitHub repo.

Basically what I do is this:

  1. Calculating new camera resulting quaternion using cglm in a separate thread function
void *fake_headtracking(void *c_ptr){
    my_camera_t *c = c_ptr;
    versor rollQuat, pitchQuat, yawQuat;

    float yaw, pitch, roll;
    yaw = 180;
    pitch = 0;
    roll = 0;
    float yawd = 1;
    float pitchd = 1;
    float rolld = -1;
        // yaw += yawd;
        // pitch += pitchd;
        roll += rolld;
        if (roll >= 50 || roll <=-50) rolld = -rolld;
        if (pitch >= 50 || pitch <=-50) pitchd = -pitchd;
        if (yaw >= 50 || yaw <=-50) yawd = -yawd;
        glm_quatv(pitchQuat, my_radians(pitch), (vec3){1.0f, 0.0f, 0.0f});
        glm_quatv(yawQuat, my_radians(yaw), (vec3){0.0f, 1.0f, 0.0f});
        glm_quatv(rollQuat, my_radians(roll), (vec3){0.0f, 0.0f, 1.0f});
        glm_quat_mul(yawQuat, pitchQuat, c->resultQuat);
        glm_quat_mul(c->resultQuat, rollQuat, c->resultQuat);

    return NULL;

This is what I do in render loop:

// generate projection matrix
glm_perspective(cam.fov, (GLfloat)SCR_WIDTH / (GLfloat)SCR_HEIGHT, 0.01f, 100.0f, proj); // zoom
// generate view matrix
glm_quat_look(cam.cameraPos, cam.resultQuat, view);
// send MVP matrices to vertex shader
my_send_shander_4x4_matrix(modelLoc, 1, &model[0][0]); 
my_send_shander_4x4_matrix(viewLoc, 1, &view[0][0]); 
my_send_shander_4x4_matrix(projLoc, 1, &proj[0][0]);  
my_bind_vertex_object_and_draw_it(VAOs[0], GL_TRIANGLES, myWin.numTriangles);

And this is what my vertex shader looks like:

#version 330 core
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec2 aTexCoord;
out vec2 TexCoord;
uniform mat4 model;
uniform mat4 view;
uniform mat4 proj;
void main(){
   gl_Position = proj*view*model*vec4(aPos.x, aPos.y, aPos.z , 1.0);
   TexCoord = vec2(1.0 - aTexCoord.x, aTexCoord.y);

I tried setting the window resolution to 720x720 (making a square), but the same thing happen.
Also, I’m pretty sure that the problem is not related to multithreading…

Hi @Dark_Photon, I’m sorry to bother you again but do you have any more suggestions regarding this problem?

Thank You in advanced!

Simplify your problem. Get rid of the video. Draw a square on each screen. Adjust the width and height in pixels until the image is “physically” square on the display (in inches or cm). What do you find?


I did all that, the square was a square on both PCs. So I’ve been playing around with view matrices… Turns out, there could be my problem. View matrices are not the same → but values differ only on 3. decimal place. Now, since the one PC that doesn’t work as planned has arm (aarch64) CPU architecture, while the other is a normal laptop with x86, I would say that’s the problem.

I’m using cglm in order to calculate the MVP matrices. I tried using cglm without building it and with it built on my PC, but nothing changed. Have any ideas?

Thank You! Have a great day!

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.