Currently , in my code I am sorting my draw calls based on GL_BLEND, textures and vertex buffers ( in that order.) - this seems to be working pretty well.<?: prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Now I have to somehow incorporate GL_LIGHTING into my sort order... I am wondering if, from a performance point of view , are glEnable(GL_LIGHTING)/glDisable(GL_LIGHTING) calls considered context switch "heavy" and should I even bother trying to group batches based on the GL_LIGHTING state - in other words, is calling glEnable(GL_LIGHTING) ... glDisable(GL_LIGHTING) repeatedly, going to incur significant performance hit ?
Thanks
Walter