/// <summary> /// Updates the current OpenGL rendering state based on <paramref name="settings"/>. /// </summary> /// <param name="settings">The settings used to perform the update</param> /// <param name="previousSettings">The settings used for the previous update</param> public static void SetFaceCulling(FaceCullingSettings settings, FaceCullingSettings previousSettings) { if (settings.enabled != previousSettings.enabled) { SetGLEnableCap(EnableCap.CullFace, settings.enabled); } if (settings.cullFaceMode != previousSettings.cullFaceMode) { GL.CullFace(settings.cullFaceMode); } }
private static void SetFaceCulling(FaceCullingSettings settings) { SetGLEnableCap(EnableCap.CullFace, settings.enabled); GL.CullFace(settings.cullFaceMode); }