diff options
author | Sven Gothel <[email protected]> | 2012-02-18 18:53:45 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-02-18 18:53:45 +0100 |
commit | 063477d2a3136a3294a6f8917c87fa31f50a5467 (patch) | |
tree | b2ccd15ab47b792f3a36776f75e2e7e8810e88f8 /src | |
parent | 697d631bc0333b92689972ff3e621e3549fb6c80 (diff) |
Seperate dualDepthPeeling obj data; Add data anchor class
Diffstat (limited to 'src')
-rw-r--r-- | src/demos/data/DemosDataAnchor.java | 5 | ||||
-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.java | 6 | ||||
-rw-r--r-- | src/demos/dualDepthPeeling/Model.java | 4 |
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; |