|
2 | 2 | * @author thespite / http://www.twitter.com/thespite |
3 | 3 | */ |
4 | 4 |
|
5 | | -import { MaxEquation, MinEquation, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_10x10_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGB_ETC1_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT5_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT1_Format, RGB_S3TC_DXT1_Format, SrcAlphaSaturateFactor, OneMinusDstColorFactor, DstColorFactor, OneMinusDstAlphaFactor, DstAlphaFactor, OneMinusSrcAlphaFactor, SrcAlphaFactor, OneMinusSrcColorFactor, SrcColorFactor, OneFactor, ZeroFactor, ReverseSubtractEquation, SubtractEquation, AddEquation, DepthFormat, DepthStencilFormat, LuminanceAlphaFormat, LuminanceFormat, RedFormat, RGBAFormat, RGBFormat, AlphaFormat, HalfFloatType, FloatType, UnsignedIntType, IntType, UnsignedShortType, ShortType, ByteType, UnsignedInt248Type, UnsignedShort565Type, UnsignedShort5551Type, UnsignedShort4444Type, UnsignedByteType, LinearMipMapLinearFilter, LinearMipMapNearestFilter, LinearFilter, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NearestFilter, MirroredRepeatWrapping, ClampToEdgeWrapping, RepeatWrapping } from '../../constants.js'; |
| 5 | +import { MaxEquation, MinEquation, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_10x10_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGB_ETC1_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT5_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT1_Format, RGB_S3TC_DXT1_Format, SrcAlphaSaturateFactor, OneMinusDstColorFactor, DstColorFactor, OneMinusDstAlphaFactor, DstAlphaFactor, OneMinusSrcAlphaFactor, SrcAlphaFactor, OneMinusSrcColorFactor, SrcColorFactor, OneFactor, ZeroFactor, ReverseSubtractEquation, SubtractEquation, AddEquation, DepthFormat, DepthStencilFormat, LuminanceAlphaFormat, LuminanceFormat, RedFormat, RGBAFormat, RGBFormat, AlphaFormat, HalfFloatType, FloatType, UnsignedIntType, IntType, UnsignedShortType, ShortType, ByteType, UnsignedInt248Type, UnsignedShort565Type, UnsignedShort5551Type, UnsignedShort4444Type, UnsignedByteType, LinearMipMapLinearFilter, LinearMipMapNearestFilter, LinearFilter, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NearestFilter, MirroredRepeatWrapping, ClampToEdgeWrapping, RepeatWrapping, RedIntegerFormat, R8Format, R8UIFormat, R16FFormat, R32FFormat, RGFormat, RGIntegerFormat, RGBIntegerFormat, RGBAIntegerFormat, RG8Format, RG8UIFormat, RG16FFormat, RG32FFormat, RGB8Format, RGB8UIFormat, RGB16FFormat, RGB32FFormat, RGBA8Format, RGBA8UIFormat, RGBA16FFormat, RGBA32FFormat } from '../../constants.js'; |
6 | 6 |
|
7 | 7 | function WebGLUtils( gl, extensions, capabilities ) { |
8 | 8 |
|
@@ -52,6 +52,36 @@ function WebGLUtils( gl, extensions, capabilities ) { |
52 | 52 | if ( p === DepthFormat ) return gl.DEPTH_COMPONENT; |
53 | 53 | if ( p === DepthStencilFormat ) return gl.DEPTH_STENCIL; |
54 | 54 | if ( p === RedFormat ) return gl.RED; |
| 55 | + if ( p === RedIntegerFormat ) return gl.RED_INTEGER; |
| 56 | + |
| 57 | + if ( p === R8Format ) return gl.R8; |
| 58 | + if ( p === R8UIFormat ) return gl.R8UI; |
| 59 | + if ( p === R16FFormat ) return gl.R16F; |
| 60 | + if ( p === R32FFormat ) return gl.R32F; |
| 61 | + |
| 62 | + if ( p === RGFormat ) return gl.RG; |
| 63 | + if ( p === RGIntegerFormat ) return gl.RG_INTEGER; |
| 64 | + |
| 65 | + if ( p === RG8Format ) return gl.RG8; |
| 66 | + if ( p === RG8UIFormat ) return gl.RG8UI; |
| 67 | + if ( p === RG16FFormat ) return gl.RG16F; |
| 68 | + if ( p === RG32FFormat ) return gl.RG32F; |
| 69 | + |
| 70 | + if ( p === RGBFormat ) return gl.RGB; |
| 71 | + if ( p === RGBIntegerFormat ) return gl.RGB_INTEGER; |
| 72 | + |
| 73 | + if ( p === RGB8Format ) return gl.RGB8; |
| 74 | + if ( p === RGB8UIFormat ) return gl.RGB8UI; |
| 75 | + if ( p === RGB16FFormat ) return gl.RGB16F; |
| 76 | + if ( p === RGB32FFormat ) return gl.RGB32F; |
| 77 | + |
| 78 | + if ( p === RGBAFormat ) return gl.RGBA; |
| 79 | + if ( p === RGBAIntegerFormat ) return gl.RGBA_INTEGER; |
| 80 | + |
| 81 | + if ( p === RGBA8Format ) return gl.RGBA8; |
| 82 | + if ( p === RGBA8UIFormat ) return gl.RGBA8UI; |
| 83 | + if ( p === RGBA16FFormat ) return gl.RGBA16F; |
| 84 | + if ( p === RGBA32FFormat ) return gl.RGBA32F; |
55 | 85 |
|
56 | 86 | if ( p === AddEquation ) return gl.FUNC_ADD; |
57 | 87 | if ( p === SubtractEquation ) return gl.FUNC_SUBTRACT; |
|
0 commit comments