OSDN Git Service

RoboVM backend didn't create a depth buffer
authorbadlogic <badlogicgames@gmail.com>
Tue, 17 Sep 2013 17:43:47 +0000 (19:43 +0200)
committerbadlogic <badlogicgames@gmail.com>
Tue, 17 Sep 2013 17:43:47 +0000 (19:43 +0200)
backends/gdx-backend-robovm/src/com/badlogic/gdx/backends/iosrobovm/IOSGraphics.java

index 48a5c51..901e57a 100644 (file)
@@ -10,6 +10,7 @@ import org.robovm.cocoatouch.glkit.GLKViewController;
 import org.robovm.cocoatouch.glkit.GLKViewControllerDelegate;
 import org.robovm.cocoatouch.glkit.GLKViewDelegate;
 import org.robovm.cocoatouch.glkit.GLKViewDrawableColorFormat;
+import org.robovm.cocoatouch.glkit.GLKViewDrawableDepthFormat;
 import org.robovm.cocoatouch.opengles.EAGLContext;
 import org.robovm.cocoatouch.opengles.EAGLRenderingAPI;
 import org.robovm.cocoatouch.uikit.UIDevice;
@@ -158,6 +159,7 @@ public class IOSGraphics extends NSObject implements Graphics, GLKViewDelegate,
                };
                view.setDelegate(this);
                view.setDrawableColorFormat(GLKViewDrawableColorFormat.RGB565);
+               view.setDrawableDepthFormat(GLKViewDrawableDepthFormat.Format16);
 
                viewController = new IOSUIViewController(app, this);
                viewController.setView(view);