/
PixelDatatype.js
95 lines (85 loc) · 2.62 KB
/
PixelDatatype.js
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
/*global define*/
define(['../Core/Enumeration'], function(Enumeration) {
"use strict";
/**
* DOC_TBA
*
* @exports PixelDatatype
*/
var PixelDatatype = {
/**
* DOC_TBA
*
* @constant
* @type {Enumeration}
*/
UNSIGNED_BYTE : new Enumeration(0x1401, 'UNSIGNED_BYTE'),
/**
* An unsigned short pixel datatype used for depth textures with 16-bit depth values.
*
* @constant
* @type {Enumeration}
*/
UNSIGNED_SHORT : new Enumeration(0x1403, 'UNSIGNED_SHORT'),
/**
* An unsigned int pixel datatype used for depth textures with 32-bit depth values.
*
* @constant
* @type {Enumeration}
*/
UNSIGNED_INT : new Enumeration(0x1405, 'UNSIGNED_INT'),
/**
* DOC_TBA
*
* @constant
* @type {Enumeration}
*/
FLOAT : new Enumeration(0x1406, 'FLOAT'),
/**
* An unsigned int pixel datatype used for depth-stencil textures with 24-bit depth and 8-bit stencil values.
*
* @constant
* @type {Enumeration}
*/
UNSIGNED_INT_24_8_WEBGL : new Enumeration(0x84FA, 'UNSIGNED_INT_24_8_WEBGL'),
/**
* DOC_TBA
*
* @constant
* @type {Enumeration}
*/
UNSIGNED_SHORT_4_4_4_4 : new Enumeration(0x8033, 'UNSIGNED_SHORT_4_4_4_4'),
/**
* DOC_TBA
*
* @constant
* @type {Enumeration}
*/
UNSIGNED_SHORT_5_5_5_1 : new Enumeration(0x8034, 'UNSIGNED_SHORT_5_5_5_1'),
/**
* DOC_TBA
*
* @constant
* @type {Enumeration}
*/
UNSIGNED_SHORT_5_6_5 : new Enumeration(0x8363, 'UNSIGNED_SHORT_5_6_5'),
/**
* DOC_TBA
*
* @param pixelDatatype
*
* @returns {Boolean}
*/
validate : function(pixelDatatype) {
return ((pixelDatatype === PixelDatatype.UNSIGNED_BYTE) ||
(pixelDatatype === PixelDatatype.UNSIGNED_SHORT) ||
(pixelDatatype === PixelDatatype.UNSIGNED_INT) ||
(pixelDatatype === PixelDatatype.FLOAT) ||
(pixelDatatype === PixelDatatype.UNSIGNED_INT_24_8_WEBGL) ||
(pixelDatatype === PixelDatatype.UNSIGNED_SHORT_4_4_4_4) ||
(pixelDatatype === PixelDatatype.UNSIGNED_SHORT_5_5_5_1) ||
(pixelDatatype === PixelDatatype.UNSIGNED_SHORT_5_6_5));
}
};
return PixelDatatype;
});