Skip to content

Commit fe9e5bf

Browse files
committed
Fixed OpenGL issue
Made Sketches working again for latest processing version (2.1.2)
1 parent 33dfbe4 commit fe9e5bf

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

02_M/M_3_4_01_TOOL/M_3_4_01_TOOL.pde

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ void setup() {
114114
setupGUI();
115115

116116
pgl = (PGraphicsOpenGL) g;
117-
gl = pgl.pgl.gl;
118117

119118
noStroke();
120119

@@ -141,7 +140,7 @@ void draw() {
141140
else background(255);
142141

143142
if (useBlendWhite || useBlendBlack) {
144-
pgl.beginPGL();
143+
gl = ((PJOGL)beginPGL()).gl.getGL2();
145144
if (useBlendWhite) gl.glBlendFunc(GL.GL_ONE_MINUS_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_COLOR);
146145
if (useBlendBlack) gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_DST_COLOR);
147146
}

02_M/M_3_4_03_TOOL/M_3_4_03_TOOL.pde

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ void setup() {
118118
setupGUI();
119119

120120
pgl = (PGraphicsOpenGL) g;
121-
gl = pgl.pgl.gl;
122121

123122
noStroke();
124123

@@ -142,7 +141,7 @@ void draw() {
142141
else background(255);
143142

144143
if (useBlendWhite || useBlendBlack) {
145-
pgl.beginPGL();
144+
gl = ((PJOGL)beginPGL()).gl.getGL2();
146145
if (useBlendWhite) gl.glBlendFunc(GL.GL_ONE_MINUS_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_COLOR);
147146
if (useBlendBlack) gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_DST_COLOR);
148147
}

0 commit comments

Comments
 (0)