com.jogamp.newt.util
public class ScreenModeUtil extends Object
ScreenMode
utility methods,
filters etc.Modifier and Type | Field and Description |
---|---|
static int |
NUM_MONITOR_MODE_PROPERTIES
WARNING: must be synchronized with ScreenMode.h, native implementation
3: ScreenSizeMM[width, height], refresh-rate
|
static int |
NUM_RESOLUTION_PROPERTIES
WARNING: must be synchronized with ScreenMode.h, native implementation
2: width and height
|
static int |
NUM_SCREEN_MODE_PROPERTIES
WARNING: must be synchronized with ScreenMode.h, native implementation
1: rotation, native_mode_id
|
static int |
NUM_SCREEN_MODE_PROPERTIES_ALL
WARNING: must be synchronized with ScreenMode.h, native implementation
count + all the above
|
static int |
NUM_SURFACE_SIZE_PROPERTIES
WARNING: must be synchronized with ScreenMode.h, native implementation
1: bpp
|
Constructor and Description |
---|
ScreenModeUtil() |
Modifier and Type | Method and Description |
---|---|
static List<ScreenMode> |
filterByBpp(List<ScreenMode> screenModes,
int bitsPerPixel) |
static List<ScreenMode> |
filterByRate(List<ScreenMode> screenModes,
int refreshRate) |
static List<ScreenMode> |
filterByResolution(List<ScreenMode> screenModes,
DimensionImmutable resolution) |
static List<ScreenMode> |
filterByRotation(List<ScreenMode> screenModes,
int rotation) |
static List<ScreenMode> |
filterBySurfaceSize(List<ScreenMode> screenModes,
SurfaceSize surfaceSize) |
static List<ScreenMode> |
getHighestAvailableBpp(List<ScreenMode> screenModes) |
static List<ScreenMode> |
getHighestAvailableRate(List<ScreenMode> screenModes) |
static int |
getIndex(List<ScreenMode> screenModes,
ScreenMode search) |
static int |
getIndexByHashCode(List<ScreenMode> screenModes,
ScreenMode search) |
static int |
streamIn(com.jogamp.common.util.ArrayHashSet<DimensionImmutable> resolutionPool,
com.jogamp.common.util.ArrayHashSet<SurfaceSize> surfaceSizePool,
com.jogamp.common.util.ArrayHashSet<DimensionImmutable> screenSizeMMPool,
com.jogamp.common.util.ArrayHashSet<MonitorMode> monitorModePool,
com.jogamp.common.util.ArrayHashSet<ScreenMode> screenModePool,
int[] modeProperties,
int offset)
WARNING: must be synchronized with ScreenMode.h, native implementation
|
static ScreenMode |
streamIn(int[] modeProperties,
int offset)
WARNING: must be synchronized with ScreenMode.h, native implementation
|
static MonitorMode |
streamInMonitorMode(SurfaceSize surfaceSize,
DimensionImmutable screenSizeMM,
int[] monitorProperties,
int offset)
WARNING: must be synchronized with ScreenMode.h, native implementation
|
static DimensionImmutable |
streamInResolution(int[] resolutionProperties,
int offset)
WARNING: must be synchronized with ScreenMode.h, native implementation
|
static ScreenMode |
streamInScreenMode(MonitorMode monitorMode,
int[] modeProperties,
int offset)
WARNING: must be synchronized with ScreenMode.h, native implementation
|
static SurfaceSize |
streamInSurfaceSize(DimensionImmutable resolution,
int[] sizeProperties,
int offset)
WARNING: must be synchronized with ScreenMode.h, native implementation
|
static int[] |
streamOut(ScreenMode screenMode)
WARNING: must be synchronized with ScreenMode.h, native implementation
|
public static final int NUM_RESOLUTION_PROPERTIES
public static final int NUM_SURFACE_SIZE_PROPERTIES
public static final int NUM_MONITOR_MODE_PROPERTIES
public static final int NUM_SCREEN_MODE_PROPERTIES
public static final int NUM_SCREEN_MODE_PROPERTIES_ALL
public static int getIndex(List<ScreenMode> screenModes, ScreenMode search)
public static int getIndexByHashCode(List<ScreenMode> screenModes, ScreenMode search)
public static List<ScreenMode> filterByResolution(List<ScreenMode> screenModes, DimensionImmutable resolution)
screenModes
- resolution
- public static List<ScreenMode> filterBySurfaceSize(List<ScreenMode> screenModes, SurfaceSize surfaceSize)
public static List<ScreenMode> filterByRotation(List<ScreenMode> screenModes, int rotation)
public static List<ScreenMode> filterByBpp(List<ScreenMode> screenModes, int bitsPerPixel)
public static List<ScreenMode> filterByRate(List<ScreenMode> screenModes, int refreshRate)
screenModes
- refreshRate
- public static List<ScreenMode> getHighestAvailableBpp(List<ScreenMode> screenModes)
public static List<ScreenMode> getHighestAvailableRate(List<ScreenMode> screenModes)
public static DimensionImmutable streamInResolution(int[] resolutionProperties, int offset)
public static SurfaceSize streamInSurfaceSize(DimensionImmutable resolution, int[] sizeProperties, int offset)
public static MonitorMode streamInMonitorMode(SurfaceSize surfaceSize, DimensionImmutable screenSizeMM, int[] monitorProperties, int offset)
public static ScreenMode streamInScreenMode(MonitorMode monitorMode, int[] modeProperties, int offset)
public static ScreenMode streamIn(int[] modeProperties, int offset)
modeProperties
- the input dataoffset
- the offset to the input datamodeProperties
,
or null if input could not be processed.public static int streamIn(com.jogamp.common.util.ArrayHashSet<DimensionImmutable> resolutionPool, com.jogamp.common.util.ArrayHashSet<SurfaceSize> surfaceSizePool, com.jogamp.common.util.ArrayHashSet<DimensionImmutable> screenSizeMMPool, com.jogamp.common.util.ArrayHashSet<MonitorMode> monitorModePool, com.jogamp.common.util.ArrayHashSet<ScreenMode> screenModePool, int[] modeProperties, int offset)
resolutionPool
- hash array of unique resolutions, no duplicatessurfaceSizePool
- hash array of unique SurfaceSize, no duplicatesmonitorModePool
- hash array of unique MonitorMode, no duplicatesscreenModePool
- hash array of unique ScreenMode, no duplicatesmodeProperties
- the input dataoffset
- the offset to the input datascreenModePool
,
matching the input modeProperties
, or -1 if input could not be processed.public static int[] streamOut(ScreenMode screenMode)
Copyright 2010 JogAmp Community.