public UsePixelCoordinates ( bool moveCornerToOrigin, int desiredWidth, int desiredHeight ) : void | ||
moveCornerToOrigin | bool | Whether the camera should be repositioned /// so the bottom left is at the origin. |
desiredWidth | int | The desired unit width of the view. |
desiredHeight | int | The desired unit height of the view. |
return | void |
internal static void SetupCamera(Camera cameraToSetUp, GraphicsDeviceManager graphicsDeviceManager) { #if !WINDOWS_PHONE FlatRedBallServices.GraphicsOptions.SetResolution(800, 600); #else graphicsDeviceManager.SupportedOrientations = DisplayOrientation.LandscapeLeft | DisplayOrientation.LandscapeRight; #endif cameraToSetUp.UsePixelCoordinates(false, 800, 600); }
internal static void SetupCamera (Camera cameraToSetUp, GraphicsDeviceManager graphicsDeviceManager) { #if !WINDOWS_PHONE && !WINDOWS_8 && !IOS && !ANDROID FlatRedBallServices.GraphicsOptions.SetResolution(800, 600); #endif #if WINDOWS_PHONE || WINDOWS_8 || IOS || ANDROID graphicsDeviceManager.SupportedOrientations = DisplayOrientation.LandscapeLeft | DisplayOrientation.LandscapeRight; #endif cameraToSetUp.UsePixelCoordinates(); }
public void ApplyTo(Camera cameraToApplyTo) { bool isPixelPerfect2D = this.Camera.OrthogonalHeight <= 0; this.Camera.SetCamera(cameraToApplyTo); if (isPixelPerfect2D) { cameraToApplyTo.UsePixelCoordinates(); } }
public RenderTargetRenderer(int width, int height, bool generateMipMaps = false) { mWidth = width; mHeight = height; var device = FlatRedBallServices.GraphicsDevice; mRenderTarget = new RenderTarget2D(device, mWidth, mHeight, generateMipMaps, device.DisplayMode.Format, DepthFormat.Depth24); Camera = new Camera(null, mWidth, mHeight); Camera.UsePixelCoordinates(); Camera.Z = 40; Camera.DrawsWorld = false; }
public void SetCameras(Camera camera, Camera boundsCamera) { bool isPixelPerfect2D = this.Camera.OrthogonalHeight <= 0; this.Camera.SetCamera(camera); this.BoundsCamera.SetCamera(boundsCamera); if (isPixelPerfect2D) { camera.UsePixelCoordinates(); } }
internal static void SetupCamera (Camera cameraToSetUp, GraphicsDeviceManager graphicsDeviceManager, int width, int height) { #if WINDOWS FlatRedBall.FlatRedBallServices.GraphicsOptions.SetResolution(width, height); #elif IOS || ANDROID FlatRedBall.FlatRedBallServices.GraphicsOptions.SetFullScreen(FlatRedBall.FlatRedBallServices.GraphicsOptions.ResolutionWidth, FlatRedBall.FlatRedBallServices.GraphicsOptions.ResolutionHeight); #endif #if WINDOWS_PHONE || WINDOWS_8 || IOS || ANDROID if (height > width) { graphicsDeviceManager.SupportedOrientations = DisplayOrientation.Portrait; } else { graphicsDeviceManager.SupportedOrientations = DisplayOrientation.LandscapeLeft | DisplayOrientation.LandscapeRight; } #endif cameraToSetUp.UsePixelCoordinates(); }
internal static void SetupCamera(Camera cameraToSetUp, GraphicsDeviceManager graphicsDeviceManager) { cameraToSetUp.UsePixelCoordinates(); }
internal static void SetupCamera(Camera cameraToSetUp) { FlatRedBallServices.GraphicsOptions.SetResolution(800, 600); cameraToSetUp.UsePixelCoordinates(false, 400, 300); }
internal static void SetupCamera (Camera cameraToSetUp, GraphicsDeviceManager graphicsDeviceManager, int width, int height) { cameraToSetUp.UsePixelCoordinates(false, 800, 600); }