question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error compiling shader

See original GitHub issue

Android

Error: gl-shader: Error compiling shader: 0:8: S0012: Global variable initializer must be a constant expression

Code is:

import { Surface } from "gl-react-native";
import GLImage from "gl-react-image"

<Surface style={{width: 100, height: 200}}>
  <GLImage
    source={{uri: "https://i.imgur.com/2VP5osy.jpg"}}
    resizeMode="cover"
  />
</Surface>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
grecommented, Oct 13, 2017

I think the bug is because the device must have a different version of OpenGL or something like that –_–

0reactions
st0fferncommented, Oct 13, 2017

@gre my newbie mistake i changed the src/ and not the lib/ in node_modules

Moving the float r into main works. I think that declaration outside and done inside main() is best 😃 i will make a PR on it for gl-react-image

Tested and works on OpenGL 2 & 3.2 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Compiling Shader when running executable
I have used absolute paths for my shader paths. Shader compile code: Shader(const std::string& vertexShaderPath, const std::string& ...
Read more >
There were errors compiling the following shaders... - ReShade
When I try to check a shader, it just tells me 'There were errors compiling the following shaders'. It never happened before. Nothing...
Read more >
error compiling shader cannot use enscape through sketch up
Hi I am an architecture student looking to run Enscape through sketch up for a university project. I am using a Windows desktop...
Read more >
error compiling shader - OpenGL: Basic Coding
Hi I am a beginner to opengl try to learn the language and i am having the following error i believe it is...
Read more >
Error compiling shader file launch crash :: Mount & Blade II
I'm playing version 1.4.3 beta and immediately after launch the game crashes with the following error: Error compiling shader file: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found