MCPcopy Index your code
hub / github.com/tensorflow/tfjs / renderToGLView

Function renderToGLView

tfjs-react-native/src/camera/camera.ts:240–253  ·  view source on GitHub ↗
(
    gl: WebGL2RenderingContext, texture: WebGLTexture, size: Size,
    flipHorizontal = true, rotation: Rotation = 0)

Source from the content-addressed store, hash-verified

238 * @doc {heading: 'Media', subheading: 'Camera'}
239 */
240export function renderToGLView(
241 gl: WebGL2RenderingContext, texture: WebGLTexture, size: Size,
242 flipHorizontal = true, rotation: Rotation = 0) {
243 tf.util.assert(
244 [0, 90, 180, 270, 360, -90, -180, -270].includes(rotation),
245 () => 'renderToGLView Error: rotation must be ' +
246 '0, +/- 90, +/- 180, +/- 270 or 360');
247
248 size = {
249 width: Math.floor(size.width),
250 height: Math.floor(size.height),
251 };
252 drawTexture(gl, texture, size, flipHorizontal, rotation);
253}

Callers 1

renderFuncMethod · 0.90

Calls 2

drawTextureFunction · 0.90
floorMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…