blob: 45bba955bf2d79e67fa9166262e558292e6dd65b (
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
# This .cfg file provides common options used among all Cg glue code
# generated for Jogl on all platforms.
Package com.jogamp.opengl.cg
JavaClass CgGL
Style AllStatic
JavaOutputDir gensrc/classes
NativeOutputDir gensrc/native/jogl_cg
HierarchicalNativeOutput false
ForceProcAddressGen __ALL__
LocalProcAddressCallingConvention __ALL__ APIENTRY
EmitProcAddressTable true
ProcAddressTableClassName CgProcAddressTable
GetProcAddressTableExpr cgProcAddressTable
ProcAddressNameExpr PFN $UPPERCASE({0}) PROC
#
# Map const char* return values to Java strings for these functions
#
ReturnsString cgGetAnnotationName
ReturnsString cgGetEnumString
ReturnsString cgGetErrorString
ReturnsString cgGetLastErrorString
ReturnsString cgGetLastListing
ReturnsString cgGetParameterName
ReturnsString cgGetParameterSemantic
ReturnsString cgGetPassName
ReturnsString cgGetProfileString
ReturnsString cgGetProgramString
ReturnsString cgGetResourceString
ReturnsString cgGetStateName
ReturnsString cgGetString
ReturnsString cgGetStringAnnotationValue
ReturnsString cgGetStringParameterValue
ReturnsString cgGetStringStateAssignmentValue
ReturnsString cgGetTechniqueName
ReturnsString cgGetTypeString
ArgumentIsString cgAddStateEnumerant 1
ArgumentIsString cgCreateArrayState 1
ArgumentIsString cgCreateArraySamplerState 1
ArgumentIsString cgCreateEffect 1 2
ArgumentIsString cgCreateEffectFromFile 1 2
ArgumentIsString cgCreateProgram 2 4 5
ArgumentIsString cgCreateProgramFromFile 2 4 5
ArgumentIsString cgCreateProgramFromEffect 2 3
ArgumentIsString cgCreateSamplerState 1
ArgumentIsString cgCreateState 1
ArgumentIsString cgGetEffectParameterBySemantic 1
ArgumentIsString cgGetEnum 0
ArgumentIsString cgGetNamedEffectParameter 1
ArgumentIsString cgGetNamedParameter 1
ArgumentIsString cgGetNamedPass 1
ArgumentIsString cgGetNamedProgramParameter 2
ArgumentIsString cgGetNamedSamplerState 1
ArgumentIsString cgGetNamedState 1
ArgumentIsString cgGetNamedSamplerStateAssignment 1
ArgumentIsString cgGetNamedStateAssignment 1
ArgumentIsString cgGetNamedStructParameter 1
ArgumentIsString cgGetNamedTechnique 1
ArgumentIsString cgGetNamedTechniqueAnnotation 1
ArgumentIsString cgGetNamedPassAnnotation 1
ArgumentIsString cgGetNamedParameterAnnotation 1
ArgumentIsString cgGetNamedProgramAnnotation 1
ArgumentIsString cgGetNamedUserType 1
ArgumentIsString cgGetProfile 0
ArgumentIsString cgGetType 0
ArgumentIsString cgGetResource 0
ArgumentIsString cgSetLastListing 1
ArgumentIsString cgSetParameterSemantic 1
ArgumentIsString cgSetStringParameterValue 1
# Opaque definitions
Opaque boolean CGbool
#
# FIXME!!!! Ignore these functions for now because we can't
# automatically handle C callbacks
#
Ignore cgSetErrorCallback
Ignore cgGetErrorCallback
Ignore cgSetErrorHandler
Ignore cgGetErrorHandler
Ignore cgSetStateCallbacks
Ignore cgGetStateSetCallback
Ignore cgGetStateResetCallback
Ignore cgGetStateValidateCallback
#
# FIXME!!!! Ignore these functions for now because bugs in the
# emitter code can't handle them
#
Ignore cgGetBooleanAnnotationValues
Ignore cgGetBoolStateAssignmentValues
Ignore cgGetFloatAnnotationValues
Ignore cgGetFloatStateAssignmentValues
Ignore cgGetIntAnnotationValues
Ignore cgGetIntStateAssignmentValues
Ignore cgGetParameterValues
Ignore cgGetProgramOptions
# And NativeLibLoader for help loading the native libraries
Import com.jogamp.opengl.impl.*
Import com.jogamp.common.os.DynamicLookupHelper
Import com.jogamp.common.os.DynamicLibraryBundle
Import com.jogamp.opengl.cg.CgDynamicLibraryBundleInfo
#
# NIODirectOnly directives for routines requiring them for semantic reasons
#
NIODirectOnly cgGLSetParameterPointer
# Raise CgException instead of RuntimeException in glue code
RuntimeExceptionType CgException
#
# Make sure the right definitions and include files are added to the
# generated C code
#
CustomCCode #include <stdlib.h>
CustomCCode #include <Cg/cgGL.h>
CustomCCode
CustomCCode #ifndef APIENTRY
CustomCCode #define APIENTRY
CustomCCode #endif
IncludeAs CustomJavaCode CgGL cg-common-CustomJavaCode.java
|