Windows runtime fix
This commit is contained in:
@@ -363,7 +363,7 @@
|
||||
<file name="src/renderer/opengl/OpenGLInit.cpp"/>
|
||||
<file name="src/renderer/opengl/OpenGLContext.cpp"/>
|
||||
<!-- <file name="src/renderer/opengl/OpenGL2Context.cpp"/> -->
|
||||
<file name="src/renderer/opengl/OpenGLS3D.cpp"/>
|
||||
<file name="src/renderer/opengl/OpenGLS3D.cpp" if="android" />
|
||||
<file name="src/renderer/opengl/OpenGLTexture.cpp"/>
|
||||
<file name="src/renderer/opengl/OpenGLProgram.cpp"/>
|
||||
<file name="src/renderer/opengl/OpenGLShaders.cpp"/>
|
||||
|
||||
@@ -68,7 +68,9 @@ namespace lime {
|
||||
QuickVec<GLuint> mZombieTextures;
|
||||
QuickVec<GLuint> mZombieVbos;
|
||||
|
||||
OpenGLS3D mS3D;
|
||||
#ifdef ANDROID
|
||||
OpenGLS3D *mS3D;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -57,7 +57,9 @@ namespace lime {
|
||||
e.mTexOffset = sizeof (float) * 2;
|
||||
e.mStride = sizeof (float) * 4;
|
||||
|
||||
#ifdef ANDROID
|
||||
mS3D.Init ();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -190,7 +192,11 @@ namespace lime {
|
||||
|
||||
void OpenGLContext::CombineModelView (const Matrix &inModelView) {
|
||||
|
||||
#ifdef ANDROID
|
||||
float eyeOffset = mS3D.GetEyeOffset ();
|
||||
#else
|
||||
float eyeOffset = 0;
|
||||
#endif
|
||||
|
||||
mTrans[0][0] = inModelView.m00 * mScaleX;
|
||||
mTrans[0][1] = inModelView.m01 * mScaleX;
|
||||
@@ -207,7 +213,9 @@ namespace lime {
|
||||
mTrans[2][2] = -1;
|
||||
mTrans[2][3] = inModelView.mtz;
|
||||
|
||||
#ifdef ANDROID
|
||||
mS3D.FocusEye (mTrans);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -710,20 +718,26 @@ namespace lime {
|
||||
S3D::SetOrientation (S3D_ORIENTATION_HORIZONTAL);
|
||||
}
|
||||
|
||||
#ifdef ANDROID
|
||||
mS3D.Resize (inWidth, inHeight);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void OpenGLContext::EndS3DRender() {
|
||||
|
||||
setOrtho (0, mWidth, 0, mHeight);
|
||||
#ifdef ANDROID
|
||||
mS3D.EndS3DRender (mWidth, mHeight, mTrans);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void OpenGLContext::SetS3DEye(int eye) {
|
||||
|
||||
#ifdef ANDROID
|
||||
mS3D.SetS3DEye (eye);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user