summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt.opengl/common/library/glu_stats.c
blob: 3befc268da14704492b6f2d21a5fc3005d28c0d0 (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
70
71
72
73
74
75
76
77
78
79
80
81
82
#include "swt.h"
#include "glu_stats.h"

#ifdef NATIVE_STATS

int GLU_nativeFunctionCount = 51;
int GLU_nativeFunctionCallCount[51];
char * GLU_nativeFunctionNames[] = {
	"gluBeginCurve", 
	"gluBeginPolygon", 
	"gluBeginSurface", 
	"gluBeginTrim", 
	"gluBuild1DMipmaps", 
	"gluBuild2DMipmaps", 
	"gluCylinder", 
	"gluDeleteNurbsRenderer", 
	"gluDeleteQuadric", 
	"gluDeleteTess", 
	"gluDisk", 
	"gluEndCurve", 
	"gluEndPolygon", 
	"gluEndSurface", 
	"gluEndTrim", 
	"gluErrorString", 
	"gluGetNurbsProperty", 
	"gluGetString", 
	"gluGetTessProperty", 
	"gluLoadSamplingMatrices", 
	"gluLookAt", 
	"gluNewNurbsRenderer", 
	"gluNewQuadric", 
	"gluNewTess", 
	"gluNextContour", 
	"gluNurbsCallback", 
	"gluNurbsCurve", 
	"gluNurbsProperty", 
	"gluNurbsSurface", 
	"gluOrtho2D", 
	"gluPartialDisk", 
	"gluPerspective", 
	"gluPickMatrix", 
	"gluProject", 
	"gluPwlCurve", 
	"gluQuadricCallback", 
	"gluQuadricDrawStyle", 
	"gluQuadricNormals", 
	"gluQuadricOrientation", 
	"gluQuadricTexture", 
	"gluScaleImage", 
	"gluSphere", 
	"gluTessBeginContour", 
	"gluTessBeginPolygon", 
	"gluTessCallback", 
	"gluTessEndContour", 
	"gluTessEndPolygon", 
	"gluTessNormal", 
	"gluTessProperty", 
	"gluTessVertex", 
	"gluUnProject", 
};

#define STATS_NATIVE(func) Java_org_eclipse_swt_tools_internal_NativeStats_##func

JNIEXPORT jint JNICALL STATS_NATIVE(GLU_1GetFunctionCount)
	(JNIEnv *env, jclass that)
{
	return GLU_nativeFunctionCount;
}

JNIEXPORT jstring JNICALL STATS_NATIVE(GLU_1GetFunctionName)
	(JNIEnv *env, jclass that, jint index)
{
	return (*env)->NewStringUTF(env, GLU_nativeFunctionNames[index]);
}

JNIEXPORT jint JNICALL STATS_NATIVE(GLU_1GetFunctionCallCount)
	(JNIEnv *env, jclass that, jint index)
{
	return GLU_nativeFunctionCallCount[index];
}

#endif