Add targets for WebGL
This commit is contained in:
parent
1057bf42da
commit
29fd8b2d53
1 changed files with 52 additions and 32 deletions
|
@ -33,5 +33,25 @@
|
|||
'RGBA16F': {format: 'RGBA', type: ['HALF_FLOAT', 'FLOAT']},
|
||||
'RGBA32F': {format: 'RGBA', type: ['FLOAT']},
|
||||
'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 a new issue