| /expo/apps/test-suite/tests/ |
| H A D | GLView.js | 92 gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); 115 gl.bufferData(gl.ARRAY_BUFFER, verts, gl.STATIC_DRAW); 123 gl.activeTexture(gl.TEXTURE0); 125 gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST); 126 gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST); 127 gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, asset); 131 gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); 156 gl.bufferData(gl.ARRAY_BUFFER, verts, gl.STATIC_DRAW); 164 gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST); 165 gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST); [all …]
|
| /expo/apps/native-component-list/src/screens/GL/ |
| H A D | BasicTextureScreen.tsx | 6 const vert = gl.createShader(gl.VERTEX_SHADER)!; 39 gl.bindBuffer(gl.ARRAY_BUFFER, buffer); 41 gl.bufferData(gl.ARRAY_BUFFER, verts, gl.STATIC_DRAW); 49 gl.activeTexture(gl.TEXTURE0); 50 gl.bindTexture(gl.TEXTURE_2D, texture); 51 gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST); 52 gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST); 53 gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, asset as any); 61 gl.texSubImage2D(gl.TEXTURE_2D, 0, 32, 32, gl.RGBA, gl.UNSIGNED_BYTE, imageAsset as any); 64 // gl.TEXTURE_2D, 0, 32, 32, 2, 2, gl.RGBA, gl.UNSIGNED_BYTE, [all …]
|
| H A D | WebGL2TransformFeedbackScreen.tsx | 74 const vert = gl.createShader(gl.VERTEX_SHADER)!; 131 gl.bufferData(gl.ARRAY_BUFFER, particlePositions, gl.STREAM_COPY); 137 gl.bufferData(gl.ARRAY_BUFFER, particleVelocities, gl.STREAM_COPY); 143 gl.bufferData(gl.ARRAY_BUFFER, particleSpawntime, gl.STREAM_COPY); 149 gl.bufferData(gl.ARRAY_BUFFER, particleLifetime, gl.STREAM_COPY); 155 gl.bufferData(gl.ARRAY_BUFFER, particleIDs, gl.STATIC_READ); 159 gl.bindBuffer(gl.ARRAY_BUFFER, null); 173 gl.enable(gl.BLEND); 174 gl.blendFunc(gl.SRC_ALPHA, gl.ONE); 183 gl.clear(gl.COLOR_BUFFER_BIT); [all …]
|
| H A D | GLReanimatedExample.tsx | 64 gl.bindBuffer(gl.ARRAY_BUFFER, buffer); 65 gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW); 71 gl.activeTexture(gl.TEXTURE0); 72 gl.bindTexture(gl.TEXTURE_2D, texture); 73 gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); 74 gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); 75 gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST); 76 gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST); 77 gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, asset as any); 83 gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); [all …]
|
| H A D | GLHeadlessRenderingScreen.tsx | 74 gl.bufferData(gl.ARRAY_BUFFER, verts, gl.STATIC_DRAW); 90 gl.activeTexture(gl.TEXTURE0); 106 gl.activeTexture(gl.TEXTURE1); 110 gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, outputTexture, 0); 113 gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); 114 gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); 115 gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST); 116 gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST); 119 gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, asset as any); 124 gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); [all …]
|
| H A D | GLViewOnBusyThread.tsx | 9 const vert = gl.createShader(gl.VERTEX_SHADER)!; 22 const frag = gl.createShader(gl.FRAGMENT_SHADER)!; 42 gl.bindBuffer(gl.ARRAY_BUFFER, buffer); 44 gl.bufferData(gl.ARRAY_BUFFER, verts, gl.STATIC_DRAW); 52 gl.activeTexture(gl.TEXTURE0); 53 gl.bindTexture(gl.TEXTURE_2D, texture); 54 gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST); 55 gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST); 56 gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, asset as any); 60 gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); [all …]
|
| H A D | GLMaskScreen.tsx | 2 import * as GL from 'expo-gl'; 62 const vert = gl.createShader(gl.VERTEX_SHADER)!; 64 gl.compileShader(vert); 65 const frag = gl.createShader(gl.FRAGMENT_SHADER)!; 91 gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); 94 gl.bindBuffer(gl.ARRAY_BUFFER, buffer); 97 gl.vertexAttribPointer(positionAttrib, 2, gl.FLOAT, false, 0, 0); 108 gl.bufferData(gl.ARRAY_BUFFER, verts, gl.STATIC_DRAW); 109 gl.drawArrays(gl.TRIANGLES, 0, verts.length / 2); 112 gl.flush(); [all …]
|
| H A D | GLCameraScreen.tsx | 2 import * as GL from 'expo-gl'; 71 const vertShader = gl.createShader(gl.VERTEX_SHADER)!; 75 const fragShader = gl.createShader(gl.FRAGMENT_SHADER)!; 93 gl.bindBuffer(gl.ARRAY_BUFFER, buffer); 95 gl.bufferData(gl.ARRAY_BUFFER, verts, gl.STATIC_DRAW); 98 gl.vertexAttribPointer(positionAttrib, 2, gl.FLOAT, false, 0, 0); 101 gl.uniform1i(gl.getUniformLocation(program, 'cameraTexture'), 0); 104 gl.activeTexture(gl.TEXTURE0); 113 gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); 116 gl.bindTexture(gl.TEXTURE_2D, cameraTexture); [all …]
|
| H A D | GLScreen.tsx | 10 route: '/components/gl/cleartoblue', 16 route: '/components/gl/basictexture', 22 route: '/components/gl/glviewscreen', 29 route: '/components/gl/mask', 36 route: '/components/gl/snapshots', 55 route: '/components/gl/threesprite', 73 route: '/components/gl/pixibasic', 79 route: '/components/gl/pixisprite', 85 route: '/components/gl/glcamera', 97 route: '/components/gl/canvas', [all …]
|
| H A D | ClearToBlueScreen.tsx | 3 export default GLWrap('Clear to blue', async (gl) => { 4 gl.clearColor(0, 0, 1, 1); 6 gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); 7 gl.endFrameEXP();
|
| H A D | GLThreeSpriteScreen.tsx | 1 import { ExpoWebGLRenderingContext, GLView } from 'expo-gl'; 9 const gl = React.useRef<null | ExpoWebGLRenderingContext>(null); 28 if (gl.current) { 29 gl.current.endFrameEXP(); 53 gl.current = context; 57 gl.current.drawingBufferWidth / gl.current.drawingBufferHeight, 62 renderer.current = new Renderer({ gl: gl.current }); 63 renderer.current.setSize(gl.current.drawingBufferWidth, gl.current.drawingBufferHeight); 77 gl.current.endFrameEXP();
|
| H A D | PIXIBasicScreen.tsx | 8 export default GLWrap('Basic pixi.js use', async (gl) => { 10 const width = gl.drawingBufferWidth / resolution; 11 const height = gl.drawingBufferHeight / resolution; 13 context: gl, 19 app.ticker.add(() => gl.endFrameEXP());
|
| /expo/packages/expo-gl/build/ |
| H A D | GLView.web.js | 18 function asExpoContext(gl) { argument 21 gl['_expo_texImage2D'] = gl.texImage2D; 29 gl['_expo_texSubImage2D'] = gl.texSubImage2D; 36 return gl; 53 const { canvas } = gl; 75 gl; field in GLView 103 if (this.gl) { 130 if (!gl) { 133 return gl; 151 if (this.gl) [all …]
|
| H A D | GLUtils.js | 10 export function configureLogging(gl) { argument 13 gl.__expoSetLogging = (option) => { 22 Object.entries(gl).forEach(([key, value]) => { 24 delete gl[key]; 35 gl[key] = (...args) => { function 42 for (const prop in gl) { 43 if (gl[prop] === arg) { 61 const result = originalValue.apply(gl, args); 68 const error = gl.__proto__.getError.call(gl); 69 if (error && error !== gl.NO_ERROR) { [all …]
|
| /expo/packages/expo-gl/src/ |
| H A D | GLUtils.ts | 12 export function configureLogging(gl: ExpoWebGLRenderingContext): void { 16 gl.__expoSetLogging = (option: GLLoggingOption): void => { 26 Object.entries(gl).forEach(([key, value]) => { 28 delete gl[key]; 41 gl[key] = (...args) => { 48 for (const prop in gl) { 49 if (gl[prop] === arg) { 70 const result = originalValue.apply(gl, args); 78 const error = gl.__proto__.getError.call(gl); 80 if (error && error !== gl.NO_ERROR) { [all …]
|
| H A D | GLView.web.tsx | 38 gl['_expo_texImage2D'] = gl.texImage2D; 47 gl['_expo_texSubImage2D'] = gl.texSubImage2D; 55 return gl; 97 const { canvas } = gl; 159 if (this.gl) { 198 if (!gl) { 204 return gl; 211 this.gl = undefined; 219 this.gl = undefined; 226 if (this.gl) return this.gl; [all …]
|
| /expo/packages/expo-processing/ |
| H A D | index.js | 22 _onGLContextCreate = gl => { 27 canvas.getContext = () => gl; 31 const origGetUniformLocation = gl.getUniformLocation; 32 gl.getUniformLocation = (program, name) => { 40 loc = origGetUniformLocation.call(gl, program, name); 45 const origGetAttribLocation = gl.getAttribLocation; 46 gl.getAttribLocation = (program, name) => { 54 loc = origGetAttribLocation.call(gl, program, name); 62 gl.endFrameEXP(); 73 p.size(gl.drawingBufferWidth, gl.drawingBufferHeight, p.WEBGL);
|
| /expo/docs/pages/versions/unversioned/sdk/ |
| H A D | gl-view.mdx | 5 packageName: 'expo-gl' 40 gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight); 44 const vert = gl.createShader(gl.VERTEX_SHADER); 45 gl.shaderSource( 57 const frag = gl.createShader(gl.FRAGMENT_SHADER); 58 gl.shaderSource( 75 gl.clear(gl.COLOR_BUFFER_BIT); 76 gl.drawArrays(gl.POINTS, 0, 1); 78 gl.flush(); 79 gl.endFrameEXP(); [all …]
|
| /expo/docs/pages/versions/v46.0.0/sdk/ |
| H A D | gl-view.mdx | 5 packageName: 'expo-gl' 40 gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight); 44 const vert = gl.createShader(gl.VERTEX_SHADER); 45 gl.shaderSource( 57 const frag = gl.createShader(gl.FRAGMENT_SHADER); 58 gl.shaderSource( 75 gl.clear(gl.COLOR_BUFFER_BIT); 76 gl.drawArrays(gl.POINTS, 0, 1); 78 gl.flush(); 79 gl.endFrameEXP(); [all …]
|
| /expo/docs/pages/versions/v49.0.0/sdk/ |
| H A D | gl-view.mdx | 5 packageName: 'expo-gl' 40 gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight); 44 const vert = gl.createShader(gl.VERTEX_SHADER); 45 gl.shaderSource( 57 const frag = gl.createShader(gl.FRAGMENT_SHADER); 58 gl.shaderSource( 75 gl.clear(gl.COLOR_BUFFER_BIT); 76 gl.drawArrays(gl.POINTS, 0, 1); 78 gl.flush(); 79 gl.endFrameEXP(); [all …]
|
| /expo/docs/pages/versions/v48.0.0/sdk/ |
| H A D | gl-view.mdx | 5 packageName: 'expo-gl' 40 gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight); 44 const vert = gl.createShader(gl.VERTEX_SHADER); 45 gl.shaderSource( 57 const frag = gl.createShader(gl.FRAGMENT_SHADER); 58 gl.shaderSource( 75 gl.clear(gl.COLOR_BUFFER_BIT); 76 gl.drawArrays(gl.POINTS, 0, 1); 78 gl.flush(); 79 gl.endFrameEXP(); [all …]
|
| /expo/docs/pages/versions/v47.0.0/sdk/ |
| H A D | gl-view.mdx | 5 packageName: 'expo-gl' 40 gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight); 44 const vert = gl.createShader(gl.VERTEX_SHADER); 45 gl.shaderSource( 57 const frag = gl.createShader(gl.FRAGMENT_SHADER); 58 gl.shaderSource( 75 gl.clear(gl.COLOR_BUFFER_BIT); 76 gl.drawArrays(gl.POINTS, 0, 1); 78 gl.flush(); 79 gl.endFrameEXP(); [all …]
|
| /expo/packages/expo-gl/ |
| H A D | README.md | 2 <a href="https://docs.expo.dev/versions/latest/sdk/gl-view/"> 4 src="../../.github/resources/expo-gl.svg" 5 alt="expo-gl" 14 …ain branch](https://github.com/expo/expo/blob/main/docs/pages/versions/unversioned/sdk/gl-view.mdx) 15 - [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/gl-view/) 19 …I documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/gl-view/). 28 npx expo install expo-gl 33 To use version `11.2.0` or newer of `expo-gl` you will need to use at least version `0.68.0` of Rea… 35 | expo-gl | react-native | 43 | expo-gl | react-native-reanimated |
|
| /expo/ios/versioned/sdk47/EXGL/common/ |
| H A D | ABI47_0_0EXWebGLRenderer.cpp | 36 void installConstants(jsi::Runtime &runtime, jsi::Object &gl); 37 void installWebGLMethods(jsi::Runtime &runtime, jsi::Object &gl); 38 void installWebGL2Methods(jsi::Runtime &runtime, jsi::Object &gl); 42 jsi::Object gl = ctx->supportsWebGL2 in createWebGLRenderer() local 50 gl.setProperty(runtime, "drawingBufferWidth", viewport.viewportWidth); in createWebGLRenderer() 52 gl.setProperty(runtime, "supportsWebGL2", ctx->supportsWebGL2); in createWebGLRenderer() 58 installConstants(runtime, gl); in createWebGLRenderer() 59 ctx->supportsWebGL2 ? installWebGL2Methods(runtime, gl) : installWebGLMethods(runtime, gl); in createWebGLRenderer() 247 void installConstants(jsi::Runtime &runtime, jsi::Object &gl) { in installConstants() argument 253 void installWebGLMethods(jsi::Runtime &runtime, jsi::Object &gl) { in installWebGLMethods() argument [all …]
|
| /expo/ios/versioned/sdk48/ExpoGL/common/ |
| H A D | ABI48_0_0EXWebGLRenderer.cpp | 36 void installConstants(jsi::Runtime &runtime, jsi::Object &gl); 37 void installWebGLMethods(jsi::Runtime &runtime, jsi::Object &gl); 38 void installWebGL2Methods(jsi::Runtime &runtime, jsi::Object &gl); 42 jsi::Object gl = ctx->supportsWebGL2 in createWebGLRenderer() local 50 gl.setProperty(runtime, "drawingBufferWidth", viewport.viewportWidth); in createWebGLRenderer() 52 gl.setProperty(runtime, "supportsWebGL2", ctx->supportsWebGL2); in createWebGLRenderer() 58 installConstants(runtime, gl); in createWebGLRenderer() 59 ctx->supportsWebGL2 ? installWebGL2Methods(runtime, gl) : installWebGLMethods(runtime, gl); in createWebGLRenderer() 247 void installConstants(jsi::Runtime &runtime, jsi::Object &gl) { in installConstants() argument 253 void installWebGLMethods(jsi::Runtime &runtime, jsi::Object &gl) { in installWebGLMethods() argument [all …]
|