Project

General

Profile

Feature #3606 ยป WGLWidgetWrapper.h

Prasad Dixit, 11/11/2014 12:40 AM

 
1
/*
2
** (c)Copyright 2014 Prasad Dixit (pjdixit@gmail.com). All rights reserved.
3
**
4
** Unauthorized copying of this file, via any medium is strictly prohibited.
5
** Proprietary and confidential.
6
**
7
** Project: XXXX
8
**
9
*/
10

    
11
/*
12
** Notes:
13
** 1.
14
**
15
*/
16

    
17
/*
18
**ToDo:
19
** 1.
20
** 2.
21
*/
22

    
23
#ifndef __WGLWIDGET_WRAPPER_H__
24
#define __WGLWIDGET_WRAPPER_H__
25

    
26
#include <Wt/WGLWidget>
27

    
28
// Standard Include file(s)
29

    
30
// Include file(s)
31

    
32
// Global declaration(s)
33

    
34
//typedef khronos_int8_t GLbyte;
35
//typedef khronos_float_t GLclampf;
36
//typedef khronos_int32_t GLfixed;
37
typedef short GLshort;
38
typedef unsigned short GLushort;
39
typedef void GLvoid;
40
typedef struct __GLsync *GLsync;
41
//typedef khronos_int64_t GLint64;
42
//typedef khronos_uint64_t GLuint64;
43
typedef unsigned int GLenum;
44
typedef unsigned int GLuint;
45
typedef char GLchar;
46
//typedef khronos_float_t GLfloat;
47
//typedef khronos_ssize_t GLsizeiptr;
48
//typedef khronos_intptr_t GLintptr;
49
typedef unsigned int GLbitfield;
50
typedef int GLint;
51
typedef unsigned char GLboolean;
52
typedef int GLsizei;
53
//typedef khronos_uint8_t GLubyte;
54

    
55
namespace Wt 
56
{
57
	// WT_WGL_TEMPLATE is undefined at the end of WGLWidget.h. Define it here again for use in WGLWidgetWrapper class. 
58
	// It is undefined again at the end of the class declaration.
59
	#if !defined(WT_TARGET_JAVA)
60
	#define WT_WGL_TEMPLATE(...) template < __VA_ARGS__ >
61
	#else
62
	#define WT_WGL_TEMPLATE(...)
63
	#endif
64

    
65
/*
66
** A wrapper class for WGLWidget to keep OpenGL ES code base portable to Wt with minimal effort
67
**
68
**/
69
class WGLWidgetWrapper : public WGLWidget
70
{
71
public:
72
	// Constructor(s)
73
	WGLWidgetWrapper(WContainerWidget *parent = 0) : WGLWidget(parent)
74
	{
75
	}
76

    
77
	// Destructor(s)
78
	//~WGLWidgetWrapper();
79

    
80
	// Enumerator(s)
81
	/*! \brief The enourmous GLenum
82
	*
83
	* This enum contains all numeric constants defined by the WebGL standard.
84
	*/
85
	enum GLenum {
86
		/* ClearBufferMask */
87
		//DEPTH_BUFFER_BIT = 0x00000100,
88
		//STENCIL_BUFFER_BIT = 0x00000400,
89
		//COLOR_BUFFER_BIT = 0x00004000,
90
		GL_DEPTH_BUFFER_BIT = DEPTH_BUFFER_BIT,
91
		GL_STENCIL_BUFFER_BIT = STENCIL_BUFFER_BIT,
92
		GL_COLOR_BUFFER_BIT = COLOR_BUFFER_BIT,
93

    
94

    
95
		/* BeginMode */
96
		//POINTS = 0x0000,
97
		//LINES = 0x0001,
98
		//LINE_LOOP = 0x0002,
99
		//LINE_STRIP = 0x0003,
100
		//TRIANGLES = 0x0004,
101
		//TRIANGLE_STRIP = 0x0005,
102
		//TRIANGLE_FAN = 0x0006,
103
		GL_POINTS = POINTS,
104
		GL_LINES = LINES,
105
		GL_LINE_LOOP = LINE_LOOP,
106
		GL_LINE_STRIP = LINE_STRIP,
107
		GL_TRIANGLES = TRIANGLES,
108
		GL_TRIANGLE_STRIP = TRIANGLE_STRIP,
109
		GL_TRIANGLE_FAN = TRIANGLE_FAN,
110

    
111
		/* AlphaFunction (not supported in ES20) */
112
		/*      NEVER */
113
		/*      LESS */
114
		/*      EQUAL */
115
		/*      LEQUAL */
116
		/*      GREATER */
117
		/*      NOTEQUAL */
118
		/*      GEQUAL */
119
		/*      ALWAYS */
120

    
121
		/* BlendingFactorDest */
122
		//ZERO = 0x0,
123
		//ONE = 0x1,
124
		//SRC_COLOR = 0x0300,
125
		//ONE_MINUS_SRC_COLOR = 0x0301,
126
		//SRC_ALPHA = 0x0302,
127
		//ONE_MINUS_SRC_ALPHA = 0x0303,
128
		//DST_ALPHA = 0x0304,
129
		//ONE_MINUS_DST_ALPHA = 0x0305,
130

    
131
		GL_ZERO = ZERO,
132
		GL_ONE = ONE,
133
		GL_SRC_COLOR = SRC_COLOR,
134
		GL_ONE_MINUS_SRC_COLOR = ONE_MINUS_SRC_COLOR,
135
		GL_SRC_ALPHA = SRC_ALPHA,
136
		GL_ONE_MINUS_SRC_ALPHA = ONE_MINUS_SRC_ALPHA,
137
		GL_DST_ALPHA = DST_ALPHA,
138
		GL_ONE_MINUS_DST_ALPHA = ONE_MINUS_DST_ALPHA,
139

    
140
		/* BlendingFactorSrc */
141
		/*      ZERO */
142
		/*      ONE */
143
		//DST_COLOR = 0x0306,
144
		//ONE_MINUS_DST_COLOR = 0x0307,
145
		//SRC_ALPHA_SATURATE = 0x0308,
146
		GL_DST_COLOR = DST_COLOR,
147
		GL_ONE_MINUS_DST_COLOR = ONE_MINUS_DST_COLOR,
148
		GL_SRC_ALPHA_SATURATE = SRC_ALPHA_SATURATE,
149
		/*      SRC_ALPHA */
150
		/*      ONE_MINUS_SRC_ALPHA */
151
		/*      DST_ALPHA */
152
		/*      ONE_MINUS_DST_ALPHA */
153

    
154
		/* BlendEquationSeparate */
155
		//FUNC_ADD = 0x8006,
156
		//BLEND_EQUATION = 0x8009,
157
		//BLEND_EQUATION_RGB = 0x8009,   /* same as BLEND_EQUATION */
158
		//BLEND_EQUATION_ALPHA = 0x883D,
159
		GL_FUNC_ADD = FUNC_ADD,
160
		GL_BLEND_EQUATION = BLEND_EQUATION,
161
		GL_BLEND_EQUATION_RGB = BLEND_EQUATION_RGB,
162
		GL_BLEND_EQUATION_ALPHA = BLEND_EQUATION_ALPHA,
163

    
164
		/* BlendSubtract */
165
		//FUNC_SUBTRACT = 0x800A,
166
		//FUNC_REVERSE_SUBTRACT = 0x800B,
167
		GL_FUNC_SUBTRACT = FUNC_SUBTRACT,
168
		GL_FUNC_REVERSE_SUBTRACT = FUNC_REVERSE_SUBTRACT,
169

    
170
		/* Separate Blend Functions */
171
		//BLEND_DST_RGB = 0x80C8,
172
		//BLEND_SRC_RGB = 0x80C9,
173
		//BLEND_DST_ALPHA = 0x80CA,
174
		//BLEND_SRC_ALPHA = 0x80CB,
175
		//CONSTANT_COLOR = 0x8001,
176
		//ONE_MINUS_CONSTANT_COLOR = 0x8002,
177
		//CONSTANT_ALPHA = 0x8003,
178
		//ONE_MINUS_CONSTANT_ALPHA = 0x8004,
179
		//BLEND_COLOR = 0x8005,
180
		GL_BLEND_DST_RGB = BLEND_DST_RGB,
181
		GL_BLEND_SRC_RGB = BLEND_SRC_RGB,
182
		GL_BLEND_DST_ALPHA = BLEND_DST_ALPHA,
183
		GL_BLEND_SRC_ALPHA = BLEND_SRC_ALPHA,
184
		GL_CONSTANT_COLOR = CONSTANT_COLOR,
185
		GL_ONE_MINUS_CONSTANT_COLOR = ONE_MINUS_CONSTANT_COLOR,
186
		GL_CONSTANT_ALPHA = CONSTANT_ALPHA,
187
		GL_ONE_MINUS_CONSTANT_ALPHA = ONE_MINUS_CONSTANT_ALPHA,
188
		GL_BLEND_COLOR = BLEND_COLOR,
189

    
190
		/* Buffer Objects */
191
		//ARRAY_BUFFER = 0x8892,
192
		//ELEMENT_ARRAY_BUFFER = 0x8893,
193
		//ARRAY_BUFFER_BINDING = 0x8894,
194
		//ELEMENT_ARRAY_BUFFER_BINDING = 0x8895,
195
		GL_ARRAY_BUFFER = ARRAY_BUFFER,
196
		GL_ELEMENT_ARRAY_BUFFER = ELEMENT_ARRAY_BUFFER,
197
		GL_ARRAY_BUFFER_BINDING = ARRAY_BUFFER_BINDING,
198
		GL_ELEMENT_ARRAY_BUFFER_BINDING = ELEMENT_ARRAY_BUFFER_BINDING,
199

    
200
		//STREAM_DRAW = 0x88E0,
201
		//STATIC_DRAW = 0x88E4,
202
		//DYNAMIC_DRAW = 0x88E8,
203
		GL_STREAM_DRAW = STREAM_DRAW,
204
		GL_STATIC_DRAW = STATIC_DRAW,
205
		GL_DYNAMIC_DRAW = DYNAMIC_DRAW,
206

    
207
		//BUFFER_SIZE = 0x8764,
208
		//BUFFER_USAGE = 0x8765,
209
		GL_BUFFER_SIZE = BUFFER_SIZE,
210
		GL_BUFFER_USAGE = BUFFER_USAGE,
211

    
212

    
213
		//CURRENT_VERTEX_ATTRIB = 0x8626,
214
		GL_CURRENT_VERTEX_ATTRIB = CURRENT_VERTEX_ATTRIB,
215

    
216
		/* CullFaceMode */
217
		//FRONT = 0x0404,
218
		//BACK = 0x0405,
219
		//FRONT_AND_BACK = 0x0408,
220
		GL_FRONT = FRONT,
221
		GL_BACK = BACK,
222
		GL_FRONT_AND_BACK = FRONT_AND_BACK,
223

    
224
		/* DepthFunction */
225
		/*      NEVER */
226
		/*      LESS */
227
		/*      EQUAL */
228
		/*      LEQUAL */
229
		/*      GREATER */
230
		/*      NOTEQUAL */
231
		/*      GEQUAL */
232
		/*      ALWAYS */
233

    
234
		/* EnableCap */
235
		/* TEXTURE_2D */
236
		//CULL_FACE = 0x0B44,
237
		//BLEND = 0x0BE2,
238
		//DITHER = 0x0BD0,
239
		//STENCIL_TEST = 0x0B90,
240
		//DEPTH_TEST = 0x0B71,
241
		//SCISSOR_TEST = 0x0C11,
242
		//POLYGON_OFFSET_FILL = 0x8037,
243
		//SAMPLE_ALPHA_TO_COVERAGE = 0x809E,
244
		//SAMPLE_COVERAGE = 0x80A0,
245
		GL_CULL_FACE = CULL_FACE,
246
		GL_BLEND = BLEND,
247
		GL_DITHER = DITHER,
248
		GL_STENCIL_TEST = STENCIL_TEST,
249
		GL_DEPTH_TEST = DEPTH_TEST,
250
		GL_SCISSOR_TEST = SCISSOR_TEST,
251
		GL_POLYGON_OFFSET_FILL = POLYGON_OFFSET_FILL,
252
		GL_SAMPLE_ALPHA_TO_COVERAGE = SAMPLE_ALPHA_TO_COVERAGE,
253
		GL_SAMPLE_COVERAGE = SAMPLE_COVERAGE,
254

    
255
		/* ErrorCode */
256
		//NO_ERROR = 0x0,
257
		//INVALID_ENUM = 0x0500,
258
		//INVALID_VALUE = 0x0501,
259
		//INVALID_OPERATION = 0x0502,
260
		//OUT_OF_MEMORY = 0x0505,
261
		GL_NO_ERROR = NO_ERROR,
262
		GL_INVALID_ENUM = INVALID_ENUM,
263
		GL_INVALID_VALUE = INVALID_VALUE,
264
		GL_INVALID_OPERATION = INVALID_OPERATION,
265
		GL_OUT_OF_MEMORY = OUT_OF_MEMORY,
266

    
267
		/* FrontFaceDirection */
268
		//CW = 0x0900,
269
		//CCW = 0x0901,
270
		GL_CW = CW,
271
		GL_CCW = CCW,
272

    
273
		/* GetPName */
274
		//LINE_WIDTH = 0x0B21,
275
		//ALIASED_POINT_SIZE_RANGE = 0x846D,
276
		//ALIASED_LINE_WIDTH_RANGE = 0x846E,
277
		//CULL_FACE_MODE = 0x0B45,
278
		//FRONT_FACE = 0x0B46,
279
		//DEPTH_RANGE = 0x0B70,
280
		//DEPTH_WRITEMASK = 0x0B72,
281
		//DEPTH_CLEAR_VALUE = 0x0B73,
282
		//DEPTH_FUNC = 0x0B74,
283
		//STENCIL_CLEAR_VALUE = 0x0B91,
284
		//STENCIL_FUNC = 0x0B92,
285
		//STENCIL_FAIL = 0x0B94,
286
		//STENCIL_PASS_DEPTH_FAIL = 0x0B95,
287
		//STENCIL_PASS_DEPTH_PASS = 0x0B96,
288
		//STENCIL_REF = 0x0B97,
289
		//STENCIL_VALUE_MASK = 0x0B93,
290
		//STENCIL_WRITEMASK = 0x0B98,
291
		//STENCIL_BACK_FUNC = 0x8800,
292
		//STENCIL_BACK_FAIL = 0x8801,
293
		//STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802,
294
		//STENCIL_BACK_PASS_DEPTH_PASS = 0x8803,
295
		//STENCIL_BACK_REF = 0x8CA3,
296
		//STENCIL_BACK_VALUE_MASK = 0x8CA4,
297
		//STENCIL_BACK_WRITEMASK = 0x8CA5,
298
		//VIEWPORT = 0x0BA2,
299
		//SCISSOR_BOX = 0x0C10,
300
		GL_LINE_WIDTH = LINE_WIDTH,
301
		GL_ALIASED_POINT_SIZE_RANGE = ALIASED_POINT_SIZE_RANGE,
302
		GL_ALIASED_LINE_WIDTH_RANGE = ALIASED_LINE_WIDTH_RANGE,
303
		GL_CULL_FACE_MODE = CULL_FACE_MODE,
304
		GL_FRONT_FACE = FRONT_FACE,
305
		GL_DEPTH_RANGE = DEPTH_RANGE,
306
		GL_DEPTH_WRITEMASK = DEPTH_WRITEMASK,
307
		GL_DEPTH_CLEAR_VALUE = DEPTH_CLEAR_VALUE,
308
		GL_DEPTH_FUNC = DEPTH_FUNC,
309
		GL_STENCIL_CLEAR_VALUE = STENCIL_CLEAR_VALUE,
310
		GL_STENCIL_FUNC = STENCIL_FUNC,
311
		GL_STENCIL_FAIL = STENCIL_FAIL,
312
		GL_STENCIL_PASS_DEPTH_FAIL = STENCIL_PASS_DEPTH_FAIL,
313
		GL_STENCIL_PASS_DEPTH_PASS = STENCIL_PASS_DEPTH_PASS,
314
		GL_STENCIL_REF = STENCIL_REF,
315
		GL_STENCIL_VALUE_MASK = STENCIL_VALUE_MASK,
316
		GL_STENCIL_WRITEMASK = STENCIL_WRITEMASK,
317
		GL_STENCIL_BACK_FUNC = STENCIL_BACK_FUNC,
318
		GL_STENCIL_BACK_FAIL = STENCIL_BACK_FAIL,
319
		GL_STENCIL_BACK_PASS_DEPTH_FAIL = STENCIL_BACK_PASS_DEPTH_FAIL,
320
		GL_STENCIL_BACK_PASS_DEPTH_PASS = STENCIL_BACK_PASS_DEPTH_PASS,
321
		GL_STENCIL_BACK_REF = STENCIL_BACK_REF,
322
		GL_STENCIL_BACK_VALUE_MASK = STENCIL_BACK_VALUE_MASK,
323
		GL_STENCIL_BACK_WRITEMASK = STENCIL_BACK_WRITEMASK,
324
		GL_VIEWPORT = VIEWPORT,
325
		GL_SCISSOR_BOX = SCISSOR_BOX,
326

    
327
		/*      SCISSOR_TEST */
328
		//COLOR_CLEAR_VALUE = 0x0C22,
329
		//COLOR_WRITEMASK = 0x0C23,
330
		//UNPACK_ALIGNMENT = 0x0CF5,
331
		//PACK_ALIGNMENT = 0x0D05,
332
		//MAX_TEXTURE_SIZE = 0x0D33,
333
		//MAX_VIEWPORT_DIMS = 0x0D3A,
334
		//SUBPIXEL_BITS = 0x0D50,
335
		//RED_BITS = 0x0D52,
336
		//GREEN_BITS = 0x0D53,
337
		//BLUE_BITS = 0x0D54,
338
		//ALPHA_BITS = 0x0D55,
339
		//DEPTH_BITS = 0x0D56,
340
		//STENCIL_BITS = 0x0D57,
341
		//POLYGON_OFFSET_UNITS = 0x2A00,
342
		GL_COLOR_CLEAR_VALUE = COLOR_CLEAR_VALUE,
343
		GL_COLOR_WRITEMASK = COLOR_WRITEMASK,
344
		GL_UNPACK_ALIGNMENT = UNPACK_ALIGNMENT,
345
		GL_PACK_ALIGNMENT = PACK_ALIGNMENT,
346
		GL_MAX_TEXTURE_SIZE = MAX_TEXTURE_SIZE,
347
		GL_MAX_VIEWPORT_DIMS = MAX_VIEWPORT_DIMS,
348
		GL_SUBPIXEL_BITS = SUBPIXEL_BITS,
349
		GL_RED_BITS = RED_BITS,
350
		GL_GREEN_BITS = GREEN_BITS,
351
		GL_BLUE_BITS = BLUE_BITS,
352
		GL_ALPHA_BITS = ALPHA_BITS,
353
		GL_DEPTH_BITS = DEPTH_BITS,
354
		GL_STENCIL_BITS = STENCIL_BITS,
355
		GL_POLYGON_OFFSET_UNITS = POLYGON_OFFSET_UNITS,
356

    
357
		/*      POLYGON_OFFSET_FILL */
358
		//POLYGON_OFFSET_FACTOR = 0x8038,
359
		//TEXTURE_BINDING_2D = 0x8069,
360
		//SAMPLE_BUFFERS = 0x80A8,
361
		//SAMPLES = 0x80A9,
362
		//SAMPLE_COVERAGE_VALUE = 0x80AA,
363
		//SAMPLE_COVERAGE_INVERT = 0x80AB,
364
		GL_POLYGON_OFFSET_FACTOR = POLYGON_OFFSET_FACTOR,
365
		GL_TEXTURE_BINDING_2D = TEXTURE_BINDING_2D,
366
		GL_SAMPLE_BUFFERS = SAMPLE_BUFFERS,
367
		GL_SAMPLES = SAMPLES,
368
		GL_SAMPLE_COVERAGE_VALUE = SAMPLE_COVERAGE_VALUE,
369
		GL_SAMPLE_COVERAGE_INVERT = SAMPLE_COVERAGE_INVERT,
370

    
371
		/* GetTextureParameter */
372
		/*      TEXTURE_MAG_FILTER */
373
		/*      TEXTURE_MIN_FILTER */
374
		/*      TEXTURE_WRAP_S */
375
		/*      TEXTURE_WRAP_T */
376

    
377
		//NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2,
378
		//COMPRESSED_TEXTURE_FORMATS = 0x86A3,
379
		GL_NUM_COMPRESSED_TEXTURE_FORMATS = NUM_COMPRESSED_TEXTURE_FORMATS,
380
		GL_COMPRESSED_TEXTURE_FORMATS = COMPRESSED_TEXTURE_FORMATS,
381

    
382
		/* HintMode */
383
		//DONT_CARE = 0x1100,
384
		//FASTEST = 0x1101,
385
		//NICEST = 0x1102,
386
		GL_DONT_CARE = DONT_CARE,
387
		GL_FASTEST = FASTEST,
388
		GL_NICEST = NICEST,
389

    
390
		/* HintTarget */
391
		//GENERATE_MIPMAP_HINT = 0x8192,
392
		GL_GENERATE_MIPMAP_HINT = GENERATE_MIPMAP_HINT,
393

    
394
		/* DataType */
395
		//BYTE = 0x1400,
396
		//UNSIGNED_BYTE = 0x1401,
397
		//SHORT = 0x1402,
398
		//UNSIGNED_SHORT = 0x1403,
399
		//INT = 0x1404,
400
		//UNSIGNED_INT = 0x1405,
401
		//FLOAT = 0x1406,
402
		GL_BYTE = BYTE,
403
		GL_UNSIGNED_BYTE = UNSIGNED_BYTE,
404
		GL_SHORT = SHORT,
405
		GL_UNSIGNED_SHORT = UNSIGNED_SHORT,
406
		GL_INT = INT,
407
		GL_UNSIGNED_INT = UNSIGNED_INT,
408
		GL_FLOAT = FLOAT,
409

    
410
		/* PixelFormat */
411
		//DEPTH_COMPONENT = 0x1902,
412
		//ALPHA = 0x1906,
413
		//RGB = 0x1907,
414
		//RGBA = 0x1908,
415
		//LUMINANCE = 0x1909,
416
		//LUMINANCE_ALPHA = 0x190A,
417
		GL_DEPTH_COMPONENT = DEPTH_COMPONENT,
418
		GL_ALPHA = ALPHA,
419
		GL_RGB = RGB,
420
		GL_RGBA = RGBA,
421
		GL_LUMINANCE = LUMINANCE,
422
		GL_LUMINANCE_ALPHA = LUMINANCE_ALPHA,
423

    
424
		/* PixelType */
425
		/*      UNSIGNED_BYTE */
426
		//UNSIGNED_SHORT_4_4_4_4 = 0x8033,
427
		//UNSIGNED_SHORT_5_5_5_1 = 0x8034,
428
		//UNSIGNED_SHORT_5_6_5 = 0x8363,
429
		GL_UNSIGNED_SHORT_4_4_4_4 = UNSIGNED_SHORT_4_4_4_4,
430
		GL_UNSIGNED_SHORT_5_5_5_1 = UNSIGNED_SHORT_5_5_5_1,
431
		GL_UNSIGNED_SHORT_5_6_5 = UNSIGNED_SHORT_5_6_5,
432

    
433
		/* Shaders */
434
		//FRAGMENT_SHADER = 0x8B30,
435
		//VERTEX_SHADER = 0x8B31,
436
		//MAX_VERTEX_ATTRIBS = 0x8869,
437
		//MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB,
438
		//MAX_VARYING_VECTORS = 0x8DFC,
439
		//MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D,
440
		//MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C,
441
		//MAX_TEXTURE_IMAGE_UNITS = 0x8872,
442
		//MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD,
443
		//SHADER_TYPE = 0x8B4F,
444
		//DELETE_STATUS = 0x8B80,
445
		//LINK_STATUS = 0x8B82,
446
		//VALIDATE_STATUS = 0x8B83,
447
		//ATTACHED_SHADERS = 0x8B85,
448
		//ACTIVE_UNIFORMS = 0x8B86,
449
		//ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87,
450
		//ACTIVE_ATTRIBUTES = 0x8B89,
451
		//ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A,
452
		//SHADING_LANGUAGE_VERSION = 0x8B8C,
453
		//CURRENT_PROGRAM = 0x8B8D,
454
		GL_FRAGMENT_SHADER = FRAGMENT_SHADER,
455
		GL_VERTEX_SHADER = VERTEX_SHADER,
456
		GL_MAX_VERTEX_ATTRIBS = MAX_VERTEX_ATTRIBS,
457
		GL_MAX_VERTEX_UNIFORM_VECTORS = MAX_VERTEX_UNIFORM_VECTORS,
458
		GL_MAX_VARYING_VECTORS = MAX_VARYING_VECTORS,
459
		GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = MAX_COMBINED_TEXTURE_IMAGE_UNITS,
460
		GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = MAX_VERTEX_TEXTURE_IMAGE_UNITS,
461
		GL_MAX_TEXTURE_IMAGE_UNITS = MAX_TEXTURE_IMAGE_UNITS,
462
		GL_MAX_FRAGMENT_UNIFORM_VECTORS = MAX_FRAGMENT_UNIFORM_VECTORS,
463
		GL_SHADER_TYPE = SHADER_TYPE,
464
		GL_DELETE_STATUS = DELETE_STATUS,
465
		GL_LINK_STATUS = LINK_STATUS,
466
		GL_VALIDATE_STATUS = VALIDATE_STATUS,
467
		GL_ATTACHED_SHADERS = ATTACHED_SHADERS,
468
		GL_ACTIVE_UNIFORMS = ACTIVE_UNIFORMS,
469
		GL_ACTIVE_UNIFORM_MAX_LENGTH = ACTIVE_UNIFORM_MAX_LENGTH,
470
		GL_ACTIVE_ATTRIBUTES = ACTIVE_ATTRIBUTES,
471
		GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = ACTIVE_ATTRIBUTE_MAX_LENGTH,
472
		GL_SHADING_LANGUAGE_VERSION = SHADING_LANGUAGE_VERSION,
473
		GL_CURRENT_PROGRAM = CURRENT_PROGRAM,
474

    
475
		/* StencilFunction */
476
		//NEVER = 0x0200,
477
		//LESS = 0x0201,
478
		//EQUAL = 0x0202,
479
		//LEQUAL = 0x0203,
480
		//GREATER = 0x0204,
481
		//NOTEQUAL = 0x0205,
482
		//GEQUAL = 0x0206,
483
		//ALWAYS = 0x0207,
484
		GL_NEVER = NEVER,
485
		GL_LESS = LESS,
486
		GL_EQUAL = EQUAL,
487
		GL_LEQUAL = LEQUAL,
488
		GL_GREATER = GREATER,
489
		GL_NOTEQUAL = NOTEQUAL,
490
		GL_GEQUAL = GEQUAL,
491
		GL_ALWAYS = ALWAYS,
492

    
493
		/* StencilOp */
494
		/*      ZERO */
495
		//KEEP = 0x1E00,
496
		//REPLACE = 0x1E01,
497
		//INCR = 0x1E02,
498
		//DECR = 0x1E03,
499
		//INVERT = 0x150A,
500
		//INCR_WRAP = 0x8507,
501
		//DECR_WRAP = 0x8508,
502
		GL_KEEP = KEEP,
503
		GL_REPLACE = REPLACE,
504
		GL_INCR = INCR,
505
		GL_DECR = DECR,
506
		GL_INVERT = INVERT,
507
		GL_INCR_WRAP = INCR_WRAP,
508
		GL_DECR_WRAP = DECR_WRAP,
509

    
510
		/* StringName */
511
		//VENDOR = 0x1F00,
512
		//RENDERER = 0x1F01,
513
		//VERSION = 0x1F02,
514
		GL_VENDOR = VENDOR,
515
		GL_RENDERER = RENDERER,
516
		GL_VERSION = VERSION,
517

    
518
		/* TextureMagFilter */
519
		//NEAREST = 0x2600,
520
		//LINEAR = 0x2601,
521
		GL_NEAREST = NEAREST,
522
		GL_LINEAR = LINEAR,
523

    
524
		/* TextureMinFilter */
525
		/*      NEAREST */
526
		/*      LINEAR */
527
		//NEAREST_MIPMAP_NEAREST = 0x2700,
528
		//LINEAR_MIPMAP_NEAREST = 0x2701,
529
		//NEAREST_MIPMAP_LINEAR = 0x2702,
530
		//LINEAR_MIPMAP_LINEAR = 0x2703,
531
		GL_NEAREST_MIPMAP_NEAREST = NEAREST_MIPMAP_NEAREST,
532
		GL_LINEAR_MIPMAP_NEAREST = LINEAR_MIPMAP_NEAREST,
533
		GL_NEAREST_MIPMAP_LINEAR = NEAREST_MIPMAP_LINEAR,
534
		GL_LINEAR_MIPMAP_LINEAR = LINEAR_MIPMAP_LINEAR,
535

    
536
		/* TextureParameterName */
537
		//TEXTURE_MAG_FILTER = 0x2800,
538
		//TEXTURE_MIN_FILTER = 0x2801,
539
		//TEXTURE_WRAP_S = 0x2802,
540
		//TEXTURE_WRAP_T = 0x2803,
541
		GL_TEXTURE_MAG_FILTER = TEXTURE_MAG_FILTER,
542
		GL_TEXTURE_MIN_FILTER = TEXTURE_MIN_FILTER,
543
		GL_TEXTURE_WRAP_S = TEXTURE_WRAP_S,
544
		GL_TEXTURE_WRAP_T = TEXTURE_WRAP_T,
545

    
546
		/* TextureTarget */
547
		//TEXTURE_2D = 0x0DE1,
548
		//TEXTURE = 0x1702,
549
		GL_TEXTURE_2D = TEXTURE_2D,
550
		GL_TEXTURE = TEXTURE,
551

    
552
		//TEXTURE_CUBE_MAP = 0x8513,
553
		//TEXTURE_BINDING_CUBE_MAP = 0x8514,
554
		//TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515,
555
		//TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516,
556
		//TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517,
557
		//TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518,
558
		//TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519,
559
		//TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A,
560
		//MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C,
561
		GL_TEXTURE_CUBE_MAP = TEXTURE_CUBE_MAP,
562
		GL_TEXTURE_BINDING_CUBE_MAP = TEXTURE_BINDING_CUBE_MAP,
563
		GL_TEXTURE_CUBE_MAP_POSITIVE_X = TEXTURE_CUBE_MAP_POSITIVE_X,
564
		GL_TEXTURE_CUBE_MAP_NEGATIVE_X = TEXTURE_CUBE_MAP_NEGATIVE_X,
565
		GL_TEXTURE_CUBE_MAP_POSITIVE_Y = TEXTURE_CUBE_MAP_POSITIVE_Y,
566
		GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = TEXTURE_CUBE_MAP_NEGATIVE_Y,
567
		GL_TEXTURE_CUBE_MAP_POSITIVE_Z = TEXTURE_CUBE_MAP_POSITIVE_Z,
568
		GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = TEXTURE_CUBE_MAP_NEGATIVE_Z,
569
		GL_MAX_CUBE_MAP_TEXTURE_SIZE = MAX_CUBE_MAP_TEXTURE_SIZE,
570

    
571
		/* TextureUnit */
572
		//TEXTURE0 = 0x84C0,
573
		//TEXTURE1 = 0x84C1,
574
		//TEXTURE2 = 0x84C2,
575
		//TEXTURE3 = 0x84C3,
576
		//TEXTURE4 = 0x84C4,
577
		//TEXTURE5 = 0x84C5,
578
		//TEXTURE6 = 0x84C6,
579
		//TEXTURE7 = 0x84C7,
580
		//TEXTURE8 = 0x84C8,
581
		//TEXTURE9 = 0x84C9,
582
		//TEXTURE10 = 0x84CA,
583
		//TEXTURE11 = 0x84CB,
584
		//TEXTURE12 = 0x84CC,
585
		//TEXTURE13 = 0x84CD,
586
		//TEXTURE14 = 0x84CE,
587
		//TEXTURE15 = 0x84CF,
588
		//TEXTURE16 = 0x84D0,
589
		//TEXTURE17 = 0x84D1,
590
		//TEXTURE18 = 0x84D2,
591
		//TEXTURE19 = 0x84D3,
592
		//TEXTURE20 = 0x84D4,
593
		//TEXTURE21 = 0x84D5,
594
		//TEXTURE22 = 0x84D6,
595
		//TEXTURE23 = 0x84D7,
596
		//TEXTURE24 = 0x84D8,
597
		//TEXTURE25 = 0x84D9,
598
		//TEXTURE26 = 0x84DA,
599
		//TEXTURE27 = 0x84DB,
600
		//TEXTURE28 = 0x84DC,
601
		//TEXTURE29 = 0x84DD,
602
		//TEXTURE30 = 0x84DE,
603
		//TEXTURE31 = 0x84DF,
604
		//ACTIVE_TEXTURE = 0x84E0,
605
		GL_TEXTURE0 = TEXTURE0,
606
		GL_TEXTURE1 = TEXTURE1,
607
		GL_TEXTURE2 = TEXTURE2,
608
		GL_TEXTURE3 = TEXTURE3,
609
		GL_TEXTURE4 = TEXTURE4,
610
		GL_TEXTURE5 = TEXTURE5,
611
		GL_TEXTURE6 = TEXTURE6,
612
		GL_TEXTURE7 = TEXTURE7,
613
		GL_TEXTURE8 = TEXTURE8,
614
		GL_TEXTURE9 = TEXTURE9,
615
		GL_TEXTURE10 = TEXTURE10,
616
		GL_TEXTURE11 = TEXTURE11,
617
		GL_TEXTURE12 = TEXTURE12,
618
		GL_TEXTURE13 = TEXTURE13,
619
		GL_TEXTURE14 = TEXTURE14,
620
		GL_TEXTURE15 = TEXTURE15,
621
		GL_TEXTURE16 = TEXTURE16,
622
		GL_TEXTURE17 = TEXTURE17,
623
		GL_TEXTURE18 = TEXTURE18,
624
		GL_TEXTURE19 = TEXTURE19,
625
		GL_TEXTURE20 = TEXTURE20,
626
		GL_TEXTURE21 = TEXTURE21,
627
		GL_TEXTURE22 = TEXTURE22,
628
		GL_TEXTURE23 = TEXTURE23,
629
		GL_TEXTURE24 = TEXTURE24,
630
		GL_TEXTURE25 = TEXTURE25,
631
		GL_TEXTURE26 = TEXTURE26,
632
		GL_TEXTURE27 = TEXTURE27,
633
		GL_TEXTURE28 = TEXTURE28,
634
		GL_TEXTURE29 = TEXTURE29,
635
		GL_TEXTURE30 = TEXTURE30,
636
		GL_TEXTURE31 = TEXTURE31,
637
		GL_ACTIVE_TEXTURE = ACTIVE_TEXTURE,
638

    
639
		/* TextureWrapMode */
640
		//REPEAT = 0x2901,
641
		//CLAMP_TO_EDGE = 0x812F,
642
		//MIRRORED_REPEAT = 0x8370,
643
		GL_REPEAT = REPEAT,
644
		GL_CLAMP_TO_EDGE = CLAMP_TO_EDGE,
645
		GL_MIRRORED_REPEAT = MIRRORED_REPEAT,
646

    
647
		/* Uniform Types */
648
		//FLOAT_VEC2 = 0x8B50,
649
		//FLOAT_VEC3 = 0x8B51,
650
		//FLOAT_VEC4 = 0x8B52,
651
		//INT_VEC2 = 0x8B53,
652
		//INT_VEC3 = 0x8B54,
653
		//INT_VEC4 = 0x8B55,
654
		//BOOL = 0x8B56,
655
		//BOOL_VEC2 = 0x8B57,
656
		//BOOL_VEC3 = 0x8B58,
657
		//BOOL_VEC4 = 0x8B59,
658
		//FLOAT_MAT2 = 0x8B5A,
659
		//FLOAT_MAT3 = 0x8B5B,
660
		//FLOAT_MAT4 = 0x8B5C,
661
		//SAMPLER_2D = 0x8B5E,
662
		//SAMPLER_CUBE = 0x8B60,
663
		GL_FLOAT_VEC2 = FLOAT_VEC2,
664
		GL_FLOAT_VEC3 = FLOAT_VEC3,
665
		GL_FLOAT_VEC4 = FLOAT_VEC4,
666
		GL_INT_VEC2 = INT_VEC2,
667
		GL_INT_VEC3 = INT_VEC3,
668
		GL_INT_VEC4 = INT_VEC4,
669
		GL_BOOL = BOOL,
670
		GL_BOOL_VEC2 = BOOL_VEC2,
671
		GL_BOOL_VEC3 = BOOL_VEC3,
672
		GL_BOOL_VEC4 = BOOL_VEC4,
673
		GL_FLOAT_MAT2 = FLOAT_MAT2,
674
		GL_FLOAT_MAT3 = FLOAT_MAT3,
675
		GL_FLOAT_MAT4 = FLOAT_MAT4,
676
		GL_SAMPLER_2D = SAMPLER_2D,
677
		GL_SAMPLER_CUBE = SAMPLER_CUBE,
678

    
679
		/* Vertex Arrays */
680
		//VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622,
681
		//VERTEX_ATTRIB_ARRAY_SIZE = 0x8623,
682
		//VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624,
683
		//VERTEX_ATTRIB_ARRAY_TYPE = 0x8625,
684
		//VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A,
685
		//VERTEX_ATTRIB_ARRAY_POINTER = 0x8645,
686
		//VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F,
687
		GL_VERTEX_ATTRIB_ARRAY_ENABLED = VERTEX_ATTRIB_ARRAY_ENABLED,
688
		GL_VERTEX_ATTRIB_ARRAY_SIZE = VERTEX_ATTRIB_ARRAY_SIZE,
689
		GL_VERTEX_ATTRIB_ARRAY_STRIDE = VERTEX_ATTRIB_ARRAY_STRIDE,
690
		GL_VERTEX_ATTRIB_ARRAY_TYPE = VERTEX_ATTRIB_ARRAY_TYPE,
691
		GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = VERTEX_ATTRIB_ARRAY_NORMALIZED,
692
		GL_VERTEX_ATTRIB_ARRAY_POINTER = VERTEX_ATTRIB_ARRAY_POINTER,
693
		GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = VERTEX_ATTRIB_ARRAY_BUFFER_BINDING,
694

    
695
		/* Shader Source */
696
		//COMPILE_STATUS = 0x8B81,
697
		//INFO_LOG_LENGTH = 0x8B84,
698
		//SHADER_SOURCE_LENGTH = 0x8B88,
699
		GL_COMPILE_STATUS = COMPILE_STATUS,
700
		GL_INFO_LOG_LENGTH = INFO_LOG_LENGTH,
701
		GL_SHADER_SOURCE_LENGTH = SHADER_SOURCE_LENGTH,
702

    
703
		/* Shader Precision-Specified Types */
704
		//LOW_FLOAT = 0x8DF0,
705
		//MEDIUM_FLOAT = 0x8DF1,
706
		//HIGH_FLOAT = 0x8DF2,
707
		//LOW_INT = 0x8DF3,
708
		//MEDIUM_INT = 0x8DF4,
709
		//HIGH_INT = 0x8DF5,
710
		GL_LOW_FLOAT = LOW_FLOAT,
711
		GL_MEDIUM_FLOAT = MEDIUM_FLOAT,
712
		GL_HIGH_FLOAT = HIGH_FLOAT,
713
		GL_LOW_INT = LOW_INT,
714
		GL_MEDIUM_INT = MEDIUM_INT,
715
		GL_HIGH_INT = HIGH_INT,
716

    
717
		/* Framebuffer Object. */
718
		//FRAMEBUFFER = 0x8D40,
719
		//RENDERBUFFER = 0x8D41,
720
		GL_FRAMEBUFFER = FRAMEBUFFER,
721
		GL_RENDERBUFFER = RENDERBUFFER,
722

    
723
		//RGBA4 = 0x8056,
724
		//RGB5_A1 = 0x8057,
725
		//RGB565 = 0x8D62,
726
		//DEPTH_COMPONENT16 = 0x81A5,
727
		//STENCIL_INDEX = 0x1901,
728
		//STENCIL_INDEX8 = 0x8D48,
729
		//DEPTH_STENCIL = 0x84F9,
730
		GL_RGBA4 = RGBA4,
731
		GL_RGB5_A1 = RGB5_A1,
732
		GL_RGB565 = RGB565,
733
		GL_DEPTH_COMPONENT16 = DEPTH_COMPONENT16,
734
		GL_STENCIL_INDEX = STENCIL_INDEX,
735
		GL_STENCIL_INDEX8 = STENCIL_INDEX8,
736
		GL_DEPTH_STENCIL = DEPTH_STENCIL,
737

    
738
		//RENDERBUFFER_WIDTH = 0x8D42,
739
		//RENDERBUFFER_HEIGHT = 0x8D43,
740
		//RENDERBUFFER_INTERNAL_FORMAT = 0x8D44,
741
		//RENDERBUFFER_RED_SIZE = 0x8D50,
742
		//RENDERBUFFER_GREEN_SIZE = 0x8D51,
743
		//RENDERBUFFER_BLUE_SIZE = 0x8D52,
744
		//RENDERBUFFER_ALPHA_SIZE = 0x8D53,
745
		//RENDERBUFFER_DEPTH_SIZE = 0x8D54,
746
		//RENDERBUFFER_STENCIL_SIZE = 0x8D55,
747
		GL_RENDERBUFFER_WIDTH = RENDERBUFFER_WIDTH,
748
		GL_RENDERBUFFER_HEIGHT = RENDERBUFFER_HEIGHT,
749
		GL_RENDERBUFFER_INTERNAL_FORMAT = RENDERBUFFER_INTERNAL_FORMAT,
750
		GL_RENDERBUFFER_RED_SIZE = RENDERBUFFER_RED_SIZE,
751
		GL_RENDERBUFFER_GREEN_SIZE = RENDERBUFFER_GREEN_SIZE,
752
		GL_RENDERBUFFER_BLUE_SIZE = RENDERBUFFER_BLUE_SIZE,
753
		GL_RENDERBUFFER_ALPHA_SIZE = RENDERBUFFER_ALPHA_SIZE,
754
		GL_RENDERBUFFER_DEPTH_SIZE = RENDERBUFFER_DEPTH_SIZE,
755
		GL_RENDERBUFFER_STENCIL_SIZE = RENDERBUFFER_STENCIL_SIZE,
756

    
757
		//FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0,
758
		//FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1,
759
		//FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2,
760
		//FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3,
761
		GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE,
762
		GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = FRAMEBUFFER_ATTACHMENT_OBJECT_NAME,
763
		GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL,
764
		GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE,
765

    
766
		//COLOR_ATTACHMENT0 = 0x8CE0,
767
		//DEPTH_ATTACHMENT = 0x8D00,
768
		//STENCIL_ATTACHMENT = 0x8D20,
769
		//DEPTH_STENCIL_ATTACHMENT = 0x821A,
770
		GL_COLOR_ATTACHMENT0 = COLOR_ATTACHMENT0,
771
		GL_DEPTH_ATTACHMENT = DEPTH_ATTACHMENT,
772
		GL_STENCIL_ATTACHMENT = STENCIL_ATTACHMENT,
773
		GL_DEPTH_STENCIL_ATTACHMENT = DEPTH_STENCIL_ATTACHMENT,
774

    
775
		//NONE = 0x0,
776
		GL_NONE = NONE,
777

    
778
		//FRAMEBUFFER_COMPLETE = 0x8CD5,
779
		//FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6,
780
		//FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7,
781
		//FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9,
782
		//FRAMEBUFFER_UNSUPPORTED = 0x8CDD,
783
		GL_FRAMEBUFFER_COMPLETE = FRAMEBUFFER_COMPLETE,
784
		GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = FRAMEBUFFER_INCOMPLETE_ATTACHMENT,
785
		GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT,
786
		GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = FRAMEBUFFER_INCOMPLETE_DIMENSIONS,
787
		GL_FRAMEBUFFER_UNSUPPORTED = FRAMEBUFFER_UNSUPPORTED,
788

    
789
		//FRAMEBUFFER_BINDING = 0x8CA6,
790
		//RENDERBUFFER_BINDING = 0x8CA7,
791
		//MAX_RENDERBUFFER_SIZE = 0x84E8,
792
		GL_FRAMEBUFFER_BINDING = FRAMEBUFFER_BINDING,
793
		GL_RENDERBUFFER_BINDING = RENDERBUFFER_BINDING,
794
		GL_MAX_RENDERBUFFER_SIZE = MAX_RENDERBUFFER_SIZE,
795

    
796
		//INVALID_FRAMEBUFFER_OPERATION = 0x0506,
797
		GL_INVALID_FRAMEBUFFER_OPERATION = INVALID_FRAMEBUFFER_OPERATION,
798

    
799
		/* WebGL-specific enums */
800
		//UNPACK_FLIP_Y_WEBGL = 0x9240,
801
		//UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241,
802
		//CONTEXT_LOST_WEBGL = 0x9242,
803
		//UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243,
804
		//BROWSER_DEFAULT_WEBGL = 0x9244,
805
		GL_UNPACK_FLIP_Y_WEBGL = UNPACK_FLIP_Y_WEBGL,
806
		GL_UNPACK_PREMULTIPLY_ALPHA_WEBGL = UNPACK_PREMULTIPLY_ALPHA_WEBGL,
807
		GL_CONTEXT_LOST_WEBGL = CONTEXT_LOST_WEBGL,
808
		GL_UNPACK_COLORSPACE_CONVERSION_WEBGL = UNPACK_COLORSPACE_CONVERSION_WEBGL,
809
		GL_BROWSER_DEFAULT_WEBGL = BROWSER_DEFAULT_WEBGL,
810

    
811
	};
812

    
813

    
814
	// Operator overloading
815

    
816
	// Set function(s)
817

    
818
	// Get function(s)
819

    
820
	// Other function(s)
821

    
822
	/*! @name WebGL methods
823
	* The WebGL methods are mostly 1-on-1 translated to the identical
824
	* JavaScript call. You can use the WebGL methods in your resizeGL(),
825
	* paintGL() and updateGL() specializations. Wt takes care that data,
826
	* arguments, ... are transfered to the client side and that the equivalent
827
	* JavaScript WebGL funtion is executed.
828
	* @{
829
	*/
830

    
831

    
832
	/*! \brief GL function to activate an existing texture
833
	*
834
	* <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/xhtml/glActiveTexture.xml">
835
	* glActiveTexture() OpenGL ES manpage</a>
836
	*/
837
	//void activeTexture(GLenum texture);
838
	inline void glActiveTexture(GLenum texture)
839
	{
840
		activeTexture(static_cast<WGLWidget::GLenum>(texture));
841
	}
842

    
843
	/*! \brief GL function to attach a shader to a program
844
	*
845
	* <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/xhtml/glAttachShader.xml">
846
	* glAttachShader() OpenGL ES manpage</a>
847
	*/
848
	//void attachShader(Program program, Shader shader);
849
	inline void glAttachShader(GLuint program, GLuint shader)
850
	{
851
		attachShader(static_cast<Program>(program), static_cast<Shader>(shader));
852
	}
853

    
854
	/*! \brief GL function to bind an attribute to a given location
855
	*
856
	* <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/xhtml/glBindAttribLocation.xml">
857
	* glBindAttribLocation() OpenGL ES manpage</a>
858
	*/
859
	//void bindAttribLocation(Program program, unsigned index,
860
	//	const std::string &name);
861
	inline void glBindAttribLocation(GLuint program, GLuint index, const GLchar *name)
862
	{
863
		bindAttribLocation(static_cast<Program>(program), index, name);
864
	}
865

    
866
	/*! \brief GL function to bind a buffer to a target
867
	*
868
	* <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/xhtml/glBindBuffer.xml">
869
	* glBindBuffer() OpenGL ES manpage</a>
870
	*/
871
	//void bindBuffer(GLenum target, Buffer buffer);
872
	inline void glBindBuffer(GLenum target, GLuint buffer)
873
	{
874
		bindBuffer(static_cast<WGLWidget::GLenum>(target), static_cast<Buffer>(buffer));
875
	}
876

    
877

    
878
	/*! \brief GL function to bind a frame buffer to a target
879
	*
880
	* <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/xhtml/glBindFramebuffer.xml">
881
	* glBindFramebuffer() OpenGL ES manpage</a>
882
	*/
883
	//void bindFramebuffer(GLenum target, Framebuffer framebuffer);
884
	inline void glBindFramebuffer(GLenum target, GLuint framebuffer)
885
	{
886
		bindFramebuffer(static_cast<WGLWidget::GLenum>(target), static_cast<Framebuffer>(framebuffer));
887
	}
888

    
889

    
890
	/*! \brief GL function to bind a render buffer to a target
891
	*
892
	* <a href="http://www.khronos.org/opengles/sdk/2.0/docs/man/xhtml/glBindRenderbuffer.xml">
893
	* glBindRenderbuffer() OpenGL ES manpage</a>
894
	*/
895
	//void bindRenderbuffer(GLenum target, Renderbuffer renderbuffer);
896
	inline void glBindRenderbuffer(GLenum target, GLuint renderbuffer)
897
	{
898
		bindRenderbuffer(static_cast<WGLWidget::GLenum>(target), static_cast<Renderbuffer>(renderbuffer));
899
	}
900

    
901
	/*
902

    
903
	TODO: Map remaining WebGL functions
904

    
905
	*/
906
};
907

    
908
#undef WT_WGL_TEMPLATE
909
} // namespace Wt
910

    
911
#endif
912

    
    (1-1/1)