Skip to content

Commit 2e08fae

Browse files
committed
OpenGL ES: Fix GLSL version number for 1.00 (#5582)
Wikipedia had it wrong: the spec for the OpenGL ES Shading Language Version 1.00 defines the version preprocessor directive as "#version 100", and _not_ "#version 100 es", like version 3.00+ of the language wants it. This made the Raspberry Pi with the legacy driver unhappy. Thanks @DangusTaargus for reporting. see https://www.khronos.org/files/opengles_shading_language.pdf
1 parent 33c3eb7 commit 2e08fae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/processing/opengl/PJOGL.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,8 @@ protected int getGLSLVersion() {
513513

514514
@Override
515515
protected String getGLSLVersionSuffix() {
516-
if (context.isGLESProfile()) {
516+
VersionNumber vn = context.getGLSLVersionNumber();
517+
if (context.isGLESProfile() && 1 < vn.getMajor()) {
517518
return " es";
518519
} else {
519520
return "";

0 commit comments

Comments
 (0)