summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-09-09 07:35:27 +0000
committerKenneth Russel <[email protected]>2005-09-09 07:35:27 +0000
commit61979d242e6a942b3cbbdd8d5f3b326260517eed (patch)
treeddfc4bb44abfb9075803114cf5877ac218139310 /src
parentffb098e3eed864346f1bd9f53021b17f9148da49 (diff)
Instantiated HDR demo's CgPipeline class reflectively to break
compile-time dependence on Cg. Fixed bug in JNI name mangling in GlueGen with object array arguments. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JSR-231@123 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src')
-rwxr-xr-xsrc/demos/hdr/HDR.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/demos/hdr/HDR.java b/src/demos/hdr/HDR.java
index 20122f4..e10072a 100755
--- a/src/demos/hdr/HDR.java
+++ b/src/demos/hdr/HDR.java
@@ -9,7 +9,6 @@ import javax.swing.*;
import javax.media.opengl.*;
import com.sun.opengl.utils.*;
-import com.sun.opengl.cg.*;
import com.sun.opengl.utils.*;
import demos.common.*;
import demos.util.*;
@@ -1020,7 +1019,14 @@ public class HDR extends Demo {
private String shaderRoot = "demos/hdr/shaders/";
private void initCg(GL gl) {
- pipeline = new CgPipeline();
+ // NOTE: need to instantiate CgPipeline reflectively to avoid
+ // compile-time dependence (since Cg support might not be present)
+ try {
+ Class cgPipelineClass = Class.forName("demos.hdr.CgPipeline");
+ pipeline = (Pipeline) cgPipelineClass.newInstance();
+ } catch (Exception e) {
+ throw new GLException(e);
+ }
pipeline.init();
try {