/[libvob]/libvob/org/nongnu/libvob/gl/GL.java
ViewVC logotype

Diff of /libvob/org/nongnu/libvob/gl/GL.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by tjl, Tue Apr 8 12:48:50 2003 UTC revision 1.9 by tjl, Tue Apr 8 20:25:02 2003 UTC
# Line 167  public class GL { Line 167  public class GL {
167    
168      /** The Java proxy for a C++ object.      /** The Java proxy for a C++ object.
169       */       */
170      static public abstract class JavaObject extends Vob      static public abstract class JavaObject extends AbstractVob
171              implements GLDeletable {              implements GLDeletable {
172          private int id = 0;          private int id = 0;
173          JavaObject(int id) { super(); this.id = id; }          JavaObject(int id) { super(); this.id = id; }
# Line 334  public class GL { Line 334  public class GL {
334       * Here, id == directly the texture id.       * Here, id == directly the texture id.
335       */       */
336      static public class Texture extends NonRenderableJavaObject {      static public class Texture extends NonRenderableJavaObject {
337          private Texture(int id) { super(id); }          boolean delReal;
338            private Texture(int id) { super(id); delReal = false; }
339            private Texture(int id, boolean delReal) { super(id);
340                this.delReal = delReal; }
341          protected void deleteObj() { impl_deleteTexture(getId()); }          protected void deleteObj() { impl_deleteTexture(getId()); }
342    
343          /** Get the OpenGL texture id of this texture.          /** Get the OpenGL texture id of this texture.
# Line 450  public class GL { Line 453  public class GL {
453      /** Create a new OpenGL texture object.      /** Create a new OpenGL texture object.
454       */       */
455      static public Texture createTexture() {      static public Texture createTexture() {
456          return new Texture(impl_createTexture());          return new Texture(impl_createTexture(), true);
457      }      }
458      static private native int impl_createTexture();      static private native int impl_createTexture();
459      static private native void impl_deleteTexture(int id);      static private native void impl_deleteTexture(int id);
# Line 504  public class GL { Line 507  public class GL {
507           * in the font.           * in the font.
508           */           */
509          public void getWidths(float[] w) { putFontWidths(getId(), w); }          public void getWidths(float[] w) { putFontWidths(getId(), w); }
510    
511            /** Get the number of textures in the font.
512             */
513            public int getNTextures() { return impl_Font_getNTextures(getId()); }
514    
515            /** Get the ith texture of the font.
516             */
517            public Texture getTexture(int i) {
518                return new Texture(impl_Font_getTexture(getId(), i), false);
519            }
520      }      }
521    
522      static String defaultFontFile = "/usr/share/fonts/type1/gsfonts/n019004l.pfb";      static String defaultFontFile = "/usr/share/fonts/type1/gsfonts/n019004l.pfb";
# Line 529  public class GL { Line 542  public class GL {
542      static private native float getFontYOffs(int id);      static private native float getFontYOffs(int id);
543      static private native void deleteFont(int id);      static private native void deleteFont(int id);
544      static private native void putFontWidths(int id, float[] w);      static private native void putFontWidths(int id, float[] w);
545        static private native int impl_Font_getNTextures(int id);
546        static private native int impl_Font_getTexture(int id, int i);
547    
548    
549  //--------- OpenGL Program  //--------- OpenGL Program

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26