Skip to content

Commit

Permalink
PJOGL.profile = 3;
Browse files Browse the repository at this point in the history
hopefully fixes point sprite rendering
  • Loading branch information
diwi committed Sep 26, 2017
1 parent 1a125d1 commit de5620f
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 3 deletions.
2 changes: 2 additions & 0 deletions examples/Basic_Tutorial/Basic_Tutorial.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

import processing.core.*;
import processing.opengl.PGraphics2D;
import processing.opengl.PJOGL;


public class Basic_Tutorial extends PApplet {
Expand Down Expand Up @@ -98,6 +99,7 @@ public void settings(){
size(viewport_w, viewport_h, P2D);
// some MSAA antialiasing
smooth(8);
PJOGL.profile = 3;
}


Expand Down
2 changes: 2 additions & 0 deletions examples/liquidfun_DamBreak/liquidfun_DamBreak.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import processing.core.*;
import processing.opengl.PGraphics2D;
import processing.opengl.PJOGL;


public class liquidfun_DamBreak extends PApplet {
Expand Down Expand Up @@ -62,6 +63,7 @@ public class liquidfun_DamBreak extends PApplet {
public void settings(){
size(viewport_w, viewport_h, P2D);
smooth(8);
PJOGL.profile = 3;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

import processing.core.*;
import processing.opengl.PGraphics2D;
import processing.opengl.PJOGL;


public class liquidfun_DamBreak_LiquidFx extends PApplet {
Expand Down Expand Up @@ -73,6 +74,7 @@ public class liquidfun_DamBreak_LiquidFx extends PApplet {
public void settings(){
size(viewport_w, viewport_h, P2D);
smooth(8);
PJOGL.profile = 3;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

import processing.core.*;
import processing.opengl.PGraphics2D;
import processing.opengl.PJOGL;


public class liquidfun_DrawingParticles extends PApplet {
Expand Down Expand Up @@ -67,6 +68,7 @@ public class liquidfun_DrawingParticles extends PApplet {
public void settings(){
size(viewport_w, viewport_h, P2D);
smooth(8);
PJOGL.profile = 3;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

import processing.core.*;
import processing.opengl.PGraphics2D;
import processing.opengl.PJOGL;


public class liquidfun_DrawingParticles_LiquidFx extends PApplet {
Expand Down Expand Up @@ -80,6 +81,7 @@ public class liquidfun_DrawingParticles_LiquidFx extends PApplet {
public void settings(){
size(viewport_w, viewport_h, P2D);
smooth(8);
PJOGL.profile = 3;
}


Expand Down
2 changes: 2 additions & 0 deletions examples/liquidfun_LiquidTimer/liquidfun_LiquidTimer.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import processing.core.*;
import processing.opengl.PGraphics2D;
import processing.opengl.PJOGL;


public class liquidfun_LiquidTimer extends PApplet {
Expand Down Expand Up @@ -63,6 +64,7 @@ public class liquidfun_LiquidTimer extends PApplet {
public void settings(){
size(viewport_w, viewport_h, P2D);
smooth(8);
PJOGL.profile = 3;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

import processing.core.PApplet;
import processing.opengl.PGraphics2D;
import processing.opengl.PJOGL;


public class liquidfun_ParticleColors_LiquidFx extends PApplet {
Expand Down Expand Up @@ -77,6 +78,7 @@ public class liquidfun_ParticleColors_LiquidFx extends PApplet {
public void settings(){
size(viewport_w, viewport_h, P2D);
smooth(8);
PJOGL.profile = 3;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

import processing.core.*;
import processing.opengl.PGraphics2D;
import processing.opengl.PJOGL;


public class liquidfun_ParticleEmitter_LiquidFx extends PApplet {
Expand Down Expand Up @@ -75,6 +76,7 @@ public class liquidfun_ParticleEmitter_LiquidFx extends PApplet {
public void settings(){
size(viewport_w, viewport_h, P2D);
smooth(8);
PJOGL.profile = 3;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

import processing.core.*;
import processing.opengl.PGraphics2D;
import processing.opengl.PJOGL;


public class liquidfun_ParticleRenderGroups_LiquidFx extends PApplet {
Expand Down Expand Up @@ -88,6 +89,7 @@ public class liquidfun_ParticleRenderGroups_LiquidFx extends PApplet {
public void settings(){
size(viewport_w, viewport_h, P2D);
smooth(8);
PJOGL.profile = 3;
}

public void setup(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

import processing.core.*;
import processing.opengl.PGraphics2D;
import processing.opengl.PJOGL;


public class liquidfun_ParticleRenderGroups_LiquidFxDark extends PApplet {
Expand Down Expand Up @@ -88,6 +89,7 @@ public class liquidfun_ParticleRenderGroups_LiquidFxDark extends PApplet {
public void settings(){
size(viewport_w, viewport_h, P2D);
smooth(8);
PJOGL.profile = 3;
}

public void setup(){
Expand Down
2 changes: 2 additions & 0 deletions examples/liquidfun_ParticleTypes/liquidfun_ParticleTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import processing.core.*;
import processing.opengl.PGraphics2D;
import processing.opengl.PJOGL;


public class liquidfun_ParticleTypes extends PApplet {
Expand Down Expand Up @@ -66,6 +67,7 @@ public class liquidfun_ParticleTypes extends PApplet {
public void settings(){
size(viewport_w, viewport_h, P2D);
smooth(8);
PJOGL.profile = 3;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

import processing.core.*;
import processing.opengl.PGraphics2D;
import processing.opengl.PJOGL;


public class liquidfun_ParticleTypes_LiquidFx extends PApplet {
Expand Down Expand Up @@ -77,6 +78,7 @@ public class liquidfun_ParticleTypes_LiquidFx extends PApplet {
public void settings(){
size(viewport_w, viewport_h, P2D);
smooth(8);
PJOGL.profile = 3;
}


Expand Down
2 changes: 2 additions & 0 deletions examples/liquidfun_WaveMachine/liquidfun_WaveMachine.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

import processing.core.*;
import processing.opengl.PGraphics2D;
import processing.opengl.PJOGL;


public class liquidfun_WaveMachine extends PApplet {
Expand Down Expand Up @@ -63,6 +64,7 @@ public class liquidfun_WaveMachine extends PApplet {
public void settings(){
size(viewport_w, viewport_h, P2D);
smooth(8);
PJOGL.profile = 3;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

import processing.core.*;
import processing.opengl.PGraphics2D;
import processing.opengl.PJOGL;


public class liquidfun_WaveMachine_LiquidFx extends PApplet {
Expand Down Expand Up @@ -76,6 +77,7 @@ public class liquidfun_WaveMachine_LiquidFx extends PApplet {
public void settings(){
size(viewport_w, viewport_h, P2D);
smooth(8);
PJOGL.profile = 3;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import org.jbox2d.dynamics.World;
import com.jogamp.opengl.GL;
import com.jogamp.opengl.GL2ES1;
import com.jogamp.opengl.GL2;
import com.jogamp.opengl.GL2ES3;
import com.jogamp.opengl.GL3;
import com.thomasdiewald.liquidfun.java.DwViewportTransform;
Expand Down Expand Up @@ -246,14 +246,15 @@ public void display(PGraphics2D canvas){


// settings
// fix: PJOGL.profile = 3; in settings()
// https://github.com/diwi/LiquidFunProcessing/issues/2
// gl.glEnable(GL2.GL_POINT_SMOOTH);
// gl.glEnable(GL3.GL_VERTEX_PROGRAM_POINT_SIZE);
gl.glEnable(GL3.GL_VERTEX_PROGRAM_POINT_SIZE);
// gl.glPointSize(particle_rad_screen * 2);

// ... f***ing OpenGL mess
gl.glEnable(GL3.GL_PROGRAM_POINT_SIZE);
gl.glEnable(GL2ES1.GL_POINT_SPRITE);
gl.glEnable(GL2.GL_POINT_SPRITE);

errCheck("DwParticleRenderGL.display-pointRendering");

Expand Down

0 comments on commit de5620f

Please sign in to comment.