I'm not sure this is the best place to post this, but it definitely seemed more appropriate than programming. I'm one of the developers of Performous, essentially a karaoke (and instruments) game. We use mostly 2D graphics in OpenGL, I don't think anything particularly strange.
On most machines, everything works perfectly. There's a subset of Intel iGPUs (from what I've been able to ascertain, certain models ranging from around the Ivy Bridge generation to somewhere around Broadwell) that render incredibly distorted, on Windows machines. I've seen it happen on Windows 7 and 10 (presumably it also does on Win8)... never in Linux or OSX, I attempted to reproduce it on a mac mini (that should have been affected) running bootcamp, and was unable to.
P.S. If you want to see the code, it's on github at https://github.com/performous/performous
Relevant files most likely would be (under game/) video_driver.cc/hh, surface.cc/hh, glutil.cc/hh, glshader.cc/hh
and the actual shaders that live in data/shaders
Edit: actual drawing call,
void VertexArray::draw(GLint mode) {
GLErrorChecker glerror("VertexArray::draw");
if (empty()) return;
unsigned stride = sizeof(VertexInfo);
GLint program;
glGetIntegerv(GL_CURRENT_PROGRAM, &program);
GLint vertPos = glGetAttribLocation(program, "vertPos");
GLint vertTexCoord = glGetAttribLocation(program, "vertTexCoord");
GLint vertNormal = glGetAttribLocation(program, "vertNormal");
GLint vertColor = glGetAttribLocation(program, "vertColor");
glerror.check("program and attribs");
glBindVertexArray(m_vao);
glBindBuffer(GL_ARRAY_BUFFER, m_vbo);
glBufferData(GL_ARRAY_BUFFER, sizeof(VertexInfo) * size(), &m_vertices.front(), GL_STATIC_DRAW);
glerror.check("bind");
if (vertPos != -1) {
glEnableVertexAttribArray(vertPos);
const GLvoid* ptr = m_vbo ? (GLvoid*)offsetof(VertexInfo, position) : &m_vertices[0].position;
glVertexAttribPointer(vertPos, 3, GL_FLOAT, GL_FALSE, stride, ptr);
}
if (vertTexCoord != -1) {
const GLvoid* ptr = m_vbo ? (GLvoid*)offsetof(VertexInfo, texCoord) : &m_vertices[0].texCoord;
glEnableVertexAttribArray(vertTexCoord);
glVertexAttribPointer(vertTexCoord, 2, GL_FLOAT, GL_FALSE, stride, ptr);
}
if (vertNormal != -1) {
const GLvoid* ptr = m_vbo ? (GLvoid*)offsetof(VertexInfo, normal) : &m_vertices[0].normal;
glEnableVertexAttribArray(vertNormal);
glVertexAttribPointer(vertNormal, 3, GL_FLOAT, GL_FALSE, stride, ptr);
}
if (vertColor != -1) {
const GLvoid* ptr = m_vbo ? (GLvoid*)offsetof(VertexInfo, color) : &m_vertices[0].color;
glEnableVertexAttribArray(vertColor);
glVertexAttribPointer(vertColor, 4, GL_FLOAT, GL_FALSE, stride, ptr);
}
glerror.check("enable arrays");
glDrawArrays(mode, 0, size());
if (vertPos != -1) glDisableVertexAttribArray(vertPos);
if (vertTexCoord != -1) glDisableVertexAttribArray(vertTexCoord);
if (vertNormal != -1) glDisableVertexAttribArray(vertNormal);
if (vertColor != -1) glDisableVertexAttribArray(vertColor);
if (m_vbo) glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindVertexArray(0);
}
Client-side vertex struct:
struct VertexInfo {
glmath::vec3 position{};
glmath::vec2 texCoord{};
glmath::vec3 normal{};
glmath::vec4 color{ 1.0, 1.0, 1.0, 1.0 };
};
highp
and see if the behaviour changes. $\endgroup$