expo / expo-2d-context

A pure-js implementation of the W3C's Canvas-2D Context API that can be run on either Expo Graphics or WebGL
111 stars 7 forks source link

'GL_ARB_explicit_attrib_location' is not supported #11

Open bisk8s opened 4 years ago

bisk8s commented 4 years ago

Everything is fine with iOS, but when I open the same page on Android, I've got the following error:

Running application on Google Pixel.
ERROR: 0:2: '' :  extension 'GL_ARB_explicit_attrib_location' is not supported
ERROR: 0:1: '' :  version '150' is not supported
ERROR: 0:2: '' :  extension 'GL_ARB_explicit_attrib_location' is not supported

There is any workarround or option for this?

here goes the code:

import React from 'react'
import { StyleSheet, KeyboardAvoidingView, Image } from 'react-native'
import { GLView } from 'expo-gl'

import Expo2DContext from 'expo-2d-context'

export default function Performance () {

  function handleOnGLContextCreate (gl) {
    const context = new Expo2DContext(gl)
  }

  return (
    <KeyboardAvoidingView style={styles.container} behavior="padding" enabled={true}>
      <GLView style={styles.graph}
        onContextCreate={handleOnGLContextCreate}
      />
    </KeyboardAvoidingView>
  )
}

const styles = StyleSheet.create({
  container: {
    flex: 1
  },
  graph: {
    flex: 1,
    margin: 50
  }
})