* * @param {String|IKernelJSON} source * @param {IDirectKernelSettings} settings
(source, settings)
| 136 | * @param {IDirectKernelSettings} settings |
| 137 | */ |
| 138 | constructor(source, settings) { |
| 139 | super(source, settings); |
| 140 | this.program = null; |
| 141 | this.pipeline = settings.pipeline; |
| 142 | this.endianness = utils.systemEndianness(); |
| 143 | this.extensions = {}; |
| 144 | this.argumentTextureCount = 0; |
| 145 | this.constantTextureCount = 0; |
| 146 | this.fragShader = null; |
| 147 | this.vertShader = null; |
| 148 | this.drawBuffersMap = null; |
| 149 | |
| 150 | /** |
| 151 | * |
| 152 | * @type {Int32Array|null} |
| 153 | */ |
| 154 | this.maxTexSize = null; |
| 155 | this.onRequestSwitchKernel = null; |
| 156 | |
| 157 | this.texture = null; |
| 158 | this.mappedTextures = null; |
| 159 | this.mergeSettings(source.settings || settings); |
| 160 | |
| 161 | /** |
| 162 | * The thread dimensions, x, y and z |
| 163 | * @type {Array|null} |
| 164 | */ |
| 165 | this.threadDim = null; |
| 166 | this.framebuffer = null; |
| 167 | this.buffer = null; |
| 168 | |
| 169 | this.textureCache = []; |
| 170 | this.programUniformLocationCache = {}; |
| 171 | this.uniform1fCache = {}; |
| 172 | this.uniform1iCache = {}; |
| 173 | this.uniform2fCache = {}; |
| 174 | this.uniform2fvCache = {}; |
| 175 | this.uniform2ivCache = {}; |
| 176 | this.uniform3fvCache = {}; |
| 177 | this.uniform3ivCache = {}; |
| 178 | this.uniform4fvCache = {}; |
| 179 | this.uniform4ivCache = {}; |
| 180 | } |
| 181 | |
| 182 | initCanvas() { |
| 183 | if (typeof document !== 'undefined') { |
nothing calls this directly
no test coverage detected