/[gzz]/gzz/gzz/vob/OvalBgVob.java
ViewVC logotype

Diff of /gzz/gzz/vob/OvalBgVob.java

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

revision 1.1 by humppake, Thu Oct 17 13:03:29 2002 UTC revision 1.2 by humppake, Fri Oct 18 06:45:15 2002 UTC
# Line 1  Line 1 
1    
2  /*  /*
3  OvalBgVob.java  OvalBgVob.java
4   *       *    
# Line 52  public static final String rcsid = "$Id$ Line 53  public static final String rcsid = "$Id$
53          if (!texLoaded) {          if (!texLoaded) {
54              String[] texparam = {"type", "8"};              String[] texparam = {"type", "8"};
55              tex = GL.createTexture();              tex = GL.createTexture();
56              /** !!! Should texture's size be relative to vob's physical size?              /** XXX Should texture's size be relative to vob's physical size?
57               * Then texture should be reloaded when greater needed.               * If so, texture should be reloaded always when greater needed.
58                 * Currently texture is loaded only once.
59               */               */
60              tex.shade(128, 128, 0, 1, "ALPHA", "ALPHA", "geometric", texparam);              tex.shade(128, 128, 0, 1, "ALPHA", "ALPHA", "geometric", texparam);
61              texLoaded = true;              texLoaded = true;
# Line 78  public static final String rcsid = "$Id$ Line 80  public static final String rcsid = "$Id$
80              mw = rect.width, mh = rect.height;              mw = rect.width, mh = rect.height;
81    
82          /** Origo and radius for circle.          /** Origo and radius for circle.
83             * Irrelevant, when using drawOval ad fillOval.
84            Point co = new Point(mx+mw/2, my+h/2);            Point co = new Point(mx+mw/2, my+h/2);
85            int cr;            int cr;
86            if (mw < mh) cr = mw;            if (mw < mh) cr = mw;
# Line 156  public static final String rcsid = "$Id$ Line 159  public static final String rcsid = "$Id$
159                  "PushAttrib ENABLE_BIT\n"+                  "PushAttrib ENABLE_BIT\n"+
160                  "BindTexture TEXTURE_2D "+tex.getTexId()+"\n"+                  "BindTexture TEXTURE_2D "+tex.getTexId()+"\n"+
161                  "Enable TEXTURE_2D\n"+                  "Enable TEXTURE_2D\n"+
162                  
163                    /** Draws border. */
164                  "Color 0 0 0 1\n" +                  "Color 0 0 0 1\n" +
165                  "Begin QUAD_STRIP\n"+                  "Begin QUAD_STRIP\n"+
166                  /** !!! Border width probably should NOT be                  /** XXX Border width probably should NOT be
167                   * relative to vob's size as below.                   * relative to vob's size as below.
168                   */                   */
169                  "TexCoord 1 1\nVertex 1.05 1.05\n"+                  "TexCoord 1 1\nVertex 1.05 1.05\n"+
# Line 168  public static final String rcsid = "$Id$ Line 172  public static final String rcsid = "$Id$
172                  "TexCoord 0 0\nVertex -0.05 -0.05\n"+                  "TexCoord 0 0\nVertex -0.05 -0.05\n"+
173                  "End\n" +                  "End\n" +
174    
175                    /** Draws filled oval using circular texture. */
176                  bgcall +                  bgcall +
177    
178                  "PopAttrib\n"                  "PopAttrib\n"

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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