# Matrix differences with OpenGLES on linux

**URL:** <https://discourse.glfw.org/t/matrix-differences-with-opengles-on-linux/3042>\
**Category:** support\
**Created:** [November 1, 2026, 5:00am UTC](https://discourse.glfw.org/t/matrix-differences-with-opengles-on-linux/3042 "2026-11-01T05:00:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jan](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@Jan](https://discourse.glfw.org/u/Jan)\
**Post date:** [November 1, 2026, 5:00am UTC](https://discourse.glfw.org/t/matrix-differences-with-opengles-on-linux/3042/1 "2026-11-01T05:00:43Z")

</div>

I am porting some of my OpenGLES based apps from Android to Linux Mint 22.3 but its seems like linmath implements things differently. I am thankful you have a couple OpenGLES examples that run, but the triangle is lost when the frustum is setup for 3D perspective the following way. The code below shows how it is setup on the PICO platform that was closely derived from the discontinued Daydream platform (which is mentioned in the linmath comments). Even if I had the source code of Daydream or PICO matrix functions I would not know how to compare them to the linmath ones:

```auto
    float eyeX = 0.0f;
    float eyeY = 0.0f;
    float eyeZ = -0.0f; // Was -0.5f;
    float lookX = 0.0f;
    float lookY = 0.0f;
    float lookZ = -1.0f; // Was -5.0f;
    float upX = 0.0f;
    float upY = 1.0f;
    float upZ = 0.0f;

    // For using with linmath:
    vec3 eye;
    eye[0] = eyeX;
    eye[1] = eyeY;
    eye[2] = eyeZ;
    vec3 look;
    look[0] = lookX;
    look[1] = lookY;
    look[2] = lookZ;
    vec3 up;
    up[0] = upX;
    up[1] = upY;
    up[2] = upZ;

    mat4x4_look_at(mViewMatrix, eye,look,up);

    float ratio = (float)(width) / (float)(height);
    float left = -ratio;
    float right = ratio;
    float bottom = -1.0f;
    float top = 1.0f;
    float near = 1.0f; // Was 4.0f for DayDream
    float far = 6000.0f; // 30000.0f for the moon.

    mat4x4_frustum(mProjectionMatrix, left,right, bottom,top, near,far);

```
