-
-
Notifications
You must be signed in to change notification settings - Fork 440
Expand file tree
/
Copy pathContext.java
More file actions
70 lines (59 loc) · 1.94 KB
/
Copy pathContext.java
File metadata and controls
70 lines (59 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package app.f3d.F3D;
public class Context {
/** Thrown when a shared library required for a context cannot be loaded. */
public static class LoadingException extends F3DException {
public LoadingException(String message) { super(message); }
}
/** Thrown when a required symbol cannot be resolved from a shared library. */
public static class SymbolException extends F3DException {
public SymbolException(String message) { super(message); }
}
// Used to load the 'f3d' library on application startup.
static {
System.loadLibrary("f3d-java");
}
/**
* Create a GLX context.
*
* @return context handle (must be deleted with {@link #delete(long)})
*/
public static native long glx();
/**
* Create a WGL context.
*
* @return context handle (must be deleted with {@link #delete(long)})
*/
public static native long wgl();
/**
* Create a COCOA context.
*
* @return context handle (must be deleted with {@link #delete(long)})
*/
public static native long cocoa();
/**
* Create an EGL context.
*
* @return context handle (must be deleted with {@link #delete(long)})
*/
public static native long egl();
/**
* Create an OSMesa context.
*
* @return context handle (must be deleted with {@link #delete(long)})
*/
public static native long osmesa();
/**
* Create a context from a library name and a function name.
*
* @param lib the library name (without prefix or extension)
* @param func the function name to resolve
* @return context handle (must be deleted with {@link #delete(long)})
*/
public static native long getSymbol(String lib, String func);
/**
* Delete a context and free associated resources.
*
* @param contextHandle the context handle to delete
*/
public static native void delete(long contextHandle);
}