mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
working on opengl
This commit is contained in:
@@ -188,3 +188,14 @@ zip -r0q library/particles.jar simong
|
||||
rm -rf simong
|
||||
mkdir -p ../../build/windows/work/libraries/particles/library/
|
||||
cp library/particles.jar ../../build/windows/work/libraries/particles/library/
|
||||
|
||||
|
||||
# OPENGL LIBRARY
|
||||
echo Building OpenGL library...
|
||||
cd ../../lib/opengl
|
||||
../../build/windows/work/jikes +D -classpath "library\\jogl.jar;$CLASSPATH" -d . *.java
|
||||
rm -f library/opengl.jar
|
||||
zip -r0q library/opengl.jar processing
|
||||
rm -rf processing
|
||||
mkdir -p ../../build/windows/work/libraries/opengl/library/
|
||||
cp library/opengl.jar ../../build/windows/work/libraries/opengl/library/
|
||||
|
||||
+20
-12
@@ -175,12 +175,7 @@ public class PApplet extends Applet
|
||||
|
||||
// can/may be resized later
|
||||
//g = new PGraphics(DEFAULT_WIDTH, DEFAULT_HEIGHT);
|
||||
initg();
|
||||
|
||||
addMouseListener(this);
|
||||
addMouseMotionListener(this);
|
||||
addKeyListener(this);
|
||||
addFocusListener(this);
|
||||
initGraphics();
|
||||
|
||||
// send tab keys through to the PApplet
|
||||
try {
|
||||
@@ -190,8 +185,8 @@ public class PApplet extends Applet
|
||||
Component.class.getMethod("setFocusTraversalKeysEnabled",
|
||||
new Class[] { Boolean.TYPE });
|
||||
defocus.invoke(this, new Object[] { Boolean.FALSE });
|
||||
} else {
|
||||
System.out.println(jdkVersion);
|
||||
//} else {
|
||||
//System.out.println(jdkVersion);
|
||||
}
|
||||
} catch (Exception e) { } // oh well
|
||||
|
||||
@@ -250,8 +245,14 @@ public class PApplet extends Applet
|
||||
|
||||
// override for subclasses (i.e. opengl)
|
||||
// so that init() doesn't have to be replicated
|
||||
public void initg() {
|
||||
public void initGraphics() {
|
||||
g = new PGraphics(DEFAULT_WIDTH, DEFAULT_HEIGHT);
|
||||
|
||||
// 0073: moved here so that can be overridden for PAppletGL
|
||||
addMouseListener(this);
|
||||
addMouseMotionListener(this);
|
||||
addKeyListener(this);
|
||||
addFocusListener(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -915,12 +916,19 @@ public class PApplet extends Applet
|
||||
// and i run the block.
|
||||
|
||||
|
||||
public void focusGained() { }
|
||||
|
||||
public void focusGained(FocusEvent e) {
|
||||
focused = true;
|
||||
focusGained();
|
||||
}
|
||||
|
||||
|
||||
public void focusLost() { }
|
||||
|
||||
public void focusLost(FocusEvent e) {
|
||||
focused = false;
|
||||
focusLost();
|
||||
}
|
||||
|
||||
|
||||
@@ -4172,7 +4180,7 @@ public class PApplet extends Applet
|
||||
}
|
||||
|
||||
|
||||
public void copy(int sx1, int sy1, int sx2, int sy2,
|
||||
public void copy(int sx1, int sy1, int sx2, int sy2,
|
||||
int dx1, int dy1, int dx2, int dy2) {
|
||||
g.copy(sx1, sy1, sx2, sy2, dx1, dy1, dx2, dy2);
|
||||
}
|
||||
@@ -4199,13 +4207,13 @@ public class PApplet extends Applet
|
||||
}
|
||||
|
||||
|
||||
public void blend(int sx1, int sy1, int sx2, int sy2,
|
||||
public void blend(int sx1, int sy1, int sx2, int sy2,
|
||||
int dx1, int dy1, int dx2, int dy2, int mode) {
|
||||
g.blend(sx1, sy1, sx2, sy2, dx1, dy1, dx2, dy2, mode);
|
||||
}
|
||||
|
||||
|
||||
public void blend(PImage src, int sx1, int sy1, int sx2, int sy2,
|
||||
public void blend(PImage src, int sx1, int sy1, int sx2, int sy2,
|
||||
int dx1, int dy1, int dx2, int dy2, int mode) {
|
||||
g.blend(src, sx1, sy1, sx2, sy2, dx1, dy1, dx2, dy2, mode);
|
||||
}
|
||||
|
||||
+1
-1
@@ -1507,7 +1507,7 @@ public class PGraphics extends PImage
|
||||
case CONCAVE_POLYGON:
|
||||
case CONVEX_POLYGON:
|
||||
{
|
||||
triangulate_polygon();
|
||||
triangulate_polygon();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
0073
|
||||
X added focusGained() and focusLost()
|
||||
_ add to preprocessor
|
||||
|
||||
_ image("blah.jpg");
|
||||
_ loadImage() is broken on some machines
|
||||
|
||||
Reference in New Issue
Block a user