I'm encountering some strange line jitter on mac platforms in my engine. I will post a video of the issue below but basically lines appear to “jitter” as objects move in my scene on mac platforms.
You can see it in the link above. Here is some relevant info -
- Does not occur on windows platforms.
- Does not change when adjusting near / far clipping planes in perspective projection.
- Multisampling is enabled in my platform layer and enabled in OpenGL - though I could have done this incorrectly in the platform layer.
- This does not occur when moving the camera - only when moving the verts.
Any help would be greatly appreciated! This issue has existed in my codebase for quite a while and I'm sure it's something simple but haven't been able to figure it out.
Also here is the exact render call I am using -
glUseProgram(kRGG.geometry_program.reference);
glBindVertexArray(kTextureState.vao_reference);
v3f pos(rect.x + rect.width / 2.f, rect.y + rect.height / 2.f, z);
v3f scale(rect.width, rect.height, 1.f);
Mat4f model = math::Model(pos, scale);
Mat4f matrix = kObserver.projection * kObserver.view * model;
glUniform4f(kRGG.geometry_program.color_uniform, color.x, color.y, color.z,
color.w);
glUniformMatrix4fv(kRGG.geometry_program.matrix_uniform, 1, GL_FALSE,
&matrix.data_[0]);
glDrawArrays(GL_LINE_LOOP, 0, 4);