MCPcopy Index your code
hub / github.com/gpujs/gpu.js / getTextureFormat

Method getTextureFormat

src/backend/web-gl2/kernel.js:235–249  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

233 }
234
235 getTextureFormat() {
236 const { context: gl } = this;
237 switch (this.getInternalFormat()) {
238 case gl.R32F:
239 return gl.RED;
240 case gl.RG32F:
241 return gl.RG;
242 case gl.RGBA32F:
243 return gl.RGBA;
244 case gl.RGBA:
245 return gl.RGBA;
246 default:
247 throw new Error('Unknown internal format');
248 }
249 }
250 getInternalFormat() {
251 const { context: gl } = this;
252

Callers 2

_setupOutputTextureMethod · 0.95

Calls 1

getInternalFormatMethod · 0.95

Tested by

no test coverage detected