sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description: M3G core API public interface
|
sl@0
|
15 |
*
|
sl@0
|
16 |
*/
|
sl@0
|
17 |
|
sl@0
|
18 |
#ifndef __M3G_CORE_H__
|
sl@0
|
19 |
#define __M3G_CORE_H__
|
sl@0
|
20 |
|
sl@0
|
21 |
#if defined(__cplusplus)
|
sl@0
|
22 |
extern "C" {
|
sl@0
|
23 |
#endif
|
sl@0
|
24 |
|
sl@0
|
25 |
/*!
|
sl@0
|
26 |
* \file
|
sl@0
|
27 |
* \brief Public interface to the M3G core library
|
sl@0
|
28 |
*
|
sl@0
|
29 |
* This can be overlaid by an additional layer providing the actual
|
sl@0
|
30 |
* API for different languages; for the JSR184 API, this is the Java
|
sl@0
|
31 |
* binding layer.
|
sl@0
|
32 |
*/
|
sl@0
|
33 |
|
sl@0
|
34 |
#if (__ARMCC_VERSION >= 220000)
|
sl@0
|
35 |
# if defined(M3G_BUILD_DLL)
|
sl@0
|
36 |
# define M3G_API __declspec(dllexport)
|
sl@0
|
37 |
# else
|
sl@0
|
38 |
# define M3G_API __declspec(dllimport)
|
sl@0
|
39 |
# endif
|
sl@0
|
40 |
#else
|
sl@0
|
41 |
# if defined(M3G_BUILD_DLL)
|
sl@0
|
42 |
# define M3G_API __declspec(dllexport)
|
sl@0
|
43 |
# else
|
sl@0
|
44 |
# define M3G_API
|
sl@0
|
45 |
# endif
|
sl@0
|
46 |
#endif
|
sl@0
|
47 |
|
sl@0
|
48 |
/*----------------------------------------------------------------------
|
sl@0
|
49 |
* Enumerated constants
|
sl@0
|
50 |
*--------------------------------------------------------------------*/
|
sl@0
|
51 |
|
sl@0
|
52 |
/*javax.microedition.m3g.AnimationTrack*/
|
sl@0
|
53 |
#define M3G_ANIM_ALPHA 256
|
sl@0
|
54 |
#define M3G_ANIM_AMBIENT_COLOR 257
|
sl@0
|
55 |
#define M3G_ANIM_COLOR 258
|
sl@0
|
56 |
#define M3G_ANIM_CROP 259
|
sl@0
|
57 |
#define M3G_ANIM_DENSITY 260
|
sl@0
|
58 |
#define M3G_ANIM_DIFFUSE_COLOR 261
|
sl@0
|
59 |
#define M3G_ANIM_EMISSIVE_COLOR 262
|
sl@0
|
60 |
#define M3G_ANIM_FAR_DISTANCE 263
|
sl@0
|
61 |
#define M3G_ANIM_FIELD_OF_VIEW 264
|
sl@0
|
62 |
#define M3G_ANIM_INTENSITY 265
|
sl@0
|
63 |
#define M3G_ANIM_MORPH_WEIGHTS 266
|
sl@0
|
64 |
#define M3G_ANIM_NEAR_DISTANCE 267
|
sl@0
|
65 |
#define M3G_ANIM_ORIENTATION 268
|
sl@0
|
66 |
#define M3G_ANIM_PICKABILITY 269
|
sl@0
|
67 |
#define M3G_ANIM_SCALE 270
|
sl@0
|
68 |
#define M3G_ANIM_SHININESS 271
|
sl@0
|
69 |
#define M3G_ANIM_SPECULAR_COLOR 272
|
sl@0
|
70 |
#define M3G_ANIM_SPOT_ANGLE 273
|
sl@0
|
71 |
#define M3G_ANIM_SPOT_EXPONENT 274
|
sl@0
|
72 |
#define M3G_ANIM_TRANSLATION 275
|
sl@0
|
73 |
#define M3G_ANIM_VISIBILITY 276
|
sl@0
|
74 |
|
sl@0
|
75 |
/*javax.microedition.m3g.Background*/
|
sl@0
|
76 |
#define M3G_BORDER 32
|
sl@0
|
77 |
#define M3G_REPEAT 33
|
sl@0
|
78 |
|
sl@0
|
79 |
/*javax.microedition.m3g.Camera*/
|
sl@0
|
80 |
#define M3G_GENERIC 48
|
sl@0
|
81 |
#define M3G_PARALLEL 49
|
sl@0
|
82 |
#define M3G_PERSPECTIVE 50
|
sl@0
|
83 |
|
sl@0
|
84 |
/*javax.microedition.m3g.CompositingMode*/
|
sl@0
|
85 |
#define M3G_ALPHA_BLEND 64
|
sl@0
|
86 |
#define M3G_ALPHA_ADD 65
|
sl@0
|
87 |
#define M3G_MODULATE 66
|
sl@0
|
88 |
#define M3G_MODULATE_X2 67
|
sl@0
|
89 |
#define M3G_REPLACE 68
|
sl@0
|
90 |
|
sl@0
|
91 |
/*javax.microedition.m3g.Fog*/
|
sl@0
|
92 |
#define M3G_EXPONENTIAL_FOG 80
|
sl@0
|
93 |
#define M3G_LINEAR_FOG 81
|
sl@0
|
94 |
|
sl@0
|
95 |
/*javax.microedition.m3g.Graphics3D*/
|
sl@0
|
96 |
#define M3G_ANTIALIAS_BIT 2
|
sl@0
|
97 |
#define M3G_DITHER_BIT 4
|
sl@0
|
98 |
#define M3G_TRUECOLOR_BIT 8
|
sl@0
|
99 |
#define M3G_OVERWRITE_BIT 16
|
sl@0
|
100 |
|
sl@0
|
101 |
/*javax.microedition.m3g.Image2D*/
|
sl@0
|
102 |
typedef enum
|
sl@0
|
103 |
{
|
sl@0
|
104 |
M3G_ALPHA = 96,
|
sl@0
|
105 |
M3G_LUMINANCE = 97,
|
sl@0
|
106 |
M3G_LUMINANCE_ALPHA = 98,
|
sl@0
|
107 |
M3G_RGB = 99,
|
sl@0
|
108 |
M3G_RGBA = 100
|
sl@0
|
109 |
} M3GImageFormat;
|
sl@0
|
110 |
|
sl@0
|
111 |
/*javax.microedition.m3g.KeyframeSequence*/
|
sl@0
|
112 |
#define M3G_LINEAR 176
|
sl@0
|
113 |
#define M3G_SLERP 177
|
sl@0
|
114 |
#define M3G_SPLINE 178
|
sl@0
|
115 |
#define M3G_SQUAD 179
|
sl@0
|
116 |
#define M3G_STEP 180
|
sl@0
|
117 |
#define M3G_CONSTANT 192
|
sl@0
|
118 |
#define M3G_LOOP 193
|
sl@0
|
119 |
|
sl@0
|
120 |
/*javax.microedition.m3g.Light*/
|
sl@0
|
121 |
#define M3G_AMBIENT 128
|
sl@0
|
122 |
#define M3G_DIRECTIONAL 129
|
sl@0
|
123 |
#define M3G_OMNI 130
|
sl@0
|
124 |
#define M3G_SPOT 131
|
sl@0
|
125 |
|
sl@0
|
126 |
/*javax.microedition.m3g.Material*/
|
sl@0
|
127 |
#define M3G_AMBIENT_BIT 1024
|
sl@0
|
128 |
#define M3G_DIFFUSE_BIT 2048
|
sl@0
|
129 |
#define M3G_EMISSIVE_BIT 4096
|
sl@0
|
130 |
#define M3G_SPECULAR_BIT 8192
|
sl@0
|
131 |
|
sl@0
|
132 |
/*javax.microedition.m3g.Node*/
|
sl@0
|
133 |
#define M3G_NONE 144
|
sl@0
|
134 |
#define M3G_ORIGIN 145
|
sl@0
|
135 |
#define M3G_X_AXIS 146
|
sl@0
|
136 |
#define M3G_Y_AXIS 147
|
sl@0
|
137 |
#define M3G_Z_AXIS 148
|
sl@0
|
138 |
|
sl@0
|
139 |
/*javax.microedition.m3g.Object3D*/
|
sl@0
|
140 |
typedef enum {
|
sl@0
|
141 |
M3G_CLASS_ANIMATION_CONTROLLER = 1,
|
sl@0
|
142 |
M3G_CLASS_ANIMATION_TRACK = 2,
|
sl@0
|
143 |
M3G_CLASS_APPEARANCE = 3,
|
sl@0
|
144 |
M3G_CLASS_BACKGROUND = 4,
|
sl@0
|
145 |
M3G_CLASS_CAMERA = 5,
|
sl@0
|
146 |
M3G_CLASS_COMPOSITING_MODE = 6,
|
sl@0
|
147 |
M3G_CLASS_FOG = 7,
|
sl@0
|
148 |
M3G_CLASS_GROUP = 8,
|
sl@0
|
149 |
M3G_CLASS_IMAGE = 9,
|
sl@0
|
150 |
M3G_CLASS_INDEX_BUFFER = 10,
|
sl@0
|
151 |
M3G_CLASS_KEYFRAME_SEQUENCE = 11,
|
sl@0
|
152 |
M3G_CLASS_LIGHT = 12,
|
sl@0
|
153 |
M3G_CLASS_LOADER = 13,
|
sl@0
|
154 |
M3G_CLASS_MATERIAL = 14,
|
sl@0
|
155 |
M3G_CLASS_MESH = 15,
|
sl@0
|
156 |
M3G_CLASS_MORPHING_MESH = 16,
|
sl@0
|
157 |
M3G_CLASS_POLYGON_MODE = 17,
|
sl@0
|
158 |
M3G_CLASS_RENDER_CONTEXT = 18,
|
sl@0
|
159 |
M3G_CLASS_SKINNED_MESH = 19,
|
sl@0
|
160 |
M3G_CLASS_SPRITE = 20,
|
sl@0
|
161 |
M3G_CLASS_TEXTURE = 21,
|
sl@0
|
162 |
M3G_CLASS_VERTEX_ARRAY = 22,
|
sl@0
|
163 |
M3G_CLASS_VERTEX_BUFFER = 23,
|
sl@0
|
164 |
M3G_CLASS_WORLD = 24,
|
sl@0
|
165 |
/* extra enumeration used for abstract classes */
|
sl@0
|
166 |
M3G_ABSTRACT_CLASS = 0
|
sl@0
|
167 |
} M3GClass;
|
sl@0
|
168 |
|
sl@0
|
169 |
/*javax.microedition.m3g.PolygonMode*/
|
sl@0
|
170 |
#define M3G_CULL_BACK 160
|
sl@0
|
171 |
#define M3G_CULL_FRONT 161
|
sl@0
|
172 |
#define M3G_CULL_NONE 162
|
sl@0
|
173 |
#define M3G_SHADE_FLAT 164
|
sl@0
|
174 |
#define M3G_SHADE_SMOOTH 165
|
sl@0
|
175 |
#define M3G_WINDING_CCW 168
|
sl@0
|
176 |
#define M3G_WINDING_CW 169
|
sl@0
|
177 |
|
sl@0
|
178 |
/*javax.microedition.m3g.Texture2D*/
|
sl@0
|
179 |
#define M3G_FILTER_BASE_LEVEL 208
|
sl@0
|
180 |
#define M3G_FILTER_LINEAR 209
|
sl@0
|
181 |
#define M3G_FILTER_NEAREST 210
|
sl@0
|
182 |
#define M3G_FUNC_ADD 224
|
sl@0
|
183 |
#define M3G_FUNC_BLEND 225
|
sl@0
|
184 |
#define M3G_FUNC_DECAL 226
|
sl@0
|
185 |
#define M3G_FUNC_MODULATE 227
|
sl@0
|
186 |
#define M3G_FUNC_REPLACE 228
|
sl@0
|
187 |
#define M3G_WRAP_CLAMP 240
|
sl@0
|
188 |
#define M3G_WRAP_REPEAT 241
|
sl@0
|
189 |
|
sl@0
|
190 |
/*javax.microedition.m3g.Defs*/
|
sl@0
|
191 |
#define M3G_GET_POSITIONS 0
|
sl@0
|
192 |
#define M3G_GET_NORMALS 1
|
sl@0
|
193 |
#define M3G_GET_COLORS 2
|
sl@0
|
194 |
#define M3G_GET_TEXCOORDS0 3
|
sl@0
|
195 |
#define M3G_GET_CROPX 0
|
sl@0
|
196 |
#define M3G_GET_CROPY 1
|
sl@0
|
197 |
#define M3G_GET_CROPWIDTH 2
|
sl@0
|
198 |
#define M3G_GET_CROPHEIGHT 3
|
sl@0
|
199 |
#define M3G_GET_MODEX 0
|
sl@0
|
200 |
#define M3G_GET_MODEY 1
|
sl@0
|
201 |
#define M3G_SETGET_COLORCLEAR 0
|
sl@0
|
202 |
#define M3G_SETGET_DEPTHCLEAR 1
|
sl@0
|
203 |
#define M3G_GET_NEAR 0
|
sl@0
|
204 |
#define M3G_GET_FAR 1
|
sl@0
|
205 |
#define M3G_SETGET_RENDERING 0
|
sl@0
|
206 |
#define M3G_SETGET_PICKING 1
|
sl@0
|
207 |
#define M3G_GET_CONSTANT 0
|
sl@0
|
208 |
#define M3G_GET_LINEAR 1
|
sl@0
|
209 |
#define M3G_GET_QUADRATIC 2
|
sl@0
|
210 |
|
sl@0
|
211 |
/*--------------------------------------------------------------------*/
|
sl@0
|
212 |
/* Object usage flag bits
|
sl@0
|
213 |
*
|
sl@0
|
214 |
* Currently only used for Image
|
sl@0
|
215 |
*/
|
sl@0
|
216 |
|
sl@0
|
217 |
/*! \brief Specifies that an object can be written to at any time */
|
sl@0
|
218 |
#define M3G_DYNAMIC 0x0001
|
sl@0
|
219 |
/*! \brief Specifies that an object can only be written to prior to
|
sl@0
|
220 |
* its first use (default) */
|
sl@0
|
221 |
#define M3G_STATIC 0x0002
|
sl@0
|
222 |
/*! \brief Specifies that an Image can be rendered to (implies
|
sl@0
|
223 |
* M3G_DYNAMIC) */
|
sl@0
|
224 |
#define M3G_RENDERING_TARGET 0x0004
|
sl@0
|
225 |
/*!
|
sl@0
|
226 |
* \brief Specifies that an Image is paletted
|
sl@0
|
227 |
*/
|
sl@0
|
228 |
#define M3G_PALETTED 0x0008
|
sl@0
|
229 |
|
sl@0
|
230 |
|
sl@0
|
231 |
/*--------------------------------------------------------------------*/
|
sl@0
|
232 |
/* Buffer bit constants */
|
sl@0
|
233 |
#define M3G_COLOR_BUFFER_BIT 0x0001
|
sl@0
|
234 |
#define M3G_DEPTH_BUFFER_BIT 0x0002
|
sl@0
|
235 |
#define M3G_STENCIL_BUFFER_BIT 0x0004
|
sl@0
|
236 |
#define M3G_MULTISAMPLE_BUFFER_BIT 0x0008
|
sl@0
|
237 |
|
sl@0
|
238 |
/*--------------------------------------------------------------------*/
|
sl@0
|
239 |
/* Pixel (output/texture) formats
|
sl@0
|
240 |
*/
|
sl@0
|
241 |
typedef enum {
|
sl@0
|
242 |
M3G_L8,
|
sl@0
|
243 |
M3G_A8,
|
sl@0
|
244 |
M3G_LA8,
|
sl@0
|
245 |
M3G_LA4,
|
sl@0
|
246 |
M3G_RGB8,
|
sl@0
|
247 |
M3G_RGB8_32,
|
sl@0
|
248 |
M3G_BGR8_32,
|
sl@0
|
249 |
M3G_RGB4,
|
sl@0
|
250 |
M3G_RGB565,
|
sl@0
|
251 |
M3G_RGBA8,
|
sl@0
|
252 |
M3G_BGRA8,
|
sl@0
|
253 |
M3G_ARGB8,
|
sl@0
|
254 |
M3G_RGBA4,
|
sl@0
|
255 |
M3G_RGB5A1,
|
sl@0
|
256 |
M3G_PALETTE8_RGB8,
|
sl@0
|
257 |
M3G_PALETTE8_RGB8_32,
|
sl@0
|
258 |
M3G_PALETTE8_RGBA8,
|
sl@0
|
259 |
M3G_NO_FORMAT
|
sl@0
|
260 |
} M3GPixelFormat;
|
sl@0
|
261 |
|
sl@0
|
262 |
/* Errors */
|
sl@0
|
263 |
typedef enum {
|
sl@0
|
264 |
M3G_NO_ERROR = 0x00,
|
sl@0
|
265 |
M3G_INVALID_VALUE,
|
sl@0
|
266 |
M3G_INVALID_ENUM,
|
sl@0
|
267 |
M3G_INVALID_OPERATION,
|
sl@0
|
268 |
M3G_INVALID_OBJECT,
|
sl@0
|
269 |
M3G_INVALID_INDEX,
|
sl@0
|
270 |
M3G_OUT_OF_MEMORY,
|
sl@0
|
271 |
M3G_NULL_POINTER,
|
sl@0
|
272 |
M3G_ARITHMETIC_ERROR,
|
sl@0
|
273 |
M3G_IO_ERROR
|
sl@0
|
274 |
} M3GError;
|
sl@0
|
275 |
|
sl@0
|
276 |
/* Supported types of rendering primitives
|
sl@0
|
277 |
*
|
sl@0
|
278 |
* These match GL enums directly.
|
sl@0
|
279 |
*/
|
sl@0
|
280 |
typedef enum {
|
sl@0
|
281 |
M3G_TRIANGLE_STRIPS = 0x05
|
sl@0
|
282 |
/*M3G_TRIANGLES,
|
sl@0
|
283 |
M3G_TRIANGLE_FANS*/
|
sl@0
|
284 |
} M3Gprimitive;
|
sl@0
|
285 |
|
sl@0
|
286 |
/*--------------------------------------------------------------------*/
|
sl@0
|
287 |
/*! \brief Supported input data types
|
sl@0
|
288 |
*
|
sl@0
|
289 |
* These can be converted to/from OpengGL type enums by adding 0x1400.
|
sl@0
|
290 |
*/
|
sl@0
|
291 |
typedef enum {
|
sl@0
|
292 |
M3G_BYTE = 0x00,
|
sl@0
|
293 |
M3G_UBYTE,
|
sl@0
|
294 |
M3G_SHORT,
|
sl@0
|
295 |
M3G_USHORT,
|
sl@0
|
296 |
M3G_INT,
|
sl@0
|
297 |
M3G_UINT,
|
sl@0
|
298 |
M3G_FLOAT
|
sl@0
|
299 |
} M3Gdatatype;
|
sl@0
|
300 |
|
sl@0
|
301 |
/*--------------------------------------------------------------------*/
|
sl@0
|
302 |
/*! \brief Profiling statistics */
|
sl@0
|
303 |
typedef enum {
|
sl@0
|
304 |
M3G_STAT_CULLING_TESTS,
|
sl@0
|
305 |
M3G_STAT_FLOPS,
|
sl@0
|
306 |
M3G_STAT_MEMORY_ALLOCS,
|
sl@0
|
307 |
M3G_STAT_MEMORY_LOCKS,
|
sl@0
|
308 |
M3G_STAT_RENDER_NODES,
|
sl@0
|
309 |
M3G_STAT_RENDER_NODES_CULLED,
|
sl@0
|
310 |
M3G_STAT_RENDER_NODES_DRAWN,
|
sl@0
|
311 |
M3G_STAT_TCACHE_COMPOSITE_COLLISIONS,
|
sl@0
|
312 |
M3G_STAT_TCACHE_COMPOSITE_HITS,
|
sl@0
|
313 |
M3G_STAT_TCACHE_COMPOSITE_INSERTS,
|
sl@0
|
314 |
M3G_STAT_TCACHE_COMPOSITE_MISSES,
|
sl@0
|
315 |
M3G_STAT_TCACHE_PATH_COLLISIONS,
|
sl@0
|
316 |
M3G_STAT_TCACHE_PATH_FLUSHES,
|
sl@0
|
317 |
M3G_STAT_TCACHE_PATH_HITS,
|
sl@0
|
318 |
M3G_STAT_TCACHE_PATH_INSERTS,
|
sl@0
|
319 |
M3G_STAT_TCACHE_PATH_MISSES,
|
sl@0
|
320 |
M3G_PROFILE_ALIGN,
|
sl@0
|
321 |
M3G_PROFILE_ANIM,
|
sl@0
|
322 |
M3G_PROFILE_BINDTORELEASE,
|
sl@0
|
323 |
M3G_PROFILE_COMMIT,
|
sl@0
|
324 |
M3G_PROFILE_LOADER_DECODE,
|
sl@0
|
325 |
M3G_PROFILE_MORPH,
|
sl@0
|
326 |
M3G_PROFILE_NGL_DRAW,
|
sl@0
|
327 |
M3G_PROFILE_PICK,
|
sl@0
|
328 |
M3G_PROFILE_RELEASETOBIND,
|
sl@0
|
329 |
M3G_PROFILE_SETUP,
|
sl@0
|
330 |
M3G_PROFILE_SETUP_SORT,
|
sl@0
|
331 |
M3G_PROFILE_SETUP_TRANSFORMS,
|
sl@0
|
332 |
M3G_PROFILE_SKIN,
|
sl@0
|
333 |
M3G_PROFILE_TCACHE,
|
sl@0
|
334 |
M3G_PROFILE_TRANSFORM_INVERT,
|
sl@0
|
335 |
M3G_PROFILE_TRANSFORM_TO,
|
sl@0
|
336 |
M3G_PROFILE_VALIDATE,
|
sl@0
|
337 |
M3G_PROFILE_VFC_TEST,
|
sl@0
|
338 |
M3G_PROFILE_VFC_UPDATE,
|
sl@0
|
339 |
/*----------------*/
|
sl@0
|
340 |
M3G_STAT_CUMULATIVE, /* the rest are not cleared automatically */
|
sl@0
|
341 |
/*----------------*/
|
sl@0
|
342 |
M3G_STAT_BOUNDING_BOXES,
|
sl@0
|
343 |
M3G_STAT_MEMORY_ALLOCATED,
|
sl@0
|
344 |
M3G_STAT_MEMORY_MALLOC_BYTES,
|
sl@0
|
345 |
M3G_STAT_MEMORY_MALLOC_PEAK,
|
sl@0
|
346 |
M3G_STAT_MEMORY_OBJECT_BYTES,
|
sl@0
|
347 |
M3G_STAT_MEMORY_OBJECT_PEAK,
|
sl@0
|
348 |
M3G_STAT_MEMORY_PEAK,
|
sl@0
|
349 |
M3G_STAT_OBJECTS,
|
sl@0
|
350 |
M3G_STAT_RENDERABLES,
|
sl@0
|
351 |
M3G_STAT_RENDERQUEUE_SIZE,
|
sl@0
|
352 |
M3G_STAT_TCACHE_COMPOSITE_LOAD,
|
sl@0
|
353 |
M3G_STAT_TCACHE_PATH_LOAD,
|
sl@0
|
354 |
/*----------------*/
|
sl@0
|
355 |
M3G_STAT_MAX
|
sl@0
|
356 |
} M3Gstatistic;
|
sl@0
|
357 |
|
sl@0
|
358 |
#define MIN_PROFILE_STAT M3G_PROFILE_ALIGN
|
sl@0
|
359 |
|
sl@0
|
360 |
/*----------------------------------------------------------------------
|
sl@0
|
361 |
* Portable numeric types
|
sl@0
|
362 |
*--------------------------------------------------------------------*/
|
sl@0
|
363 |
|
sl@0
|
364 |
typedef int M3Gint; /*!< \brief 32-bit signed integer */
|
sl@0
|
365 |
typedef short M3Gshort; /*!< \brief 16-bit signed integer */
|
sl@0
|
366 |
typedef signed char M3Gbyte; /*!< \brief 8-bit signed integer */
|
sl@0
|
367 |
typedef unsigned M3Guint; /*!< \brief 32-bit unsigned integer */
|
sl@0
|
368 |
typedef unsigned short M3Gushort; /*!< \brief 16-bit unsigned integer */
|
sl@0
|
369 |
typedef unsigned char M3Gubyte; /*!< \brief 8-bit unsigned integer */
|
sl@0
|
370 |
typedef float M3Gfloat; /*!< \brief 32-bit IEEE float */
|
sl@0
|
371 |
|
sl@0
|
372 |
typedef M3Gint M3Genum;
|
sl@0
|
373 |
typedef M3Guint M3Gbitmask;
|
sl@0
|
374 |
typedef M3Guint M3Gbool;
|
sl@0
|
375 |
|
sl@0
|
376 |
typedef M3Gint M3Gsizei;
|
sl@0
|
377 |
|
sl@0
|
378 |
/* Boolean values */
|
sl@0
|
379 |
#define M3G_TRUE ((M3Gbool)1)
|
sl@0
|
380 |
#define M3G_FALSE ((M3Gbool)0)
|
sl@0
|
381 |
|
sl@0
|
382 |
/*----------------------------------------------------------------------
|
sl@0
|
383 |
* Object handle types
|
sl@0
|
384 |
*--------------------------------------------------------------------*/
|
sl@0
|
385 |
|
sl@0
|
386 |
typedef struct M3GInterfaceImpl *M3GInterface;
|
sl@0
|
387 |
typedef struct M3GLoaderImpl *M3GLoader;
|
sl@0
|
388 |
typedef struct M3GObjectImpl *M3GObject;
|
sl@0
|
389 |
typedef struct M3GAnimationControllerImpl *M3GAnimationController;
|
sl@0
|
390 |
typedef struct M3GAnimationTrackImpl *M3GAnimationTrack;
|
sl@0
|
391 |
typedef struct M3GAppearanceImpl *M3GAppearance;
|
sl@0
|
392 |
typedef struct M3GBackgroundImpl *M3GBackground;
|
sl@0
|
393 |
typedef struct M3GCompositingModeImpl *M3GCompositingMode;
|
sl@0
|
394 |
typedef struct M3GFogImpl *M3GFog;
|
sl@0
|
395 |
typedef struct M3GImageImpl *M3GImage;
|
sl@0
|
396 |
typedef struct M3GIndexBufferImpl *M3GIndexBuffer;
|
sl@0
|
397 |
typedef struct M3GKeyframeSequenceImpl *M3GKeyframeSequence;
|
sl@0
|
398 |
typedef struct M3GMaterialImpl *M3GMaterial;
|
sl@0
|
399 |
typedef struct M3GTransformableImpl *M3GTransformable;
|
sl@0
|
400 |
typedef struct M3GNodeImpl *M3GNode;
|
sl@0
|
401 |
typedef struct M3GCameraImpl *M3GCamera;
|
sl@0
|
402 |
typedef struct M3GGroupImpl *M3GGroup;
|
sl@0
|
403 |
typedef struct M3GWorldImpl *M3GWorld;
|
sl@0
|
404 |
typedef struct M3GLightImpl *M3GLight;
|
sl@0
|
405 |
typedef struct M3GMeshImpl *M3GMesh;
|
sl@0
|
406 |
typedef struct M3GMorphingMeshImpl *M3GMorphingMesh;
|
sl@0
|
407 |
typedef struct M3GSkinnedMeshImpl *M3GSkinnedMesh;
|
sl@0
|
408 |
typedef struct M3GSpriteImpl *M3GSprite;
|
sl@0
|
409 |
typedef struct M3GTextureImpl *M3GTexture;
|
sl@0
|
410 |
typedef struct M3GPolygonModeImpl *M3GPolygonMode;
|
sl@0
|
411 |
typedef struct M3GRenderContextImpl *M3GRenderContext;
|
sl@0
|
412 |
typedef struct M3GVertexArrayImpl *M3GVertexArray;
|
sl@0
|
413 |
typedef struct M3GVertexBufferImpl *M3GVertexBuffer;
|
sl@0
|
414 |
|
sl@0
|
415 |
typedef /*@abstract@*/ M3Gint M3GMemObject;
|
sl@0
|
416 |
|
sl@0
|
417 |
/*----------------------------------------------------------------------
|
sl@0
|
418 |
* Abstracted OpenGL rendering target types
|
sl@0
|
419 |
*--------------------------------------------------------------------*/
|
sl@0
|
420 |
|
sl@0
|
421 |
typedef /*@abstract@*/ M3Guint M3GNativeBitmap;
|
sl@0
|
422 |
typedef /*@abstract@*/ M3Guint M3GNativeWindow;
|
sl@0
|
423 |
typedef /*@abstract@*/ M3Guint M3GEGLSurface;
|
sl@0
|
424 |
|
sl@0
|
425 |
/*----------------------------------------------------------------------
|
sl@0
|
426 |
* Math API
|
sl@0
|
427 |
*--------------------------------------------------------------------*/
|
sl@0
|
428 |
|
sl@0
|
429 |
/* -------- Data types -------- */
|
sl@0
|
430 |
|
sl@0
|
431 |
/*!
|
sl@0
|
432 |
* \brief An optimized 4x4 matrix class.
|
sl@0
|
433 |
*
|
sl@0
|
434 |
* \note This is an abstract type, and only declared here so that it
|
sl@0
|
435 |
* can be instantiated on the stack. The internal format may change
|
sl@0
|
436 |
* in the future.
|
sl@0
|
437 |
*/
|
sl@0
|
438 |
typedef struct
|
sl@0
|
439 |
{
|
sl@0
|
440 |
/* If you change this struct be sure to check the
|
sl@0
|
441 |
* structure size against the array size in Transform.java!! */
|
sl@0
|
442 |
M3Gfloat elem[16];
|
sl@0
|
443 |
M3Guint mask;
|
sl@0
|
444 |
M3Guint classified : 1;
|
sl@0
|
445 |
M3Guint complete : 1;
|
sl@0
|
446 |
} M3GMatrix;
|
sl@0
|
447 |
|
sl@0
|
448 |
/*!
|
sl@0
|
449 |
* \brief A 3-vector class
|
sl@0
|
450 |
*/
|
sl@0
|
451 |
typedef struct {
|
sl@0
|
452 |
M3Gfloat x, y, z;
|
sl@0
|
453 |
} M3GVec3;
|
sl@0
|
454 |
|
sl@0
|
455 |
/*!
|
sl@0
|
456 |
* \brief A 4-vector class
|
sl@0
|
457 |
*/
|
sl@0
|
458 |
typedef struct {
|
sl@0
|
459 |
M3Gfloat x, y, z, w;
|
sl@0
|
460 |
} M3GVec4;
|
sl@0
|
461 |
|
sl@0
|
462 |
/*!
|
sl@0
|
463 |
* \brief A quaternion class
|
sl@0
|
464 |
*/
|
sl@0
|
465 |
typedef struct {
|
sl@0
|
466 |
M3Gfloat x, y, z, w;
|
sl@0
|
467 |
} M3GQuat;
|
sl@0
|
468 |
|
sl@0
|
469 |
/*!
|
sl@0
|
470 |
* \brief A rectangle
|
sl@0
|
471 |
*/
|
sl@0
|
472 |
typedef struct {
|
sl@0
|
473 |
M3Gint x;
|
sl@0
|
474 |
M3Gint y;
|
sl@0
|
475 |
M3Gint width;
|
sl@0
|
476 |
M3Gint height;
|
sl@0
|
477 |
} M3GRectangle;
|
sl@0
|
478 |
|
sl@0
|
479 |
/* -------- Interpolation -------- */
|
sl@0
|
480 |
|
sl@0
|
481 |
M3G_API void m3gLerp (M3Gint size,
|
sl@0
|
482 |
M3Gfloat *vec,
|
sl@0
|
483 |
M3Gfloat s,
|
sl@0
|
484 |
const M3Gfloat *start, const M3Gfloat *end);
|
sl@0
|
485 |
M3G_API void m3gHermite (M3Gint size,
|
sl@0
|
486 |
M3Gfloat *vec,
|
sl@0
|
487 |
M3Gfloat s,
|
sl@0
|
488 |
const M3Gfloat *start, const M3Gfloat *end,
|
sl@0
|
489 |
const M3Gfloat *tStart, const M3Gfloat *tEnd);
|
sl@0
|
490 |
M3G_API void m3gSlerpQuat(M3GQuat *quat,
|
sl@0
|
491 |
M3Gfloat s,
|
sl@0
|
492 |
const M3GQuat *q0, const M3GQuat *q1);
|
sl@0
|
493 |
M3G_API void m3gSquadQuat(M3GQuat *quat,
|
sl@0
|
494 |
M3Gfloat s,
|
sl@0
|
495 |
const M3GQuat *q0, const M3GQuat *a,
|
sl@0
|
496 |
const M3GQuat *b, const M3GQuat *q1);
|
sl@0
|
497 |
|
sl@0
|
498 |
/* -------- Matrix, vector & quaternion operations -------- */
|
sl@0
|
499 |
|
sl@0
|
500 |
/* Matrix */
|
sl@0
|
501 |
|
sl@0
|
502 |
/* shorthand names for the OpenGL style functions */
|
sl@0
|
503 |
#define m3gRotateMatrix m3gPostRotateMatrix
|
sl@0
|
504 |
#define m3gRotateMatrixQuat m3gPostRotateMatrixQuat
|
sl@0
|
505 |
#define m3gTranslateMatrix m3gPostTranslateMatrix
|
sl@0
|
506 |
#define m3gScaleMatrix m3gPostScaleMatrix
|
sl@0
|
507 |
#define m3gMulMatrix m3gPostMultiplyMatrix
|
sl@0
|
508 |
|
sl@0
|
509 |
/* ...and second names for the matrix-matrix multipliers */
|
sl@0
|
510 |
#define m3gLeftMulMatrix m3gPreMultiplyMatrix
|
sl@0
|
511 |
#define m3gRightMulMatrix m3gPostMultiplyMatrix
|
sl@0
|
512 |
|
sl@0
|
513 |
M3G_API void m3gCopyMatrix (M3GMatrix *dst, const M3GMatrix *src);
|
sl@0
|
514 |
M3G_API void m3gGetMatrixColumn (const M3GMatrix *mtx, M3Gint col, M3GVec4 *dst);
|
sl@0
|
515 |
M3G_API void m3gGetMatrixColumns (const M3GMatrix *mtx, M3Gfloat *dst);
|
sl@0
|
516 |
M3G_API void m3gGetMatrixRow (const M3GMatrix *mtx, M3Gint row, M3GVec4 *dst);
|
sl@0
|
517 |
M3G_API void m3gGetMatrixRows (const M3GMatrix *mtx, M3Gfloat *dst);
|
sl@0
|
518 |
M3G_API void m3gIdentityMatrix (M3GMatrix *mtx);
|
sl@0
|
519 |
M3G_API M3Gbool m3gInvertMatrix (M3GMatrix *mtx);
|
sl@0
|
520 |
M3G_API M3Gbool m3gMatrixInverse (M3GMatrix *mtx, const M3GMatrix *other);
|
sl@0
|
521 |
M3G_API void m3gMatrixTranspose (M3GMatrix *mtx, const M3GMatrix *other);
|
sl@0
|
522 |
M3G_API M3Gbool m3gInverseTranspose (M3GMatrix *mtx, const M3GMatrix *other);
|
sl@0
|
523 |
M3G_API void m3gMatrixProduct (M3GMatrix *dst, const M3GMatrix *left, const M3GMatrix *right);
|
sl@0
|
524 |
M3G_API void m3gPostMultiplyMatrix (M3GMatrix *mtx, const M3GMatrix *other);
|
sl@0
|
525 |
M3G_API void m3gPostRotateMatrix (M3GMatrix *mtx, M3Gfloat angle, M3Gfloat ax, M3Gfloat ay, M3Gfloat az);
|
sl@0
|
526 |
M3G_API void m3gPostRotateMatrixQuat (M3GMatrix *mtx, const M3GQuat *quat);
|
sl@0
|
527 |
M3G_API void m3gPostScaleMatrix (M3GMatrix *mtx, M3Gfloat sx, M3Gfloat sy, M3Gfloat sz);
|
sl@0
|
528 |
M3G_API void m3gPostTranslateMatrix (M3GMatrix *mtx, M3Gfloat tx, M3Gfloat ty, M3Gfloat tz);
|
sl@0
|
529 |
M3G_API void m3gPreMultiplyMatrix (M3GMatrix *mtx, const M3GMatrix *other);
|
sl@0
|
530 |
M3G_API void m3gPreRotateMatrix (M3GMatrix *mtx, M3Gfloat angle, M3Gfloat ax, M3Gfloat ay, M3Gfloat az);
|
sl@0
|
531 |
M3G_API void m3gPreRotateMatrixQuat (M3GMatrix *mtx, const M3GQuat *quat);
|
sl@0
|
532 |
M3G_API void m3gPreScaleMatrix (M3GMatrix *mtx, M3Gfloat sx, M3Gfloat sy, M3Gfloat sz);
|
sl@0
|
533 |
M3G_API void m3gPreTranslateMatrix (M3GMatrix *mtx, M3Gfloat tx, M3Gfloat ty, M3Gfloat tz);
|
sl@0
|
534 |
M3G_API void m3gScalingMatrix (M3GMatrix *mtx, const M3Gfloat sx, const M3Gfloat sy, const M3Gfloat sz);
|
sl@0
|
535 |
M3G_API void m3gSetMatrixColumns (M3GMatrix *mtx, const M3Gfloat *src);
|
sl@0
|
536 |
M3G_API void m3gSetMatrixRows (M3GMatrix *mtx, const M3Gfloat *src);
|
sl@0
|
537 |
M3G_API void m3gTranslationMatrix (M3GMatrix *mtx, const M3Gfloat tx, const M3Gfloat ty, const M3Gfloat tz);
|
sl@0
|
538 |
|
sl@0
|
539 |
/* Vec3/4 */
|
sl@0
|
540 |
|
sl@0
|
541 |
M3G_API void m3gAddVec3 (M3GVec3 *vec, const M3GVec3 *other);
|
sl@0
|
542 |
M3G_API void m3gAddVec4 (M3GVec4 *vec, const M3GVec4 *other);
|
sl@0
|
543 |
M3G_API void m3gCross (M3GVec3 *dst, const M3GVec3 *a, const M3GVec3 *b);
|
sl@0
|
544 |
M3G_API M3Gfloat m3gDot3 (const M3GVec3 *a, const M3GVec3 *b);
|
sl@0
|
545 |
M3G_API M3Gfloat m3gDot4 (const M3GVec4 *a, const M3GVec4 *b);
|
sl@0
|
546 |
M3G_API M3Gfloat m3gLengthVec3 (const M3GVec3 *vec);
|
sl@0
|
547 |
M3G_API void m3gNormalizeVec3 (M3GVec3 *vec);
|
sl@0
|
548 |
M3G_API void m3gNormalizeVec4 (M3GVec4 *vec);
|
sl@0
|
549 |
M3G_API void m3gScaleVec3 (M3GVec3 *vec, const M3Gfloat s);
|
sl@0
|
550 |
M3G_API void m3gScaleVec4 (M3GVec4 *vec, const M3Gfloat s);
|
sl@0
|
551 |
M3G_API void m3gSetVec3 (M3GVec3 *v, M3Gfloat x, M3Gfloat y, M3Gfloat z);
|
sl@0
|
552 |
M3G_API void m3gSetVec4 (M3GVec4 *v, M3Gfloat x, M3Gfloat y, M3Gfloat z, M3Gfloat w);
|
sl@0
|
553 |
M3G_API void m3gSubVec3 (M3GVec3 *vec, const M3GVec3 *other);
|
sl@0
|
554 |
M3G_API void m3gSubVec4 (M3GVec4 *vec, const M3GVec4 *other);
|
sl@0
|
555 |
M3G_API void m3gTransformVec4 (const M3GMatrix *mtx, M3GVec4 *vec);
|
sl@0
|
556 |
|
sl@0
|
557 |
/* Quat */
|
sl@0
|
558 |
|
sl@0
|
559 |
M3G_API void m3gGetAngleAxis (const M3GQuat *quat,
|
sl@0
|
560 |
M3Gfloat *angle, M3GVec3 *axis);
|
sl@0
|
561 |
M3G_API void m3gIdentityQuat (M3GQuat *quat);
|
sl@0
|
562 |
M3G_API void m3gMulQuat (M3GQuat *quat, const M3GQuat *other);
|
sl@0
|
563 |
M3G_API void m3gNormalizeQuat (M3GQuat *quat);
|
sl@0
|
564 |
M3G_API void m3gQuatMatrix (M3GMatrix *mtx, const M3GQuat *quat);
|
sl@0
|
565 |
M3G_API void m3gSetAngleAxis (M3GQuat *quat,
|
sl@0
|
566 |
M3Gfloat angle,
|
sl@0
|
567 |
M3Gfloat ax, M3Gfloat ay, M3Gfloat az);
|
sl@0
|
568 |
M3G_API void m3gSetAngleAxisRad (M3GQuat *quat,
|
sl@0
|
569 |
M3Gfloat angleRad,
|
sl@0
|
570 |
M3Gfloat ax, M3Gfloat ay, M3Gfloat az);
|
sl@0
|
571 |
M3G_API void m3gSetQuat (M3GQuat *quat, const M3Gfloat *vec);
|
sl@0
|
572 |
M3G_API void m3gSetQuatRotation (M3GQuat *quat, const M3GVec3 *from, const M3GVec3 *to);
|
sl@0
|
573 |
|
sl@0
|
574 |
/*----------------------------------------------------------------------
|
sl@0
|
575 |
* Interface callback types
|
sl@0
|
576 |
*--------------------------------------------------------------------*/
|
sl@0
|
577 |
|
sl@0
|
578 |
typedef /*@only@*//*@null@*/ void* (m3gMallocFunc) (M3Guint bytes);
|
sl@0
|
579 |
|
sl@0
|
580 |
typedef void (m3gFreeFunc) (/*@only@*//*@null@*//*@out@*/ void *ptr);
|
sl@0
|
581 |
|
sl@0
|
582 |
typedef M3GMemObject (m3gObjectAllocator) (M3Guint bytes);
|
sl@0
|
583 |
typedef /*@dependent@*/ void* (m3gObjectResolver) (M3GMemObject handle);
|
sl@0
|
584 |
typedef void (m3gObjectDeallocator)(M3GMemObject handle);
|
sl@0
|
585 |
|
sl@0
|
586 |
typedef void (m3gErrorHandler)(M3Genum errorCode, M3GInterface hInterface);
|
sl@0
|
587 |
|
sl@0
|
588 |
typedef void* (m3gBeginRenderFunc)(M3Guint userTarget);
|
sl@0
|
589 |
typedef void (m3gEndRenderFunc)(M3Guint userTarget);
|
sl@0
|
590 |
typedef void (m3gReleaseTargetFunc)(M3Guint userTarget);
|
sl@0
|
591 |
|
sl@0
|
592 |
/*!
|
sl@0
|
593 |
* \brief M3G interface initialization structure
|
sl@0
|
594 |
*
|
sl@0
|
595 |
*
|
sl@0
|
596 |
*/
|
sl@0
|
597 |
typedef struct {
|
sl@0
|
598 |
/*@shared@*/ m3gMallocFunc *mallocFunc;
|
sl@0
|
599 |
/*@shared@*/ m3gFreeFunc *freeFunc;
|
sl@0
|
600 |
/*@shared@*/ m3gObjectAllocator *objAllocFunc;
|
sl@0
|
601 |
/*@shared@*/ m3gObjectResolver *objResolveFunc;
|
sl@0
|
602 |
/*@shared@*/ m3gObjectDeallocator *objFreeFunc;
|
sl@0
|
603 |
/*@shared@*/ m3gErrorHandler *errorFunc;
|
sl@0
|
604 |
/*@shared@*/ m3gBeginRenderFunc *beginRenderFunc;
|
sl@0
|
605 |
/*@shared@*/ m3gEndRenderFunc *endRenderFunc;
|
sl@0
|
606 |
/*@shared@*/ m3gReleaseTargetFunc *releaseTargetFunc;
|
sl@0
|
607 |
/*@shared@*/ void *userContext;
|
sl@0
|
608 |
} M3Gparams;
|
sl@0
|
609 |
|
sl@0
|
610 |
/*----------------------------------------------------------------------
|
sl@0
|
611 |
* API functions
|
sl@0
|
612 |
*--------------------------------------------------------------------*/
|
sl@0
|
613 |
|
sl@0
|
614 |
/* -------- AnimationTrack -------- */
|
sl@0
|
615 |
|
sl@0
|
616 |
M3G_API M3GAnimationTrack m3gCreateAnimationTrack (M3GInterface hInterface, M3GKeyframeSequence hSequence, M3Gint property);
|
sl@0
|
617 |
M3G_API void m3gSetController (M3GAnimationTrack hTrack, M3GAnimationController hController);
|
sl@0
|
618 |
M3G_API M3GAnimationController m3gGetController (M3GAnimationTrack hTrack);
|
sl@0
|
619 |
M3G_API M3GKeyframeSequence m3gGetSequence (M3GAnimationTrack hTrack);
|
sl@0
|
620 |
M3G_API M3Gint m3gGetTargetProperty (M3GAnimationTrack hTrack);
|
sl@0
|
621 |
|
sl@0
|
622 |
|
sl@0
|
623 |
/* -------- AnimationController -------- */
|
sl@0
|
624 |
|
sl@0
|
625 |
M3G_API M3GAnimationController m3gCreateAnimationController(M3GInterface hInterface);
|
sl@0
|
626 |
M3G_API void m3gSetActiveInterval (M3GAnimationController hController, M3Gint worldTimeMin, M3Gint worldTimeMax);
|
sl@0
|
627 |
M3G_API M3Gint m3gGetActiveIntervalStart (M3GAnimationController hController);
|
sl@0
|
628 |
M3G_API M3Gint m3gGetActiveIntervalEnd (M3GAnimationController hController);
|
sl@0
|
629 |
M3G_API void m3gSetSpeed (M3GAnimationController hController, M3Gfloat factor, M3Gint worldTime);
|
sl@0
|
630 |
M3G_API M3Gfloat m3gGetSpeed (M3GAnimationController hController);
|
sl@0
|
631 |
M3G_API void m3gSetPosition (M3GAnimationController hController, M3Gfloat sequenceTime, M3Gint worldTime);
|
sl@0
|
632 |
M3G_API M3Gfloat m3gGetPosition (M3GAnimationController hController, M3Gint worldTime);
|
sl@0
|
633 |
M3G_API void m3gSetWeight (M3GAnimationController hController, M3Gfloat weight);
|
sl@0
|
634 |
M3G_API M3Gfloat m3gGetWeight (M3GAnimationController hController);
|
sl@0
|
635 |
M3G_API M3Gint m3gGetRefWorldTime (M3GAnimationController hController);
|
sl@0
|
636 |
|
sl@0
|
637 |
/* -------- Appearance -------- */
|
sl@0
|
638 |
|
sl@0
|
639 |
M3G_API M3GAppearance m3gCreateAppearance (M3GInterface hInterface);
|
sl@0
|
640 |
M3G_API M3GCompositingMode m3gGetCompositingMode(M3GAppearance hApp);
|
sl@0
|
641 |
M3G_API M3GFog m3gGetFog (M3GAppearance hApp);
|
sl@0
|
642 |
M3G_API M3Gint m3gGetLayer (M3GAppearance hApp);
|
sl@0
|
643 |
M3G_API M3GMaterial m3gGetMaterial (M3GAppearance hApp);
|
sl@0
|
644 |
M3G_API M3GPolygonMode m3gGetPolygonMode (M3GAppearance hApp);
|
sl@0
|
645 |
M3G_API M3GTexture m3gGetTexture (M3GAppearance hApp, M3Gint unit);
|
sl@0
|
646 |
M3G_API void m3gSetCompositingMode (M3GAppearance hApp, M3GCompositingMode hMode);
|
sl@0
|
647 |
M3G_API void m3gSetFog (M3GAppearance hApp, M3GFog hFog);
|
sl@0
|
648 |
M3G_API void m3gSetLayer (M3GAppearance hApp, M3Gint layer);
|
sl@0
|
649 |
M3G_API void m3gSetPolygonMode (M3GAppearance hApp, M3GPolygonMode hMode);
|
sl@0
|
650 |
M3G_API void m3gSetMaterial (M3GAppearance hApp, M3GMaterial hMaterial);
|
sl@0
|
651 |
M3G_API void m3gSetTexture (M3GAppearance hAppearance, M3Gint unit, M3GTexture hTexture);
|
sl@0
|
652 |
|
sl@0
|
653 |
|
sl@0
|
654 |
/* -------- Background -------- */
|
sl@0
|
655 |
|
sl@0
|
656 |
M3G_API M3GBackground m3gCreateBackground (M3GInterface hInterface);
|
sl@0
|
657 |
M3G_API void m3gSetBgColor (M3GBackground handle, M3Guint ARGB);
|
sl@0
|
658 |
M3G_API void m3gSetBgMode (M3GBackground handle, M3Gint modeX, M3Gint modeY);
|
sl@0
|
659 |
M3G_API void m3gSetBgCrop (M3GBackground handle, M3Gint cropX, M3Gint cropY, M3Gint width, M3Gint height);
|
sl@0
|
660 |
M3G_API void m3gSetBgImage (M3GBackground handle, M3GImage hImage);
|
sl@0
|
661 |
M3G_API M3GImage m3gGetBgImage (M3GBackground handle);
|
sl@0
|
662 |
M3G_API M3Guint m3gGetBgColor (M3GBackground handle);
|
sl@0
|
663 |
M3G_API M3Gint m3gGetBgMode (M3GBackground handle, M3Gint which);
|
sl@0
|
664 |
M3G_API M3Gint m3gGetBgCrop (M3GBackground handle, M3Gint which);
|
sl@0
|
665 |
M3G_API void m3gSetBgEnable (M3GBackground handle, M3Gint which, M3Gbool enable);
|
sl@0
|
666 |
M3G_API M3Gbool m3gIsBgEnabled (M3GBackground handle, M3Gint which);
|
sl@0
|
667 |
|
sl@0
|
668 |
|
sl@0
|
669 |
/* -------- Camera -------- */
|
sl@0
|
670 |
|
sl@0
|
671 |
M3G_API M3GCamera m3gCreateCamera (M3GInterface hInterface);
|
sl@0
|
672 |
M3G_API void m3gSetParallel (M3GCamera handle, M3Gfloat height, M3Gfloat aspectRatio, M3Gfloat clipNear, M3Gfloat clipFar);
|
sl@0
|
673 |
M3G_API void m3gSetPerspective (M3GCamera handle, M3Gfloat fovy, M3Gfloat aspectRatio, M3Gfloat clipNear, M3Gfloat clipFar);
|
sl@0
|
674 |
M3G_API void m3gSetProjectionMatrix (M3GCamera handle, const M3GMatrix *transform);
|
sl@0
|
675 |
M3G_API M3Gint m3gGetProjectionAsMatrix(M3GCamera handle, M3GMatrix *transform);
|
sl@0
|
676 |
M3G_API M3Gint m3gGetProjectionAsParams(M3GCamera handle, M3Gfloat *params);
|
sl@0
|
677 |
|
sl@0
|
678 |
|
sl@0
|
679 |
/* -------- CompositingMode -------- */
|
sl@0
|
680 |
|
sl@0
|
681 |
M3G_API M3GCompositingMode m3gCreateCompositingMode(M3GInterface m3g);
|
sl@0
|
682 |
|
sl@0
|
683 |
M3G_API void m3gSetBlending (M3GCompositingMode compositingMode, M3Genum mode);
|
sl@0
|
684 |
M3G_API M3Genum m3gGetBlending (M3GCompositingMode compositingMode);
|
sl@0
|
685 |
M3G_API void m3gSetAlphaThreshold (M3GCompositingMode compositingMode, M3Gfloat threshold);
|
sl@0
|
686 |
M3G_API M3Gfloat m3gGetAlphaThreshold (M3GCompositingMode compositingMode);
|
sl@0
|
687 |
M3G_API void m3gEnableDepthTest (M3GCompositingMode compositingMode, M3Gbool enable);
|
sl@0
|
688 |
M3G_API void m3gEnableDepthWrite (M3GCompositingMode compositingMode, M3Gbool enable);
|
sl@0
|
689 |
M3G_API void m3gEnableColorWrite (M3GCompositingMode compositingMode, M3Gbool enable);
|
sl@0
|
690 |
M3G_API void m3gSetDepthOffset (M3GCompositingMode compositingMode, M3Gfloat factor, M3Gfloat units);
|
sl@0
|
691 |
M3G_API M3Gfloat m3gGetDepthOffsetFactor (M3GCompositingMode compositingMode);
|
sl@0
|
692 |
M3G_API M3Gfloat m3gGetDepthOffsetUnits (M3GCompositingMode compositingMode);
|
sl@0
|
693 |
M3G_API M3Gbool m3gIsAlphaWriteEnabled (M3GCompositingMode handle);
|
sl@0
|
694 |
M3G_API M3Gbool m3gIsColorWriteEnabled (M3GCompositingMode handle);
|
sl@0
|
695 |
M3G_API M3Gbool m3gIsDepthTestEnabled (M3GCompositingMode handle);
|
sl@0
|
696 |
M3G_API M3Gbool m3gIsDepthWriteEnabled (M3GCompositingMode handle);
|
sl@0
|
697 |
M3G_API void m3gSetAlphaWriteEnable (M3GCompositingMode handle, M3Gbool enable);
|
sl@0
|
698 |
|
sl@0
|
699 |
|
sl@0
|
700 |
/* -------- Fog -------- */
|
sl@0
|
701 |
|
sl@0
|
702 |
M3G_API M3GFog m3gCreateFog (M3GInterface hInterface);
|
sl@0
|
703 |
M3G_API void m3gSetFogMode (M3GFog handle, M3Gint mode);
|
sl@0
|
704 |
M3G_API M3Gint m3gGetFogMode (M3GFog handle);
|
sl@0
|
705 |
M3G_API void m3gSetFogLinear (M3GFog handle, M3Gfloat fogNear, M3Gfloat fogFar);
|
sl@0
|
706 |
M3G_API M3Gfloat m3gGetFogDistance(M3GFog handle, M3Genum which);
|
sl@0
|
707 |
M3G_API void m3gSetFogDensity(M3GFog handle, M3Gfloat density);
|
sl@0
|
708 |
M3G_API M3Gfloat m3gGetFogDensity(M3GFog handle);
|
sl@0
|
709 |
M3G_API void m3gSetFogColor (M3GFog handle, M3Guint rgb);
|
sl@0
|
710 |
M3G_API M3Guint m3gGetFogColor (M3GFog handle);
|
sl@0
|
711 |
|
sl@0
|
712 |
|
sl@0
|
713 |
/* -------- Group -------- */
|
sl@0
|
714 |
|
sl@0
|
715 |
M3G_API M3GGroup m3gCreateGroup (M3GInterface m3g);
|
sl@0
|
716 |
M3G_API void m3gAddChild (M3GGroup handle, M3GNode hNode);
|
sl@0
|
717 |
M3G_API void m3gRemoveChild (M3GGroup handle, M3GNode hNode);
|
sl@0
|
718 |
M3G_API M3GNode m3gPick3D (M3GGroup handle, M3Gint mask, M3Gfloat *ray, M3Gfloat *result);
|
sl@0
|
719 |
M3G_API M3GNode m3gPick2D (M3GGroup handle, M3Gint mask, M3Gfloat x, M3Gfloat y, M3GCamera hCamera, M3Gfloat *result);
|
sl@0
|
720 |
M3G_API M3GNode m3gGetChild (M3GGroup handle, M3Gint idx);
|
sl@0
|
721 |
M3G_API M3Gint m3gGetChildCount(M3GGroup handle);
|
sl@0
|
722 |
|
sl@0
|
723 |
|
sl@0
|
724 |
/* -------- Image -------- */
|
sl@0
|
725 |
|
sl@0
|
726 |
M3G_API M3GImage m3gCreateImage (M3GInterface m3g, M3GImageFormat format, M3Gint width, M3Gint height, M3Gbitmask flags);
|
sl@0
|
727 |
M3G_API void m3gSetImage (M3GImage hImage, const void *pixels);
|
sl@0
|
728 |
M3G_API void m3gSetImagePalette (M3GImage hImage, M3Gint paletteLength, const void *palette);
|
sl@0
|
729 |
M3G_API void m3gSetImageScanline (M3GImage hImage, M3Gint line, M3Gbool trueAlpha, const M3Guint *pixels);
|
sl@0
|
730 |
M3G_API void m3gSetSubImage (M3GImage hImage, M3Gint x, M3Gint y, M3Gint width, M3Gint height, M3Gint length, const void *pixels);
|
sl@0
|
731 |
M3G_API M3Gbool m3gIsMutable (M3GImage hImage);
|
sl@0
|
732 |
M3G_API M3GImageFormat m3gGetFormat (M3GImage hImage);
|
sl@0
|
733 |
M3G_API M3Gint m3gGetWidth (M3GImage hImage);
|
sl@0
|
734 |
M3G_API M3Gint m3gGetHeight (M3GImage hImage);
|
sl@0
|
735 |
M3G_API void m3gGetImageARGB (M3GImage hImage, M3Guint *pixels);
|
sl@0
|
736 |
M3G_API void m3gCommitImage (M3GImage hImage);
|
sl@0
|
737 |
|
sl@0
|
738 |
/* -------- IndexBuffer -------- */
|
sl@0
|
739 |
|
sl@0
|
740 |
M3G_API M3GIndexBuffer m3gCreateStripBuffer (M3GInterface m3g, M3Gprimitive primitive, M3Gsizei stripCount, const M3Gsizei *stripLengths, M3Gdatatype type, M3Gsizei indicesCount, const void *stripIndices);
|
sl@0
|
741 |
M3G_API M3GIndexBuffer m3gCreateImplicitStripBuffer (M3GInterface hInterface, M3Gsizei stripCount, const M3Gsizei *stripLengths, M3Gint firstIndex);
|
sl@0
|
742 |
M3G_API M3Gint m3gGetBatchCount(M3GIndexBuffer buffer);
|
sl@0
|
743 |
M3G_API M3Gbool m3gGetBatchIndices(M3GIndexBuffer buffer, M3Gint batchIndex, M3Gint *indices);
|
sl@0
|
744 |
M3G_API M3Gint m3gGetBatchSize(M3GIndexBuffer buffer, M3Gint batchIndex);
|
sl@0
|
745 |
M3G_API M3Gprimitive m3gGetPrimitive(M3GIndexBuffer buffer);
|
sl@0
|
746 |
|
sl@0
|
747 |
/* -------- Interface -------- */
|
sl@0
|
748 |
|
sl@0
|
749 |
M3G_API M3GInterface m3gCreateInterface (const M3Gparams *params);
|
sl@0
|
750 |
M3G_API void m3gDeleteInterface (M3GInterface m3g);
|
sl@0
|
751 |
M3G_API void m3gGarbageCollect (M3GInterface hInterface);
|
sl@0
|
752 |
M3G_API M3Genum m3gGetError (M3GInterface m3g);
|
sl@0
|
753 |
M3G_API M3Gint m3gGetStatistic (M3GInterface hInterface,
|
sl@0
|
754 |
M3Gstatistic stat);
|
sl@0
|
755 |
M3G_API void * m3gGetUserContext (M3GInterface m3g);
|
sl@0
|
756 |
M3G_API M3Gbool m3gIsAntialiasingSupported(M3GInterface interface);
|
sl@0
|
757 |
|
sl@0
|
758 |
/* -------- KeyframeSequence -------- */
|
sl@0
|
759 |
|
sl@0
|
760 |
M3G_API M3GKeyframeSequence m3gCreateKeyframeSequence(M3GInterface hInterface, M3Gint numKeyframes, M3Gint numComponents, M3Gint interpolation);
|
sl@0
|
761 |
M3G_API void m3gSetValidRange(M3GKeyframeSequence handle, M3Gint first, M3Gint last);
|
sl@0
|
762 |
M3G_API void m3gSetKeyframe (M3GKeyframeSequence handle, M3Gint ind, M3Gint time, M3Gint valueSize, const M3Gfloat *value);
|
sl@0
|
763 |
M3G_API void m3gSetDuration (M3GKeyframeSequence handle, M3Gint duration);
|
sl@0
|
764 |
M3G_API M3Gint m3gGetDuration (M3GKeyframeSequence handle);
|
sl@0
|
765 |
M3G_API void m3gSetRepeatMode(M3GKeyframeSequence handle, M3Genum mode);
|
sl@0
|
766 |
M3G_API M3Genum m3gGetRepeatMode(M3GKeyframeSequence handle);
|
sl@0
|
767 |
M3G_API M3Gint m3gGetComponentCount(M3GKeyframeSequence handle);
|
sl@0
|
768 |
M3G_API M3Gint m3gGetInterpolationType(M3GKeyframeSequence handle);
|
sl@0
|
769 |
M3G_API M3Gint m3gGetKeyframe (M3GKeyframeSequence handle, M3Gint frameIndex, M3Gfloat *value);
|
sl@0
|
770 |
M3G_API M3Gint m3gGetKeyframeCount(M3GKeyframeSequence handle);
|
sl@0
|
771 |
M3G_API void m3gGetValidRange(M3GKeyframeSequence handle, M3Gint *first, M3Gint *last);
|
sl@0
|
772 |
|
sl@0
|
773 |
/* -------- Light -------- */
|
sl@0
|
774 |
|
sl@0
|
775 |
M3G_API M3GLight m3gCreateLight (M3GInterface hInterface);
|
sl@0
|
776 |
M3G_API void m3gSetIntensity (M3GLight handle, M3Gfloat intensity);
|
sl@0
|
777 |
M3G_API void m3gSetLightColor (M3GLight handle, M3Guint rgb);
|
sl@0
|
778 |
M3G_API void m3gSetLightMode (M3GLight handle, M3Genum mode);
|
sl@0
|
779 |
M3G_API void m3gSetSpotAngle (M3GLight handle, M3Gfloat angle);
|
sl@0
|
780 |
M3G_API void m3gSetSpotExponent (M3GLight handle, M3Gfloat exponent);
|
sl@0
|
781 |
M3G_API void m3gSetAttenuation (M3GLight handle, M3Gfloat constant, M3Gfloat linear, M3Gfloat quadratic);
|
sl@0
|
782 |
M3G_API M3Gfloat m3gGetIntensity (M3GLight handle);
|
sl@0
|
783 |
M3G_API M3Guint m3gGetLightColor (M3GLight handle);
|
sl@0
|
784 |
M3G_API M3Gint m3gGetLightMode (M3GLight handle);
|
sl@0
|
785 |
M3G_API M3Gfloat m3gGetSpotAngle (M3GLight handle);
|
sl@0
|
786 |
M3G_API M3Gfloat m3gGetSpotExponent (M3GLight handle);
|
sl@0
|
787 |
M3G_API M3Gfloat m3gGetAttenuation (M3GLight handle, M3Genum type);
|
sl@0
|
788 |
M3G_API M3Gint m3gGetScopeMask (M3GLight handle);
|
sl@0
|
789 |
|
sl@0
|
790 |
|
sl@0
|
791 |
/* -------- Loader -------- */
|
sl@0
|
792 |
|
sl@0
|
793 |
M3G_API M3GLoader m3gCreateLoader(M3GInterface m3g);
|
sl@0
|
794 |
M3G_API M3Gsizei m3gDecodeData(M3GLoader loader, M3Gsizei bytes, const M3Gubyte *data);
|
sl@0
|
795 |
M3G_API M3Gint m3gGetLoadedObjects(M3GLoader loader, M3GObject *buffer);
|
sl@0
|
796 |
M3G_API void m3gImportObjects(M3GLoader loader, M3Gint n, M3GObject *refs);
|
sl@0
|
797 |
M3G_API M3Gint m3gGetObjectsWithUserParameters(M3GLoader loader, M3GObject *objects);
|
sl@0
|
798 |
M3G_API M3Gint m3gGetNumUserParameters(M3GLoader loader, M3Gint object);
|
sl@0
|
799 |
M3G_API M3Gint m3gGetUserParameter(M3GLoader loader, M3Gint object, M3Gint index, M3Gbyte *buffer);
|
sl@0
|
800 |
M3G_API void m3gSetConstraints(M3GLoader loader, M3Gint triConstraint);
|
sl@0
|
801 |
|
sl@0
|
802 |
/* -------- Material -------- */
|
sl@0
|
803 |
|
sl@0
|
804 |
M3G_API M3GMaterial m3gCreateMaterial (M3GInterface m3g);
|
sl@0
|
805 |
M3G_API void m3gSetColor (M3GMaterial material, M3Genum target, M3Guint ARGB);
|
sl@0
|
806 |
M3G_API M3Guint m3gGetColor (M3GMaterial material, M3Genum target);
|
sl@0
|
807 |
M3G_API void m3gSetShininess (M3GMaterial material, M3Gfloat shininess);
|
sl@0
|
808 |
M3G_API M3Gfloat m3gGetShininess (M3GMaterial material);
|
sl@0
|
809 |
M3G_API void m3gSetVertexColorTrackingEnable (M3GMaterial material, M3Gbool enable);
|
sl@0
|
810 |
M3G_API M3Gbool m3gIsVertexColorTrackingEnabled (M3GMaterial material);
|
sl@0
|
811 |
|
sl@0
|
812 |
|
sl@0
|
813 |
/* -------- Mesh -------- */
|
sl@0
|
814 |
|
sl@0
|
815 |
M3G_API M3GMesh m3gCreateMesh (M3GInterface hInterface, M3GVertexBuffer hVertices, M3GIndexBuffer *hTriangles, M3GAppearance *hAppearances, M3Gint trianglePatchCount);
|
sl@0
|
816 |
M3G_API void m3gSetAppearance (M3GMesh handle, M3Gint appearanceIndex, M3GAppearance hAppearance);
|
sl@0
|
817 |
M3G_API M3GAppearance m3gGetAppearance (M3GMesh handle, M3Gint idx);
|
sl@0
|
818 |
M3G_API M3GIndexBuffer m3gGetIndexBuffer (M3GMesh handle, M3Gint idx);
|
sl@0
|
819 |
M3G_API M3GVertexBuffer m3gGetVertexBuffer (M3GMesh handle);
|
sl@0
|
820 |
M3G_API M3Gint m3gGetSubmeshCount (M3GMesh handle);
|
sl@0
|
821 |
|
sl@0
|
822 |
|
sl@0
|
823 |
/* -------- MorphingMesh -------- */
|
sl@0
|
824 |
|
sl@0
|
825 |
M3G_API M3GMorphingMesh m3gCreateMorphingMesh (M3GInterface hInterface, M3GVertexBuffer hVertices, M3GVertexBuffer *hTargets, M3GIndexBuffer *hTriangles, M3GAppearance *hAppearances, M3Gint trianglePatchCount, M3Gint targetCount);
|
sl@0
|
826 |
M3G_API void m3gSetWeights (M3GMorphingMesh handle, M3Gfloat *weights, M3Gint numWeights);
|
sl@0
|
827 |
M3G_API void m3gGetWeights (M3GMorphingMesh handle, M3Gfloat *weights, M3Gint numWeights);
|
sl@0
|
828 |
M3G_API M3GVertexBuffer m3gGetMorphTarget (M3GMorphingMesh handle, M3Gint idx);
|
sl@0
|
829 |
M3G_API M3Gint m3gGetMorphTargetCount (M3GMorphingMesh handle);
|
sl@0
|
830 |
|
sl@0
|
831 |
|
sl@0
|
832 |
/* -------- Node -------- */
|
sl@0
|
833 |
|
sl@0
|
834 |
M3G_API void m3gAlignNode (M3GNode hNode, M3GNode hReference);
|
sl@0
|
835 |
M3G_API M3Gbool m3gGetTransformTo (M3GNode handle, M3GNode hTarget, M3GMatrix *transform);
|
sl@0
|
836 |
M3G_API void m3gSetAlignment (M3GNode handle, M3GNode hZReference, M3Gint zTarget, M3GNode hYReference, M3Gint yTarget);
|
sl@0
|
837 |
M3G_API void m3gSetAlphaFactor (M3GNode handle, M3Gfloat alphaFactor);
|
sl@0
|
838 |
M3G_API M3Gfloat m3gGetAlphaFactor (M3GNode handle);
|
sl@0
|
839 |
M3G_API void m3gEnable (M3GNode handle, M3Gint which, M3Gbool enable);
|
sl@0
|
840 |
M3G_API M3Gint m3gIsEnabled (M3GNode handle, M3Gint which);
|
sl@0
|
841 |
M3G_API void m3gSetScope (M3GNode handle, M3Gint id);
|
sl@0
|
842 |
M3G_API M3Gint m3gGetScope (M3GNode handle);
|
sl@0
|
843 |
M3G_API M3GNode m3gGetParent (M3GNode handle);
|
sl@0
|
844 |
M3G_API M3GNode m3gGetZRef (M3GNode handle);
|
sl@0
|
845 |
M3G_API M3GNode m3gGetYRef (M3GNode handle);
|
sl@0
|
846 |
M3G_API M3Gint m3gGetSubtreeSize (M3GNode handle);
|
sl@0
|
847 |
M3G_API M3Gint m3gGetAlignmentTarget(M3GNode handle, M3Gint axis);
|
sl@0
|
848 |
|
sl@0
|
849 |
/* -------- Object -------- */
|
sl@0
|
850 |
|
sl@0
|
851 |
M3G_API void m3gAddRef (M3GObject hObject);
|
sl@0
|
852 |
M3G_API void m3gDeleteObject (M3GObject hObject);
|
sl@0
|
853 |
M3G_API void m3gDeleteRef (M3GObject hObject);
|
sl@0
|
854 |
M3G_API M3GClass m3gGetClass (M3GObject hObject);
|
sl@0
|
855 |
M3G_API M3Gint m3gAddAnimationTrack (M3GObject hObject, M3GAnimationTrack hAnimationTrack);
|
sl@0
|
856 |
M3G_API void m3gRemoveAnimationTrack (M3GObject hObject, M3GAnimationTrack hAnimationTrack);
|
sl@0
|
857 |
M3G_API M3Gint m3gGetAnimationTrackCount(M3GObject hObject);
|
sl@0
|
858 |
M3G_API M3Gint m3gAnimate (M3GObject hObject, M3Gint time);
|
sl@0
|
859 |
M3G_API void m3gSetUserID (M3GObject hObject, M3Gint userID);
|
sl@0
|
860 |
M3G_API M3Gint m3gGetUserID (M3GObject hObject);
|
sl@0
|
861 |
M3G_API M3GAnimationTrack m3gGetAnimationTrack (M3GObject hObject, M3Gint idx);
|
sl@0
|
862 |
M3G_API M3GObject m3gDuplicate (M3GObject hObject, M3GObject *hReferences);
|
sl@0
|
863 |
M3G_API M3GInterface m3gGetObjectInterface (M3GObject hObject);
|
sl@0
|
864 |
M3G_API M3Gint m3gGetReferences (M3GObject hObject, M3GObject *references, M3Gint length);
|
sl@0
|
865 |
M3G_API M3GObject m3gFind (M3GObject hObject, M3Gint userID);
|
sl@0
|
866 |
|
sl@0
|
867 |
#define m3gGetInterface(obj) m3gGetObjectInterface((M3GObject)(obj))
|
sl@0
|
868 |
|
sl@0
|
869 |
/* -------- PolygonMode -------- */
|
sl@0
|
870 |
|
sl@0
|
871 |
M3G_API M3GPolygonMode m3gCreatePolygonMode (M3GInterface m3g);
|
sl@0
|
872 |
M3G_API void m3gSetCulling (M3GPolygonMode handle, M3Gint mode);
|
sl@0
|
873 |
M3G_API M3Gint m3gGetCulling (M3GPolygonMode handle);
|
sl@0
|
874 |
M3G_API void m3gSetWinding (M3GPolygonMode handle, M3Gint mode);
|
sl@0
|
875 |
M3G_API M3Gint m3gGetWinding (M3GPolygonMode handle);
|
sl@0
|
876 |
M3G_API void m3gSetShading (M3GPolygonMode handle, M3Gint mode);
|
sl@0
|
877 |
M3G_API M3Gint m3gGetShading (M3GPolygonMode handle);
|
sl@0
|
878 |
M3G_API void m3gSetTwoSidedLightingEnable(M3GPolygonMode handle, M3Gbool enable);
|
sl@0
|
879 |
M3G_API M3Gbool m3gIsTwoSidedLightingEnabled(M3GPolygonMode handle);
|
sl@0
|
880 |
M3G_API void m3gSetLocalCameraLightingEnable(M3GPolygonMode polygonMode, M3Gbool enable);
|
sl@0
|
881 |
M3G_API void m3gSetPerspectiveCorrectionEnable(M3GPolygonMode polygonMode, M3Gbool enable);
|
sl@0
|
882 |
M3G_API M3Gbool m3gIsLocalCameraLightingEnabled(M3GPolygonMode handle);
|
sl@0
|
883 |
M3G_API M3Gbool m3gIsPerspectiveCorrectionEnabled(M3GPolygonMode handle);
|
sl@0
|
884 |
|
sl@0
|
885 |
/* -------- RenderContext -------- */
|
sl@0
|
886 |
|
sl@0
|
887 |
M3G_API M3GRenderContext m3gCreateContext(M3GInterface m3g);
|
sl@0
|
888 |
|
sl@0
|
889 |
M3G_API M3Gint m3gAddLight (M3GRenderContext ctx, M3GLight light, const M3GMatrix *transform);
|
sl@0
|
890 |
M3G_API void m3gBindBitmapTarget (M3GRenderContext ctx, M3GNativeBitmap hBitmap);
|
sl@0
|
891 |
M3G_API void m3gBindImageTarget (M3GRenderContext ctx, M3GImage hImage);
|
sl@0
|
892 |
M3G_API void m3gBindEGLSurfaceTarget (M3GRenderContext context, M3GEGLSurface surface);
|
sl@0
|
893 |
M3G_API void m3gBindMemoryTarget (M3GRenderContext context, void *pixels, M3Guint width, M3Guint height, M3GPixelFormat format, M3Guint stride, M3Guint userContext);
|
sl@0
|
894 |
M3G_API void m3gBindWindowTarget (M3GRenderContext ctx, M3GNativeWindow hWindow);
|
sl@0
|
895 |
M3G_API void m3gClear (M3GRenderContext context, M3GBackground hBackground);
|
sl@0
|
896 |
M3G_API void m3gClearLights (M3GRenderContext context);
|
sl@0
|
897 |
M3G_API M3Guint m3gGetUserHandle (M3GRenderContext hCtx);
|
sl@0
|
898 |
M3G_API void m3gInvalidateBitmapTarget(M3GRenderContext ctx, M3GNativeBitmap hBitmap);
|
sl@0
|
899 |
M3G_API void m3gInvalidateWindowTarget(M3GRenderContext ctx, M3GNativeWindow hWindow);
|
sl@0
|
900 |
M3G_API void m3gInvalidateMemoryTarget(M3GRenderContext ctx, void *pixels);
|
sl@0
|
901 |
M3G_API void m3gReleaseTarget (M3GRenderContext ctx);
|
sl@0
|
902 |
M3G_API void m3gRender (M3GRenderContext ctx, M3GVertexBuffer hVertices, M3GIndexBuffer hIndices, M3GAppearance hAppearance, const M3GMatrix *transform, M3Gfloat alphaFactor, M3Gint scope);
|
sl@0
|
903 |
M3G_API void m3gRenderWorld (M3GRenderContext context, M3GWorld hWorld);
|
sl@0
|
904 |
M3G_API void m3gRenderNode (M3GRenderContext context, M3GNode hNode, const M3GMatrix *transform);
|
sl@0
|
905 |
M3G_API M3Gbool m3gSetRenderBuffers (M3GRenderContext hCtx, M3Gbitmask bufferBits);
|
sl@0
|
906 |
M3G_API M3Gbool m3gSetRenderHints (M3GRenderContext hCtx, M3Gbitmask hintBits);
|
sl@0
|
907 |
M3G_API void m3gSetCamera (M3GRenderContext context, M3GCamera hCamera, M3GMatrix *transform);
|
sl@0
|
908 |
M3G_API void m3gSetDepthRange (M3GRenderContext hCtx, M3Gfloat depthNear, M3Gfloat depthFar);
|
sl@0
|
909 |
M3G_API void m3gSetLight (M3GRenderContext context, M3Gint lightIndex, M3GLight hLight, const M3GMatrix *transform);
|
sl@0
|
910 |
M3G_API void m3gSetClipRect (M3GRenderContext ctx, M3Gint x, M3Gint y, M3Gint width, M3Gint height);
|
sl@0
|
911 |
M3G_API void m3gSetDisplayArea(M3GRenderContext hCtx, M3Gint width, M3Gint height);
|
sl@0
|
912 |
M3G_API void m3gSetViewport (M3GRenderContext ctx, M3Gint x, M3Gint y, M3Gint width, M3Gint height);
|
sl@0
|
913 |
M3G_API void m3gGetViewport (M3GRenderContext hCtx, M3Gint *x, M3Gint *y, M3Gint *width, M3Gint *height);
|
sl@0
|
914 |
M3G_API void m3gGetDepthRange (M3GRenderContext hCtx, M3Gfloat *depthNear, M3Gfloat *depthFar);
|
sl@0
|
915 |
M3G_API void m3gGetViewTransform (M3GRenderContext hCtx, M3GMatrix *transform);
|
sl@0
|
916 |
M3G_API M3GLight m3gGetLightTransform (M3GRenderContext hCtx, M3Gint lightIndex, M3GMatrix *transform);
|
sl@0
|
917 |
M3G_API M3Gsizei m3gGetLightCount (M3GRenderContext hCtx);
|
sl@0
|
918 |
M3G_API M3GCamera m3gGetCamera (M3GRenderContext hCtx);
|
sl@0
|
919 |
M3G_API void m3gSetAlphaWrite (M3GRenderContext ctx, M3Gbool enable);
|
sl@0
|
920 |
M3G_API M3Gbool m3gGetAlphaWrite (M3GRenderContext ctx);
|
sl@0
|
921 |
M3G_API void m3gFreeGLESResources (M3GRenderContext ctx);
|
sl@0
|
922 |
|
sl@0
|
923 |
/* -------- SkinnedMesh -------- */
|
sl@0
|
924 |
|
sl@0
|
925 |
M3G_API M3GSkinnedMesh m3gCreateSkinnedMesh (M3GInterface hInterface, M3GVertexBuffer hVertices, M3GIndexBuffer *hTriangles, M3GAppearance *hAppearances, M3Gint trianglePatchCount, M3GGroup hSkeleton);
|
sl@0
|
926 |
M3G_API void m3gAddTransform (M3GSkinnedMesh handle, M3GNode hBone, M3Gint weight, M3Gint firstVertex, M3Gint numVertices);
|
sl@0
|
927 |
M3G_API M3GGroup m3gGetSkeleton (M3GSkinnedMesh handle);
|
sl@0
|
928 |
M3G_API void m3gGetBoneTransform (M3GSkinnedMesh handle, M3GNode hBone, M3GMatrix *transform);
|
sl@0
|
929 |
M3G_API M3Gint m3gGetBoneVertices (M3GSkinnedMesh handle, M3GNode hBone, M3Gint *indices, M3Gfloat *weights);
|
sl@0
|
930 |
|
sl@0
|
931 |
|
sl@0
|
932 |
/* -------- Sprite -------- */
|
sl@0
|
933 |
|
sl@0
|
934 |
M3G_API M3GSprite m3gCreateSprite (M3GInterface hInterface, M3Gbool scaled, M3GImage hImage, M3GAppearance hAppearance);
|
sl@0
|
935 |
M3G_API M3Gbool m3gIsScaledSprite (M3GSprite handle);
|
sl@0
|
936 |
M3G_API void m3gSetSpriteAppearance (M3GSprite handle, M3GAppearance hAppearance);
|
sl@0
|
937 |
M3G_API M3Gbool m3gSetSpriteImage (M3GSprite handle, M3GImage hImage);
|
sl@0
|
938 |
M3G_API void m3gSetCrop (M3GSprite handle, M3Gint cropX, M3Gint cropY, M3Gint width, M3Gint height);
|
sl@0
|
939 |
M3G_API M3Gint m3gGetCrop (M3GSprite handle, M3Gint which);
|
sl@0
|
940 |
M3G_API M3GAppearance m3gGetSpriteAppearance (M3GSprite handle);
|
sl@0
|
941 |
M3G_API M3GImage m3gGetSpriteImage (M3GSprite handle);
|
sl@0
|
942 |
|
sl@0
|
943 |
|
sl@0
|
944 |
/* -------- Texture -------- */
|
sl@0
|
945 |
|
sl@0
|
946 |
M3G_API M3GTexture m3gCreateTexture (M3GInterface m3g, M3GImage hImage);
|
sl@0
|
947 |
M3G_API M3GImage m3gGetTextureImage (M3GTexture hTexture);
|
sl@0
|
948 |
M3G_API void m3gSetTextureImage (M3GTexture hTexture, M3GImage hImage);
|
sl@0
|
949 |
M3G_API void m3gSetTextureTransform (M3GTexture hTexture, M3GMatrix *mtx);
|
sl@0
|
950 |
M3G_API void m3gSetFiltering (M3GTexture hTexture, M3Genum levelFilter, M3Genum imageFilter);
|
sl@0
|
951 |
M3G_API void m3gSetWrapping (M3GTexture hTexture, M3Genum wrapS, M3Genum wrapT);
|
sl@0
|
952 |
M3G_API int m3gGetWrappingS (M3GTexture hTexture);
|
sl@0
|
953 |
M3G_API int m3gGetWrappingT (M3GTexture hTexture);
|
sl@0
|
954 |
M3G_API void m3gTextureSetBlending (M3GTexture hTexture, M3Genum func);
|
sl@0
|
955 |
M3G_API int m3gTextureGetBlending (M3GTexture hTexture);
|
sl@0
|
956 |
M3G_API void m3gSetBlendColor (M3GTexture hTexture, M3Guint RGB);
|
sl@0
|
957 |
M3G_API M3Guint m3gGetBlendColor (M3GTexture hTexture);
|
sl@0
|
958 |
M3G_API void m3gTransformSetTransform(M3GTexture hTexture, const M3GMatrix *transform);
|
sl@0
|
959 |
M3G_API void m3gTransformGetTransform(M3GTexture hTexture, M3GMatrix *transform);
|
sl@0
|
960 |
M3G_API void m3gGetFiltering (M3GTexture hTexture, M3Gint *levelFilter, M3Gint *imageFilter);
|
sl@0
|
961 |
|
sl@0
|
962 |
/* -------- Transformable -------- */
|
sl@0
|
963 |
|
sl@0
|
964 |
M3G_API void m3gSetOrientation (M3GTransformable handle, M3Gfloat angle, M3Gfloat ax, M3Gfloat ay, M3Gfloat az);
|
sl@0
|
965 |
M3G_API void m3gPostRotate (M3GTransformable handle, M3Gfloat angle, M3Gfloat ax, M3Gfloat ay, M3Gfloat az);
|
sl@0
|
966 |
M3G_API void m3gPreRotate (M3GTransformable handle, M3Gfloat angle, M3Gfloat ax, M3Gfloat ay, M3Gfloat az);
|
sl@0
|
967 |
M3G_API void m3gGetOrientation (M3GTransformable handle, M3Gfloat *angleAxis);
|
sl@0
|
968 |
M3G_API void m3gSetScale (M3GTransformable handle, M3Gfloat sx, M3Gfloat sy, M3Gfloat sz);
|
sl@0
|
969 |
M3G_API void m3gScale (M3GTransformable handle, M3Gfloat sx, M3Gfloat sy, M3Gfloat sz);
|
sl@0
|
970 |
M3G_API void m3gGetScale (M3GTransformable handle, M3Gfloat *scale);
|
sl@0
|
971 |
M3G_API void m3gSetTranslation (M3GTransformable handle, M3Gfloat tx, M3Gfloat ty, M3Gfloat tz);
|
sl@0
|
972 |
M3G_API void m3gTranslate (M3GTransformable handle, M3Gfloat tx, M3Gfloat ty, M3Gfloat tz);
|
sl@0
|
973 |
M3G_API void m3gGetTranslation (M3GTransformable handle, M3Gfloat *translation);
|
sl@0
|
974 |
M3G_API void m3gSetTransform (M3GTransformable handle, const M3GMatrix *transform);
|
sl@0
|
975 |
M3G_API void m3gGetTransform (M3GTransformable handle, M3GMatrix *transform);
|
sl@0
|
976 |
M3G_API void m3gGetCompositeTransform(M3GTransformable handle, M3GMatrix *transform);
|
sl@0
|
977 |
|
sl@0
|
978 |
/* -------- VertexArray -------- */
|
sl@0
|
979 |
|
sl@0
|
980 |
M3G_API M3GVertexArray m3gCreateVertexArray (M3GInterface m3g, M3Gsizei count, M3Gint size, M3Gdatatype type);
|
sl@0
|
981 |
M3G_API void m3gGetVertexArrayParams (M3GVertexArray handle, M3Gsizei *count, M3Gint *size, M3Gdatatype *type, M3Gsizei *stride);
|
sl@0
|
982 |
M3G_API void * m3gMapVertexArray (M3GVertexArray handle);
|
sl@0
|
983 |
M3G_API const void * m3gMapVertexArrayReadOnly(M3GVertexArray handle);
|
sl@0
|
984 |
M3G_API void m3gSetVertexArrayElements(M3GVertexArray handle, M3Gint first, M3Gsizei count, M3Gsizei srcLength, M3Gdatatype type, const void *src);
|
sl@0
|
985 |
M3G_API void m3gTransformArray (M3GVertexArray handle, M3GMatrix *transform, M3Gfloat *out, M3Gint outLength, M3Gbool w);
|
sl@0
|
986 |
M3G_API void m3gUnmapVertexArray (M3GVertexArray handle);
|
sl@0
|
987 |
M3G_API void m3gGetVertexArrayElements(M3GVertexArray handle, M3Gint first, M3Gsizei count, M3Gsizei dstLength, M3Gdatatype type, void *dst);
|
sl@0
|
988 |
|
sl@0
|
989 |
/* -------- VertexBuffer -------- */
|
sl@0
|
990 |
|
sl@0
|
991 |
M3G_API M3GVertexBuffer m3gCreateVertexBuffer (M3GInterface m3g);
|
sl@0
|
992 |
M3G_API M3Gint m3gGetVertexCount (M3GVertexBuffer hBuffer);
|
sl@0
|
993 |
M3G_API M3GVertexArray m3gGetVertexArray (M3GVertexBuffer handle, M3Gint which, M3Gfloat *scaleBias, M3Gint sbLength);
|
sl@0
|
994 |
M3G_API void m3gSetColorArray (M3GVertexBuffer hBuffer, M3GVertexArray hArray);
|
sl@0
|
995 |
M3G_API void m3gSetNormalArray (M3GVertexBuffer hBuffer, M3GVertexArray hArray);
|
sl@0
|
996 |
M3G_API void m3gSetTexCoordArray (M3GVertexBuffer hBuffer, M3Gint unit, M3GVertexArray hArray, M3Gfloat scale, M3Gfloat *bias, M3Gint biasLength);
|
sl@0
|
997 |
M3G_API void m3gSetVertexDefaultColor(M3GVertexBuffer hBuffer, M3Guint ARGB);
|
sl@0
|
998 |
M3G_API M3Guint m3gGetVertexDefaultColor(M3GVertexBuffer hBuffer);
|
sl@0
|
999 |
M3G_API void m3gSetVertexArray (M3GVertexBuffer hBuffer, M3GVertexArray hArray, M3Gfloat scale, M3Gfloat *bias, M3Gint biasLength);
|
sl@0
|
1000 |
|
sl@0
|
1001 |
/* -------- World -------- */
|
sl@0
|
1002 |
|
sl@0
|
1003 |
M3G_API M3GWorld m3gCreateWorld (M3GInterface hInterface);
|
sl@0
|
1004 |
M3G_API void m3gSetActiveCamera (M3GWorld handle, M3GCamera hCamera);
|
sl@0
|
1005 |
M3G_API void m3gSetBackground (M3GWorld handle, M3GBackground hBackground);
|
sl@0
|
1006 |
M3G_API M3GBackground m3gGetBackground (M3GWorld handle);
|
sl@0
|
1007 |
M3G_API M3GCamera m3gGetActiveCamera (M3GWorld handle);
|
sl@0
|
1008 |
|
sl@0
|
1009 |
#if defined(__cplusplus)
|
sl@0
|
1010 |
} /* extern "C" */
|
sl@0
|
1011 |
#endif
|
sl@0
|
1012 |
|
sl@0
|
1013 |
#endif /*__M3G_CORE_H__*/
|