public class HdpiUtils extends Object
Constructor and Description |
---|
HdpiUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
glScissor(int x,
int y,
int width,
int height)
Calls
GL20.glScissor(int, int, int, int) , expecting the coordinates and sizes given in logical coordinates and
automatically converts them to backbuffer coordinates, which may be bigger on HDPI screens. |
static void |
glViewport(int x,
int y,
int width,
int height)
Calls
GL20.glViewport(int, int, int, int) , expecting the coordinates and sizes given in logical coordinates and
automatically converts them to backbuffer coordinates, which may be bigger on HDPI screens. |
static int |
toBackBufferX(int logicalX)
Converts an x-coordinate given in logical screen coordinates to
backbuffer coordinates.
|
static int |
toBackBufferY(int logicalY)
Convers an y-coordinate given in backbuffer coordinates to
logical screen coordinates
|
static int |
toLogicalX(int backBufferX)
Converts an x-coordinate given in backbuffer coordinates to
logical screen coordinates.
|
static int |
toLogicalY(int backBufferY)
Convers an y-coordinate given in backbuffer coordinates to
logical screen coordinates
|
public static void glScissor(int x, int y, int width, int height)
GL20.glScissor(int, int, int, int)
, expecting the coordinates and sizes given in logical coordinates and
automatically converts them to backbuffer coordinates, which may be bigger on HDPI screens.public static void glViewport(int x, int y, int width, int height)
GL20.glViewport(int, int, int, int)
, expecting the coordinates and sizes given in logical coordinates and
automatically converts them to backbuffer coordinates, which may be bigger on HDPI screens.public static int toLogicalX(int backBufferX)
public static int toLogicalY(int backBufferY)
public static int toBackBufferX(int logicalX)
public static int toBackBufferY(int logicalY)
Copyright © 2016. All rights reserved.