diff options
Diffstat (limited to 'src/demos/cg')
-rw-r--r-- | src/demos/cg/runtime_ogl/cgGL_vertex_example.java | 7 | ||||
-rw-r--r-- | src/demos/cg/runtime_ogl_vertex_fragment/runtime_ogl_vertex_fragment.java | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/demos/cg/runtime_ogl/cgGL_vertex_example.java b/src/demos/cg/runtime_ogl/cgGL_vertex_example.java index 3579f27..db263af 100644 --- a/src/demos/cg/runtime_ogl/cgGL_vertex_example.java +++ b/src/demos/cg/runtime_ogl/cgGL_vertex_example.java @@ -49,6 +49,9 @@ import java.io.*; */ public class cgGL_vertex_example implements GLEventListener { + static { + GLProfile.initSingleton(); + } /******************************************************************************/ /*** Static Data ***/ @@ -271,8 +274,10 @@ public class cgGL_vertex_example implements GLEventListener public static void main(String[] argv) { - Frame frame = new Frame("NVidia Cg Toolkit \"cgGL_vertex_example\" demo"); + // GLCapabilities caps = new GLCapabilities(GLProfile.getDefault()); + // GLCanvas canvas = new GLCanvas(caps); GLCanvas canvas = new GLCanvas(); + Frame frame = new Frame("NVidia Cg Toolkit \"cgGL_vertex_example\" demo"); canvas.addGLEventListener(new cgGL_vertex_example()); frame.add(canvas); diff --git a/src/demos/cg/runtime_ogl_vertex_fragment/runtime_ogl_vertex_fragment.java b/src/demos/cg/runtime_ogl_vertex_fragment/runtime_ogl_vertex_fragment.java index b550324..6502720 100644 --- a/src/demos/cg/runtime_ogl_vertex_fragment/runtime_ogl_vertex_fragment.java +++ b/src/demos/cg/runtime_ogl_vertex_fragment/runtime_ogl_vertex_fragment.java @@ -53,6 +53,9 @@ import java.util.*; */ public class runtime_ogl_vertex_fragment implements GLEventListener { + static { + GLProfile.initSingleton(); + } // Global variables: hold the Cg context that we're storing our programs // in as well as handles to the vertex and fragment program used in this |