public class LWJGLUtil extends Object
Internal library methods
Modifier and Type | Class | Description |
---|---|---|
static interface |
LWJGLUtil.TokenFilter |
Simple interface for Field filtering.
|
Modifier and Type | Field | Description |
---|---|---|
static boolean |
CHECKS |
|
static boolean |
DEBUG |
Debug flag.
|
static ByteBuffer |
LWJGLIcon16x16 |
LWJGL Logo - 16 by 16 pixels
|
static ByteBuffer |
LWJGLIcon32x32 |
LWJGL Logo - 32 by 32 pixels
|
static int |
PLATFORM_LINUX |
|
static String |
PLATFORM_LINUX_NAME |
|
static int |
PLATFORM_MACOSX |
|
static String |
PLATFORM_MACOSX_NAME |
|
static int |
PLATFORM_WINDOWS |
|
static String |
PLATFORM_WINDOWS_NAME |
Constructor | Description |
---|---|
LWJGLUtil() |
Modifier and Type | Method | Description |
---|---|---|
static Map<Integer,String> |
getClassTokens(LWJGLUtil.TokenFilter filter,
Map<Integer,String> target,
Class... tokenClasses) |
Returns a map of public static final integer fields in the specified classes, to their String representations.
|
static Map<Integer,String> |
getClassTokens(LWJGLUtil.TokenFilter filter,
Map<Integer,String> target,
Iterable<Class> tokenClasses) |
Returns a map of public static final integer fields in the specified classes, to their String representations.
|
static String[] |
getLibraryPaths(String libname,
String[] platform_lib_names,
ClassLoader classloader) |
Locates the paths required by a library.
|
static String[] |
getLibraryPaths(String libname,
String platform_lib_name,
ClassLoader classloader) |
Locates the paths required by a library.
|
static int |
getPlatform() |
|
static String |
getPlatformName() |
|
static boolean |
getPrivilegedBoolean(String property_name) |
Gets a boolean property as a privileged action.
|
static Integer |
getPrivilegedInteger(String property_name) |
Gets an integer property as a privileged action.
|
static Integer |
getPrivilegedInteger(String property_name,
int default_val) |
Gets an integer property as a privileged action.
|
static boolean |
isMacOSXEqualsOrBetterThan(int major_required,
int minor_required) |
Method to determine if the current system is running a version of
Mac OS X better than the given version.
|
static void |
log(CharSequence msg) |
Prints the given message to System.err if DEBUG is true.
|
static String |
mapLibraryName(String name) |
|
static String |
toHexString(int value) |
Returns a string representation of the integer argument as an
unsigned integer in base 16.
|
public static final int PLATFORM_LINUX
public static final int PLATFORM_MACOSX
public static final int PLATFORM_WINDOWS
public static final String PLATFORM_LINUX_NAME
public static final String PLATFORM_MACOSX_NAME
public static final String PLATFORM_WINDOWS_NAME
public static final ByteBuffer LWJGLIcon16x16
public static final ByteBuffer LWJGLIcon32x32
public static final boolean DEBUG
public static final boolean CHECKS
public static int getPlatform()
PLATFORM_WINDOWS
,
PLATFORM_LINUX
,
PLATFORM_MACOSX
public static String getPlatformName()
PLATFORM_WINDOWS_NAME
,
PLATFORM_LINUX_NAME
,
PLATFORM_MACOSX_NAME
public static String mapLibraryName(String name)
System.mapLibraryName(java.lang.String)
. On OS X with JDK 6, the .jnilib file
extension will be replaced with .dylib.name
- the name of the library.public static String[] getLibraryPaths(String libname, String platform_lib_name, ClassLoader classloader)
libname
- Local Library Name to search the classloader with ("openal").platform_lib_name
- The native library name ("libopenal.so")classloader
- The classloader to ask for library pathspublic static String[] getLibraryPaths(String libname, String[] platform_lib_names, ClassLoader classloader)
libname
- Local Library Name to search the classloader with ("openal").platform_lib_names
- The list of possible library names ("libopenal.so")classloader
- The classloader to ask for library pathspublic static boolean getPrivilegedBoolean(String property_name)
public static Integer getPrivilegedInteger(String property_name)
property_name
- the integer property namepublic static Integer getPrivilegedInteger(String property_name, int default_val)
property_name
- the integer property namedefault_val
- the default value to use if the property is not definedpublic static void log(CharSequence msg)
msg
- Message to printpublic static boolean isMacOSXEqualsOrBetterThan(int major_required, int minor_required)
public static Map<Integer,String> getClassTokens(LWJGLUtil.TokenFilter filter, Map<Integer,String> target, Class... tokenClasses)
This method is useful when debugging to quickly identify values returned from the AL/GL/CL APIs.
filter
- the filter to use (optional)target
- the target map (optional)tokenClasses
- an array of classes to get tokens frompublic static Map<Integer,String> getClassTokens(LWJGLUtil.TokenFilter filter, Map<Integer,String> target, Iterable<Class> tokenClasses)
This method is useful when debugging to quickly identify values returned from the AL/GL/CL APIs.
filter
- the filter to use (optional)target
- the target map (optional)tokenClasses
- the classes to get tokens frompublic static String toHexString(int value)
value
- the integer valueCopyright © 2002-2009 lwjgl.org. All Rights Reserved.