Add targets for WebGL
This commit is contained in:
parent
1057bf42da
commit
29fd8b2d53
|
@ -33,5 +33,25 @@
|
||||||
'RGBA16F': {format: 'RGBA', type: ['HALF_FLOAT', 'FLOAT']},
|
'RGBA16F': {format: 'RGBA', type: ['HALF_FLOAT', 'FLOAT']},
|
||||||
'RGBA32F': {format: 'RGBA', type: ['FLOAT']},
|
'RGBA32F': {format: 'RGBA', type: ['FLOAT']},
|
||||||
'RGBA8UI': {format: 'RGBA_INTEGER', type: ['UNSIGNED_BYTE']}
|
'RGBA8UI': {format: 'RGBA_INTEGER', type: ['UNSIGNED_BYTE']}
|
||||||
|
},
|
||||||
|
buffetTarget: () => {
|
||||||
|
return random.item(['ARRAY_BUFFER', 'ELEMENT_ARRAY_BUFFER'])
|
||||||
|
},
|
||||||
|
textureTarget: (isWebGL2) => {
|
||||||
|
let target = ['TEXTURE_2D', 'TEXTURE_CUBE_MAP']
|
||||||
|
if (isWebGL2) {
|
||||||
|
target.extend(['TEXTURE_3D', 'TEXTURE_2D_ARRAY'])
|
||||||
|
}
|
||||||
|
return random.item(target)
|
||||||
|
},
|
||||||
|
framebufferTarget: (isWebGL2) => {
|
||||||
|
let target = ['FRAMEBUFFER']
|
||||||
|
if (isWebGL2) {
|
||||||
|
target.extends(['DRAW_FRAMEBUFFER', 'READ_FRAMEBUFFER'])
|
||||||
|
}
|
||||||
|
return random.item(target)
|
||||||
|
},
|
||||||
|
renderbufferTarget: () => {
|
||||||
|
return 'RENDERBUFFER'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue