blob: 08658669a6c5e37b4bf7babcb21cae1d75a280e8 (
plain)
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
|
/*
* This file takes care of the C implementation of opening up an
* X window, assigning an OpenGL graphics context to it, storing that
* graphics context in the java class data structure.
*
* also contains the use() and swap() functions for double buffering
*
* Leo Chan -- 1995
*
* Adam King -- 1997
*
* Modified Creation window code to use the currently showing Java Frame
* window instead of creating a new window.
* ---------------
*
* Many improvements and changes are made !
*
* Sven Goethel
*
* September 1997
*
* some X stuff is also modified/debugged to run on aix ...
*/
/*
* need to include the JAVA internal header files for macros and function
* prototypes required to maipulated JAVA data structures and functions
*
* StubPreamble.h includes the structure and macro definitions neede to
* convert JAVA data structures into C data structures.
*
*/
#include "OpenGL_X11_common.h"
jboolean LIBAPIENTRY testX11Java()
{
jboolean ret=JNI_TRUE;
/* NON DEPENDENCE CHECKS */
/* FIRST OF ALL CHECK IF A NATIVE POINTER OR X11-TYPE FITS IN �jint� */
if( sizeof(jlong) < sizeof(Display *) )
{
fprintf(stderr,"GL4Java: (Display *) fits not in jlong\n");
ret = JNI_FALSE;
}
if( sizeof(jlong) < sizeof(GLXContext) )
{
fprintf(stderr,"GL4Java: GLXContext fits not in jlong\n");
ret = JNI_FALSE;
}
if( sizeof(jlong) < sizeof(Window) )
{
fprintf(stderr,"GL4Java: Window fits not in jlong\n");
ret = JNI_FALSE;
}
if(ret==JNI_FALSE)
{
fflush(stderr);
}
return ret;
}
|