checking state before setting state

im actually wondering if its worth checking the state before changing the state, eg: i want to enable lighting. is it worth me checking to see if lighting is already enabled before enabling it?

that depends wholly on how you check, if you have your own statetable for the things you check it will most likely be as fast/faster, but when dealing with GL directly it’s usually better to set a state to what you want, than querying it first.

Not sure how this relates to PCI express, queries might be faster, but I doubt if their that fast