summaryrefslogtreecommitdiffstats
path: root/src/demos
diff options
context:
space:
mode:
Diffstat (limited to 'src/demos')
-rw-r--r--src/demos/data/DemosDataAnchor.java5
-rw-r--r--src/demos/data/models/dragon.obj (renamed from src/demos/dualDepthPeeling/media/models/dragon.obj)0
-rw-r--r--src/demos/dualDepthPeeling/DualDepthPeeling.java6
-rw-r--r--src/demos/dualDepthPeeling/Model.java4
4 files changed, 11 insertions, 4 deletions
diff --git a/src/demos/data/DemosDataAnchor.java b/src/demos/data/DemosDataAnchor.java
new file mode 100644
index 0000000..6fe6231
--- /dev/null
+++ b/src/demos/data/DemosDataAnchor.java
@@ -0,0 +1,5 @@
+package demos.data;
+
+public class DemosDataAnchor {
+
+}
diff --git a/src/demos/dualDepthPeeling/media/models/dragon.obj b/src/demos/data/models/dragon.obj
index 8afcb10..8afcb10 100644
--- a/src/demos/dualDepthPeeling/media/models/dragon.obj
+++ b/src/demos/data/models/dragon.obj
diff --git a/src/demos/dualDepthPeeling/DualDepthPeeling.java b/src/demos/dualDepthPeeling/DualDepthPeeling.java
index 9cc4b05..eccf8ba 100644
--- a/src/demos/dualDepthPeeling/DualDepthPeeling.java
+++ b/src/demos/dualDepthPeeling/DualDepthPeeling.java
@@ -23,6 +23,8 @@ import com.jogamp.opengl.util.glsl.ShaderCode;
import com.jogamp.opengl.util.glsl.ShaderProgram;
import com.jogamp.opengl.util.glsl.ShaderState;
+import demos.data.DemosDataAnchor;
+
// Translated from C++ Version see below:
//--------------------------------------------------------------------------------------
// Order Independent Transparency with Dual Depth Peeling
@@ -65,7 +67,7 @@ public class DualDepthPeeling implements GLEventListener, KeyListener, MouseList
public boolean g_useOQ = true;
public int[] g_queryId = new int[1];
- public String MODEL_FILENAME = new String( "media/models/dragon.obj" );
+ public String MODEL_FILENAME = "models/dragon.obj";
public static final String s_FrontBlenderTex = "FrontBlenderTex";
public static final String s_BackBlenderTex = "BackBlenderTex";
@@ -366,7 +368,7 @@ public class DualDepthPeeling implements GLEventListener, KeyListener, MouseList
g_model = new Model();
System.err.println("loading OBJ...\n");
- g_model.loadModelFromFile( model_filename );
+ g_model.loadModelFromFile(DemosDataAnchor.class, model_filename );
System.err.println("compiling mesh...\n");
g_model.compileModel();
diff --git a/src/demos/dualDepthPeeling/Model.java b/src/demos/dualDepthPeeling/Model.java
index 3502879..d0dc8f3 100644
--- a/src/demos/dualDepthPeeling/Model.java
+++ b/src/demos/dualDepthPeeling/Model.java
@@ -95,8 +95,8 @@ public class Model {
// true, otherwise it returns false.
//
//////////////////////////////////////////////////////////////
- public boolean loadModelFromFile( String file ) {
- URL fileURL = IOUtil.getResource(Model.class, file);
+ public boolean loadModelFromFile( Class<?> context, String file ) {
+ URL fileURL = IOUtil.getResource(context, file);
if ( fileURL != null )
{
BufferedReader input = null;