Open m-7761 opened 4 years ago
Off-topic/related:
//glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL,GL_SEPARATE_SPECULAR_COLOR); //2020
glLightModeli(0x81F8,0x81FA); //2020
This can be added to initializeGL to get specular highlights. This is typically used by legacy OpenGL viewers since specular with the regular lighting model is not really anything like a specular highlights. The one drawback to this is it changes the appearance of the material pretty dramatically, so it would alter old MM3D files. It could be enabled selectively if that's a problem.
Also the glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER,false);
lines aren't likely required since that's the default and the difference from what I can gather is negligible. I think "true" should be used if anything probably... I think it's for VR maybe. I think it enables the equivalence of (per-vertex) range-fog (as opposed to pseudo depth-fog) but for specular highlight calcuation.
I just noticed there's no anisotropic filter. I added the following to Model::loadTextures and also had to add a m_validContext member to cover the context-free mode using the OpenGL texture inside the Material object.
...
I'm sitting on a significant upgrade if it can be integrated, this will be included.