gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] libvob/src/jni GLRen.template.java


From: Janne V. Kujala
Subject: [Gzz-commits] libvob/src/jni GLRen.template.java
Date: Wed, 26 Mar 2003 14:23:19 -0500

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Changes by:     Janne V. Kujala <address@hidden>        03/03/26 14:23:19

Modified files:
        src/jni        : GLRen.template.java 

Log message:
        shorthands

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/src/jni/GLRen.template.java.diff?tr1=1.3&tr2=1.4&r1=text&r2=text

Patches:
Index: libvob/src/jni/GLRen.template.java
diff -u libvob/src/jni/GLRen.template.java:1.3 
libvob/src/jni/GLRen.template.java:1.4
--- libvob/src/jni/GLRen.template.java:1.3      Tue Mar 11 06:24:29 2003
+++ libvob/src/jni/GLRen.template.java  Wed Mar 26 14:23:19 2003
@@ -46,5 +46,43 @@
     }
     */
 
+    private static boolean need_init = true;
+    private static boolean have_VP_1_1;
+
+    public static final int PAPERQUAD_USE_VERTEX_PROGRAM = 0x0001;
+    public static final int PAPERQUAD_CS2_TO_SCREEN = 0x0002;
+
+    public static final int IRREGU_SHIFTS = 0x0001;
+    public static final int IRREGU_CS2_TO_SCREEN = 0x0002;
+
+    public static void init() {
+        if (GL.hasExtension("GL_NV_vertex_program1_1")) {
+            have_VP_1_1 = true;
+        } else {
+            have_VP_1_1 = false;
+        }
+        need_init = false;
+    }
+
+    // ----  Shorthands.
+    public static PaperQuad createPaperQuad(Paper paper, 
+           float x0, float y0, float x1, float y1, float dicefactor) {
+
+            if (need_init) init();
+            int flags = 0;
+
+            if (have_VP_1_1) {
+               flags |= PAPERQUAD_USE_VERTEX_PROGRAM;
+            } else {
+               flags &= ~PAPERQUAD_USE_VERTEX_PROGRAM;
+            }
+            
+       return createPaperQuad(paper, x0, y0, x1, y1, 1, dicefactor, flags);
+    }
+
+    public static PaperQuad createPaperQuad(Paper paper, 
+           float x0, float y0, float x1, float y1, float dicefactor, int 
flags) {
+       return createPaperQuad(paper, x0, y0, x1, y1, 1, dicefactor, flags);
+    }
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]