mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
starting the refactoring of PGL
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
package processing.lwjgl;
|
||||
|
||||
public class PGraphics2D extends processing.opengl.PGraphics2D {
|
||||
|
||||
public PGraphics2D() {
|
||||
pgl = new PGL(this);
|
||||
|
||||
if (tessellator == null) {
|
||||
tessellator = new Tessellator();
|
||||
}
|
||||
|
||||
intBuffer = PGL.allocateIntBuffer(2);
|
||||
floatBuffer = PGL.allocateFloatBuffer(2);
|
||||
viewport = PGL.allocateIntBuffer(4);
|
||||
|
||||
inGeo = newInGeometry(IMMEDIATE);
|
||||
tessGeo = newTessGeometry(IMMEDIATE);
|
||||
texCache = newTexCache();
|
||||
|
||||
initialized = false;
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package processing.lwjgl;
|
||||
|
||||
public class PGraphics3D extends processing.opengl.PGraphics3D {
|
||||
|
||||
public PGraphics3D() {
|
||||
pgl = new PGL(this);
|
||||
|
||||
if (tessellator == null) {
|
||||
tessellator = new Tessellator();
|
||||
}
|
||||
|
||||
intBuffer = PGL.allocateIntBuffer(2);
|
||||
floatBuffer = PGL.allocateFloatBuffer(2);
|
||||
viewport = PGL.allocateIntBuffer(4);
|
||||
|
||||
inGeo = newInGeometry(IMMEDIATE);
|
||||
tessGeo = newTessGeometry(IMMEDIATE);
|
||||
texCache = newTexCache();
|
||||
|
||||
initialized = false;
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
package processing.lwjgl;
|
||||
|
||||
import processing.opengl.PGL;
|
||||
import processing.opengl.PGraphicsOpenGL;
|
||||
|
||||
/**
|
||||
@@ -29,27 +30,8 @@ import processing.opengl.PGraphicsOpenGL;
|
||||
*
|
||||
*/
|
||||
public class PGraphicsLWJGL extends PGraphicsOpenGL {
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
// INIT/ALLOCATE/FINISH
|
||||
|
||||
|
||||
public PGraphicsLWJGL() {
|
||||
pgl = new PGL(this);
|
||||
|
||||
if (tessellator == null) {
|
||||
tessellator = new Tessellator();
|
||||
}
|
||||
|
||||
intBuffer = PGL.allocateIntBuffer(2);
|
||||
floatBuffer = PGL.allocateFloatBuffer(2);
|
||||
viewport = PGL.allocateIntBuffer(4);
|
||||
|
||||
inGeo = newInGeometry(IMMEDIATE);
|
||||
tessGeo = newTessGeometry(IMMEDIATE);
|
||||
texCache = newTexCache();
|
||||
|
||||
initialized = false;
|
||||
|
||||
static public PGL createPGL(PGraphicsOpenGL pg) {
|
||||
return new PLWJGL(pg);
|
||||
}
|
||||
}
|
||||
|
||||
+841
-593
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user