File tree 3 files changed +22
-1
lines changed
3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -220,6 +220,7 @@ Only the following for now:
220
220
* [ ` WEBGL_draw_buffers ` ] ( https://www.khronos.org/registry/webgl/extensions/WEBGL_draw_buffers/ )
221
221
* [ ` EXT_blend_minmax ` ] ( https://www.khronos.org/registry/webgl/extensions/EXT_blend_minmax/ )
222
222
* [ ` EXT_texture_filter_anisotropic ` ] ( https://www.khronos.org/registry/webgl/extensions/EXT_texture_filter_anisotropic/ )
223
+ * [ ` EXT_shader_texture_lod ` ] ( https://www.khronos.org/registry/webgl/extensions/EXT_shader_texture_lod/ )
223
224
224
225
### How can I keep up to date with what has changed in headless-gl?
225
226
Original file line number Diff line number Diff line change
1
+ class EXTShaderTextureLod { }
2
+
3
+ function getEXTShaderTextureLod ( context ) {
4
+ let result = null
5
+ const exts = context . getSupportedExtensions ( )
6
+
7
+ if ( exts && exts . indexOf ( 'EXT_shader_texture_lod' ) >= 0 ) {
8
+ result = new EXTShaderTextureLod ( )
9
+ }
10
+
11
+ return result
12
+ }
13
+
14
+ module . exports = { getEXTShaderTextureLod, EXTShaderTextureLod }
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ const { WebGLShader } = require('./webgl-shader')
40
40
const { WebGLShaderPrecisionFormat } = require ( './webgl-shader-precision-format' )
41
41
const { WebGLTexture } = require ( './webgl-texture' )
42
42
const { WebGLUniformLocation } = require ( './webgl-uniform-location' )
43
+ const { getEXTShaderTextureLod } = require ( './extensions/ext-shader-texture-lod' )
43
44
44
45
// These are defined by the WebGL spec
45
46
const MAX_UNIFORM_LENGTH = 256
@@ -65,7 +66,8 @@ const availableExtensions = {
65
66
stackgl_resize_drawingbuffer : getSTACKGLResizeDrawingBuffer ,
66
67
webgl_draw_buffers : getWebGLDrawBuffers ,
67
68
ext_blend_minmax : getEXTBlendMinMax ,
68
- ext_texture_filter_anisotropic : getEXTTextureFilterAnisotropic
69
+ ext_texture_filter_anisotropic : getEXTTextureFilterAnisotropic ,
70
+ ext_shader_texture_lod : getEXTShaderTextureLod ,
69
71
}
70
72
71
73
const privateMethods = [
@@ -1227,6 +1229,10 @@ class WebGLRenderingContext extends NativeWebGLRenderingContext {
1227
1229
exts . push ( 'OES_vertex_array_object' )
1228
1230
}
1229
1231
1232
+ if ( supportedExts . indexOf ( 'GL_EXT_shader_texture_lod' ) >= 0 ) {
1233
+ exts . push ( 'EXT_shader_texture_lod' )
1234
+ }
1235
+
1230
1236
return exts
1231
1237
}
1232
1238
You can’t perform that action at this time.
0 commit comments