OK, I was finally able to reproduce your problem.Originally Posted by vgo
1. I took glWindow unit your submitted
2. I downloaded dglOpenGL
3. I placed your glBegin(GL_QUADS); ... glEnd(); glCheckForError(); snippet in OnDraw
...and now I get GL_INVALID_OPERATION. This is with Delphi 7, on NVidia, Windows 2000 Prof.
The problem seems to be inside dglOpenGL unit related to the STUB_xxx tricks they are doing. When I avoid relaying on STUB_xxx tricks, things suddenly work OK.
Two solutions that work for me:
1. Call ReadOpenGLCore right after InitOpenGL inside TGLPanel.Create
2. Or use other Delphi header than dglOpenGL header. E.g. when using standard Delphi OpenGL unit with the same code, problem disappears.
Bookmarks