Use different compute #version with OpenGL ES

GLES doesn't like #version 430 for compute, it wants #version 310 es.
We can conditionally compile that.
This commit is contained in:
Cassie Jones 2020-01-31 06:24:08 -05:00
parent be4db58fa3
commit 9845fee2b6
1 changed files with 6 additions and 0 deletions

View File

@ -125,9 +125,15 @@ const char* lovrShaderFragmentSuffix = ""
"#endif \n"
"}";
#ifdef LOVR_GLES
const char* lovrShaderComputePrefix = ""
"#version 310 es \n"
"#line 0 \n";
#else
const char* lovrShaderComputePrefix = ""
"#version 430 \n"
"#line 0 \n";
#endif
const char* lovrShaderComputeSuffix = ""
"void main() { \n"