MCPcopy Index your code
hub / github.com/processing/processing / containsVersionDirective

Method containsVersionDirective

core/src/processing/opengl/PGL.java:2011–2023  ·  view source on GitHub ↗
(String[] shSrc)

Source from the content-addressed store, hash-verified

2009 }
2010
2011 protected static boolean containsVersionDirective(String[] shSrc) {
2012 for (int i = 0; i < shSrc.length; i++) {
2013 String line = shSrc[i];
2014 int versionIndex = line.indexOf("#version");
2015 if (versionIndex >= 0) {
2016 int commentIndex = line.indexOf("//");
2017 if (commentIndex < 0 || versionIndex < commentIndex) {
2018 return true;
2019 }
2020 }
2021 }
2022 return false;
2023 }
2024
2025 protected int createShader(int shaderType, String source) {
2026 int shader = createShader(shaderType);

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected