summaryrefslogtreecommitdiffstats
path: root/src/demos/particles/engine
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-04-26 19:24:19 +0200
committerSven Gothel <[email protected]>2011-04-26 19:24:19 +0200
commitf3afd3cd3be302c9b9cc3b6ec56cf032817e00a4 (patch)
treee7aaef0c1860f35f6b1e115489e134ae7df6d07c /src/demos/particles/engine
parenta7317cf820a33cac7f068153649031483df53cac (diff)
sync w/ jogl e007bb306124411e0232e51d16aa493cbd361f74
Diffstat (limited to 'src/demos/particles/engine')
-rwxr-xr-xsrc/demos/particles/engine/Engine.java5
-rwxr-xr-xsrc/demos/particles/engine/GLComponent.java2
-rwxr-xr-xsrc/demos/particles/engine/Particle.java2
3 files changed, 5 insertions, 4 deletions
diff --git a/src/demos/particles/engine/Engine.java b/src/demos/particles/engine/Engine.java
index d769457..d443ac2 100755
--- a/src/demos/particles/engine/Engine.java
+++ b/src/demos/particles/engine/Engine.java
@@ -37,6 +37,7 @@
package demos.particles.engine;
import javax.media.opengl.*;
+
import com.jogamp.opengl.util.texture.*;
import java.net.*;
import java.util.*;
@@ -78,12 +79,12 @@ public class Engine {
}
}
- public void init() {
+ public void init(GL gl) {
try {
ClassLoader c1 = this.getClass().getClassLoader();
URL url = c1.getResource(path);
texture = TextureIO.newTexture(url, false, null);
- texture.enable();
+ texture.enable(gl);
}
catch(IOException e) {
e.printStackTrace();
diff --git a/src/demos/particles/engine/GLComponent.java b/src/demos/particles/engine/GLComponent.java
index 7194861..46a0940 100755
--- a/src/demos/particles/engine/GLComponent.java
+++ b/src/demos/particles/engine/GLComponent.java
@@ -106,7 +106,7 @@ public class GLComponent extends GLCanvas implements GLEventListener {
animator.start();
- engine.init();
+ engine.init(gl);
}
diff --git a/src/demos/particles/engine/Particle.java b/src/demos/particles/engine/Particle.java
index d9858dd..81fbe25 100755
--- a/src/demos/particles/engine/Particle.java
+++ b/src/demos/particles/engine/Particle.java
@@ -58,7 +58,7 @@ public class Particle {
public void draw(GL2 gl, Texture texture, RGBA tendToColor) {
adjust(tendToColor);
- texture.bind();
+ texture.bind(gl);
gl.glColor4f(rgba.r,rgba.g,rgba.b,rgba.a);
gl.glBegin(GL2.GL_QUADS);