   Problem with ATI OpenGL implementation
  I''ve already tried the game I''m working at with the following OpenGL implementations:NVidia on Linux and WindowsVoodoo on LinuxMesa software rendering on LinuxWindows software renderingI never had problems with the opengl implementations above, but recently I tried my game on a plattform with an ATI graphics card and I got an error I can''t explain myself:Inside a display list, I make several calls to glMaterial to adjust the materials propertys, then glBegin and draw some shapes, then glEnd and again calls to glMaterial.If I call glGetError() after the sequence above, it tells me that the error "invalid operation" has occured. Now the highly strange thing is: if I remove the 2nd series of glMaterial calls, this error doesn''t occure. It continues to render the display list, until it finds the next call to glMaterial.If I remove all calls to glMaterial, no error occures.The calls to glMaterial really are correct. To get sure, here''s one example:float color[4];...glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, color);The error doesn''t depend on the things that are drawn before. This error occurs in my model loader (propably because this is the only part that uses display lists). So I''m able to try it with different models, and it occures on every model that uses more than 2 materials.This isn''t the only system having that error. Some time ago somebody, who also has an ATI graphics card, aready told me that he gets an "invalid operation" error.Now I''ve spent a lot of time searching google and browsing my sourcecode and changing every thing that could cause this error without any results :-(So, I''m frustrated enough to ask if anybody has an idea, or if anybody can give me an advice how to backtrace this bug.ConeBtw. I think it can''t be caused by a memory bug, because I regulary debug my program with valgrind and code guard (by borland) 
  Sounds like a driver bug, report it to ATI. -* So many things to do, so little time to spend. *-;  I just tried ignoring the OpenGL errors. Then I get a lot of display errors when the drawning the display lists:Some faces are semi transparent or aren''t drawn at all although they should be fully opaque. Others have very incorrect lighting or incorrect color.I can''t imagine that this is a bug in the ATI OpenGL implementation nobody hasn''t discovered yet. I think I must have done something wrong.This ATI system realy sickings me. I also once had a texturing coordinates problem with this system (which wasn''t that bad because i switched to autogenerated texture coordinates) ;quote:Original post by Cone83  I can''t imagine that this is a bug in the ATI OpenGL implementation nobody hasn''t discovered yet. I think I must have done something wrong.tbh, i wouldnt discount it, it all depends on if someone else has tried to do what you are doing, by all means triple check what you are doing but if you cant see the problem then contacting ATI Dev Relations might be a good idea, including a copy of the code so they can try to reproduce the problem, they can then confirm if its a bug or not ;  ok, it really seems like a bug in the drivers. I updated the drivers on that system to the newest version. Now the display lists are compiled without errors and the display bugs i mentioned above are gone, but I got 2 new display bugs:When switching to wire frame rendering, some extra lines are drawn touching the objects rendered by the display lists (looks just like there were extra polygons, just visible in wireframe mode) and for one object, some triangles that are near the outline are fading into black (when I walk around it, the affected triangles change).Maybe i can address this bug but right now i think the best thing is to just not support ATI graphics card ;-);  Yeah, that''s a great idea -- ignore an entire quarter of the market.  Seriously, if you haven''t done so already, send an email about the problem with a copy of the code or a test program illustrating the problem to ATI dev relations. ;  i assume these errors dont show up on all the other gfx cards you test? ATI''s OGL version seems to be a lot less forgiving of mistakes than Nvidia''s (i cant speak for Mesa however)If thats the case then def contact ATI''s dev rel, i''ve heard they are very quick to respond to ppls problems also, its generaly best to keep your ATI drivers up to date, they are making improvements all the time with their OGL stuff so its generaly worth keeping it up to date ;  I think I''ve found the reason now:I''ve enabled GL_CULL_FACE but defined my materials to be for front and backfaces. The wireframe rendering was also enabled for backfaces. If I limit both to front faces, the graphics errors are gone. Is this an illegal operation?But just as usual, this introduces a new graphics error: A shape I draw with a custom billboard matrix often isn''t drawn at all.when will it end... ;  It should not be illegal to set material parameters for the front- or backface even when the backface culling is enabled.According to my GL book, glMaterial, errors:GL_INVALID_VALUE is generated if a specular component outside the range 0..128 is specified.With pixel and vertex shaders you can always access both of them AFAIK, no matter if backface culling is enabled.Strange.. ;  There is one occasion where the ATI drivers returns the GL_INVALID_OPERATION: when you put the statement between glBegin and glEnd. 