glViewPort() Error outside a glBegin()

Hi!

I got a weird problem here when i call glViewPort() within my program. It return me an error, even if i am outside a glBegin() glEnd(). And of course, my value ar’nt negative. Is someone know something about it?

My seconde problem is when i loop calling glGetError to clear all the error flag, my loop never exit. It is like my glGetError itself return an error.

All those 2 strange things happen in the same area in my code.

What can cause this?

Tanks in advanced!

Best regards,

Can’t you post some of your code so that we can determine the problem?