Skip to content

Commit eb7c654

Browse files
committed
make the drawTexture() functions in PGL public, remove them from
PGraphicsOpenGL
1 parent c116560 commit eb7c654

File tree

3 files changed

+23
-22
lines changed

3 files changed

+23
-22
lines changed

core/src/processing/opengl/PGL.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,16 +1121,16 @@ protected void endDraw(boolean clear0) {
11211121

11221122
// call (gl)finish() only if the rendering of each frame is taking too long,
11231123
// to make sure that commands are not accumulating in the GL command queue.
1124-
fcount += 1;
1125-
int m = pg.parent.millis();
1126-
if (m - lastm > 1000 * fint) {
1127-
currentFps = (float)(fcount) / fint;
1128-
fcount = 0;
1129-
lastm = m;
1130-
}
1131-
if (currentFps < targetFps/2) {
1132-
finish();
1133-
}
1124+
// fcount += 1;
1125+
// int m = pg.parent.millis();
1126+
// if (m - lastm > 1000 * fint) {
1127+
// currentFps = (float)(fcount) / fint;
1128+
// fcount = 0;
1129+
// lastm = m;
1130+
// }
1131+
// if (currentFps < targetFps/2) {
1132+
// finish();
1133+
// }
11341134
}
11351135

11361136

@@ -1492,17 +1492,17 @@ protected void copyToTexture(int target, int format, int id, int x, int y,
14921492
}
14931493

14941494

1495-
protected void drawTexture(int target, int id, int width, int height,
1496-
int X0, int Y0, int X1, int Y1) {
1495+
public void drawTexture(int target, int id, int width, int height,
1496+
int X0, int Y0, int X1, int Y1) {
14971497
drawTexture(target, id, width, height, width, height,
14981498
X0, Y0, X1, Y1, X0, Y0, X1, Y1);
14991499
}
15001500

15011501

1502-
protected void drawTexture(int target, int id,
1503-
int texW, int texH, int scrW, int scrH,
1504-
int texX0, int texY0, int texX1, int texY1,
1505-
int scrX0, int scrY0, int scrX1, int scrY1) {
1502+
public void drawTexture(int target, int id,
1503+
int texW, int texH, int scrW, int scrH,
1504+
int texX0, int texY0, int texX1, int texY1,
1505+
int scrX0, int scrY0, int scrX1, int scrY1) {
15061506
if (target == TEXTURE_2D) {
15071507
drawTexture2D(id, texW, texH, scrW, scrH,
15081508
texX0, texY0, texX1, texY1,

core/src/processing/opengl/PGraphicsOpenGL.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5376,6 +5376,7 @@ public void updateDisplay() {
53765376
}
53775377

53785378

5379+
/*
53795380
public void drawTexture(int target, int id, int width, int height,
53805381
int X0, int Y0, int X1, int Y1) {
53815382
beginPGL();
@@ -5393,7 +5394,7 @@ public void drawTexture(int target, int id, int texW, int texH,
53935394
scrX0, scrY0, scrX1, scrY1);
53945395
endPGL();
53955396
}
5396-
5397+
*/
53975398

53985399
protected void loadTextureImpl(int sampling, boolean mipmap) {
53995400
if (width == 0 || height == 0) return;

java/libraries/lwjgl/src/processing/lwjgl/PGL.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,15 +1072,15 @@ protected void copyToTexture(int target, int format, int id, int x, int y,
10721072
}
10731073

10741074

1075-
protected void drawTexture(int target, int id, int width, int height,
1076-
int X0, int Y0, int X1, int Y1) {
1075+
public void drawTexture(int target, int id, int width, int height,
1076+
int X0, int Y0, int X1, int Y1) {
10771077
drawTexture(target, id, width, height, X0, Y0, X1, Y1, X0, Y0, X1, Y1);
10781078
}
10791079

10801080

1081-
protected void drawTexture(int target, int id, int width, int height,
1082-
int texX0, int texY0, int texX1, int texY1,
1083-
int scrX0, int scrY0, int scrX1, int scrY1) {
1081+
public void drawTexture(int target, int id, int width, int height,
1082+
int texX0, int texY0, int texX1, int texY1,
1083+
int scrX0, int scrY0, int scrX1, int scrY1) {
10841084
if (target == TEXTURE_2D) {
10851085
drawTexture2D(id, width, height,
10861086
texX0, texY0, texX1, texY1,

0 commit comments

Comments
 (0)