Quote Originally Posted by vgo
Here's the simplified rendering code that still produces the error.
...
Hmm. That's really strange. Your code is perfectly fine, shouldn't cause any OpenGL errors. I even created a simple program, copy&pasted your code into Init and Draw, and (after changing FCamera references to compile) everything runs OK. No OpenGL error.

(Note that I used FPC 2.0.2 on Linux with NVidia card, so my environment was quite different than yours. But your sample OpenGL code should work the same.)

Moreover, you say that rendering works good. Which is another proof that things between glBegin...glEnd are correct. If something would be incorrect between glBegin...glEnd, rendering results would be incorrect also.

So, basically, your code is good. The error must be somewhere else. Inside dglOpenGL bindings ? Something specific to Borland Arch 2006 ? Something specific to Radeon ? All these causes are very very very unlikely.

Are you sure that you don't have another thread running in your program that does some OpenGL calls ?

Otherwise, I'm afraid you'll have to send/show somewhere the complete program code to reproduce the bug. I don't have Borland Arch 2006 or Radeon, but I can try to test with Delphi 7 on NVidia. Maybe someone else will have Borland Arch 2006 and Radeon. This will allow us to test exactly your program, and maybe this way we'll discover something.