hey, yesterday i’ve finally got my AMD card for test(HD6670) and what a piece of crap it is… i’m talking mostly about drivers. i can’t debug. almost everything doesn’t work, but no OpenGL errors. best hint i can get - gDebugger catches access violation errors occasionally.
configuration: win 7 x64, catalyst 13.1, Gigabyte HD 6670, WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB.
my application works flawlessly on my main nVidia card, gDebugger doesn’t catch any errors. all deprecated stuff replaced.
example of code, that doesn’t work on AMD:
//init quad
GLfloat quadVertices[] = {
-1.0f, -1.0f, 0.0f, 0.0f, 0.0f, //bottom left corner
-1.0f, 1.0f, 0.0f, 0.0f, 1.0f, //top left corner
1.0f, 1.0f, 0.0f, 1.0f, 1.0f, //top right corner
1.0f, -1.0f, 0.0f, 1.0f, 0.0f}; //bottom right corner
GLubyte quadIndices[] = {2,1,0, // first triangle (bottom left - top left - top right)
3,2,0}; // second triangle (bottom left - top right - bottom right)
glGenVertexArrays(1, &quadVertexArrayObjectId);
glBindVertexArray(quadVertexArrayObjectId);
glGenBuffers(1, &quadVertexBufferId);
glBindBuffer(GL_ARRAY_BUFFER, quadVertexBufferId); //Bind the vertex buffer
glBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * 20, &quadVertices[0], GL_STATIC_DRAW);
glGenBuffers(1, &quadIndexBufferId);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, quadIndexBufferId); //Bind the vertex buffer
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(GLubyte) * 6, &quadIndices[0], GL_STATIC_DRAW);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(GLfloat) * 5, BUFFER_OFFSET(0)); //vertex
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, sizeof(GLfloat) * 5, BUFFER_OFFSET(12)); //tex coord
glEnableVertexAttribArray(0);
glEnableVertexAttribArray(1);
glBindVertexArray(0);
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
//render sprite for occlusion query:
glBindVertexArray(quadVertexArrayObjectId);
SShader[3].applyProgram(8);
glBeginQueryARB(GL_SAMPLES_PASSED_ARB, occQueryObject);
modelViewMatrix = currentViewMatrix * modelMatrix;
billBoard();
modelViewMatrix = glm::scale(modelViewMatrix, glm::vec3(occluderScale * 3.0f, occluderScale* 3.0f, 1.0f));
glUniformMatrix4fv(SShader[shaderId].shaderSet[programId].uniform_modelViewMatrix, 1, 0, glm::value_ptr(modelViewMatrix));
glUniformMatrix4fv(SShader[shaderId].shaderSet[programId].uniform_projectionMatrix, 1, 0, glm::value_ptr(currentProjectionMatrix));
glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, 0); //access violation with gDebugger
glEndQueryARB(GL_SAMPLES_PASSED_ARB);
there are several cases like that in my code. i’ve checked contents of Framebuffer, this code draws correctly without gDebugger. but conditional rendering doesn’t work. neither for these sprites, neither for normal objects, which are not getting any errors on that stage and also draw correctly into occlusion query buffer and gbuffer.
also, amd doesn’t seem to like that:
glBindFramebuffer(GL_FRAMEBUFFER, lightBufferId);
glBindFramebuffer(GL_READ_FRAMEBUFFER, gBufferId);
glBlitFramebuffer(0, 0, gBufferWidth, gBufferHeight, 0, 0, screenw, screenh, GL_DEPTH_BUFFER_BIT, GL_NEAREST);
althrough they don’t explain why. just another access violation with gDebugger and nothing working in normal mode;
maybe i’m doing something embarassing?