Переглянути джерело

OpenGL now uses clockwise front faces same as dx9/dx11

BearishSun 9 роки тому
батько
коміт
7906a236f8
1 змінених файлів з 3 додано та 2 видалено
  1. 3 2
      BansheeGLRenderAPI/Source/BsGLRenderAPI.cpp

+ 3 - 2
BansheeGLRenderAPI/Source/BsGLRenderAPI.cpp

@@ -150,6 +150,7 @@ namespace BansheeEngine
 		mCurrentCapabilities = createRenderSystemCapabilities();
 		mCurrentCapabilities = createRenderSystemCapabilities();
 		initFromCaps(mCurrentCapabilities);
 		initFromCaps(mCurrentCapabilities);
 		GLVertexArrayObjectManager::startUp();
 		GLVertexArrayObjectManager::startUp();
+		glFrontFace(GL_CW);
 
 
 		mGLInitialised = true;
 		mGLInitialised = true;
 
 
@@ -1126,10 +1127,10 @@ namespace BansheeEngine
 			return;
 			return;
 		default:
 		default:
 		case CULL_CLOCKWISE:
 		case CULL_CLOCKWISE:
-			cullMode = GL_BACK;
+			cullMode = GL_FRONT;
 			break;
 			break;
 		case CULL_COUNTERCLOCKWISE:
 		case CULL_COUNTERCLOCKWISE:
-			cullMode = GL_FRONT;
+			cullMode = GL_BACK;
 			break;
 			break;
 		}
 		}