mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Merge pull request #3605 from JakubValtar/remove-fixed-func
Get max core profile on OSX
This commit is contained in:
@@ -1689,6 +1689,8 @@ public abstract class PGL {
|
||||
fragSrc[0] = "#version " + version;
|
||||
fragSrc[1] = "out vec4 fragColor;";
|
||||
|
||||
PApplet.printArray(fragSrc);
|
||||
|
||||
return fragSrc;
|
||||
}
|
||||
return fragSrc0;
|
||||
@@ -1714,6 +1716,8 @@ public abstract class PGL {
|
||||
String[] vertSrc = preprocessShaderSource(vertSrc0, search, replace, 1);
|
||||
vertSrc[0] = "#version " + version;
|
||||
|
||||
PApplet.printArray(vertSrc);
|
||||
|
||||
return vertSrc;
|
||||
}
|
||||
return vertSrc0;
|
||||
|
||||
@@ -1240,7 +1240,7 @@ public class PJOGL extends PGL {
|
||||
|
||||
@Override
|
||||
protected String[] loadVertexShader(String filename, int version) {
|
||||
if (PApplet.platform == PConstants.MACOSX) {
|
||||
if (PApplet.platform == PConstants.WINDOWS) {
|
||||
String[] fragSrc0 = pg.parent.loadStrings(filename);
|
||||
return preprocessFragmentSource(fragSrc0, 130);
|
||||
} else {
|
||||
@@ -1251,7 +1251,7 @@ public class PJOGL extends PGL {
|
||||
|
||||
@Override
|
||||
protected String[] loadFragmentShader(String filename, int version) {
|
||||
if (PApplet.platform == PConstants.MACOSX) {
|
||||
if (PApplet.platform == PConstants.WINDOWS) {
|
||||
String[] vertSrc0 = pg.parent.loadStrings(filename);
|
||||
return preprocessVertexSource(vertSrc0, 130);
|
||||
} else {
|
||||
@@ -1263,7 +1263,7 @@ public class PJOGL extends PGL {
|
||||
@Override
|
||||
protected String[] loadFragmentShader(URL url, int version) {
|
||||
try {
|
||||
if (PApplet.platform == PConstants.MACOSX) {
|
||||
if (PApplet.platform == PConstants.WINDOWS) {
|
||||
String[] fragSrc0 = PApplet.loadStrings(url.openStream());
|
||||
return preprocessFragmentSource(fragSrc0, 130);
|
||||
} else {
|
||||
@@ -1279,7 +1279,7 @@ public class PJOGL extends PGL {
|
||||
@Override
|
||||
protected String[] loadVertexShader(URL url, int version) {
|
||||
try {
|
||||
if (PApplet.platform == PConstants.MACOSX) {
|
||||
if (PApplet.platform == PConstants.WINDOWS) {
|
||||
String[] vertSrc0 = PApplet.loadStrings(url.openStream());
|
||||
return preprocessVertexSource(vertSrc0, 130);
|
||||
} else {
|
||||
|
||||
@@ -195,7 +195,11 @@ public class PSurfaceJOGL implements PSurface {
|
||||
if (profile == null) {
|
||||
if (PJOGL.profile == 2) {
|
||||
try {
|
||||
profile = GLProfile.getGL2ES2();
|
||||
if (PApplet.platform == PConstants.MACOSX) {
|
||||
profile = GLProfile.getMaxProgrammableCore(true);
|
||||
} else {
|
||||
profile = GLProfile.getGL2ES2();
|
||||
}
|
||||
} catch (GLException ex) {
|
||||
profile = GLProfile.getMaxProgrammable(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user