on ATI Graphics card (X800 and 9800) a simple code using accumulation buffer doesn’t run.
but the same code on NVIDIA GC run perfectly…
an idea?
here the code
#include <GL/openglut.h>
#include <iostream>
using namespace std;
void display()
{
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glClearColor(0,0,0,1);
glClear(GL_COLOR_BUFFER_BIT);
glViewport(0,0,600,600);
glOrtho(0,1,0,1,-1,1);
for(int i=0;i<10;i++)
{
glClear(GL_COLOR_BUFFER_BIT);
glTranslatef(0.05,0.05,0.05);
glBegin(GL_QUADS);
glColor3f(0.9,0.1,0.3);
glVertex3f(0.,0.,0.);
glVertex3f(0.,0.5,0.);
glVertex3f(0.5,0.5,0.);
glVertex3f(0.5,0.,0.);
glEnd();
glAccum(GL_ACCUM,0.1);
}
glAccum(GL_RETURN,1.0);
cout << (glGetError()!=GL_NO_ERROR);
glutSwapBuffers();
}
int main(int argc,char **argv)
{
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_ACCUM);
glutInitWindowPosition(50,50);
glutInitWindowSize(600,600);
int window=glutCreateWindow("gni");
glClearAccum(0,0,0,1);
glClear(GL_ACCUM_BUFFER_BIT);
glutDisplayFunc(display);
glutMainLoop();
return 0;
}