/[gzz]/gzz/gzz/gfx/gl/GL.java
ViewVC logotype

Diff of /gzz/gzz/gfx/gl/GL.java

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

revision 1.34 by tjl, Sun Dec 29 20:33:13 2002 UTC revision 1.35 by tjl, Sun Jan 12 11:41:46 2003 UTC
# Line 29  import java.util.Set; Line 29  import java.util.Set;
29  import java.util.HashSet;  import java.util.HashSet;
30  import java.util.StringTokenizer;  import java.util.StringTokenizer;
31  import gzz.client.GraphicsAPI;  import gzz.client.GraphicsAPI;
32    import gzz.vob.VobScene;
33    
34  /** The interface to the native OpenGL library.  /** The interface to the native OpenGL library.
35   * Note: here we must be VERY careful, as this is one of the places   * Note: here we must be VERY careful, as this is one of the places
# Line 170  public class GL { Line 171  public class GL {
171       */       */
172      static public abstract class NonRenderableJavaObject extends JavaObject {      static public abstract class NonRenderableJavaObject extends JavaObject {
173          NonRenderableJavaObject(int id) { super(id); }          NonRenderableJavaObject(int id) { super(id); }
         public int addToListGL(GraphicsAPI.RenderingSurface win, int[] list, int cur, int cs1, int cs2) {  
             throw new Error("Not right to try to add me to a display list");  
         }  
174      }      }
175    
176      /** The Java proxy representing a Renderable object.      /** The Java proxy representing a Renderable object.
177       */       */
178      static public abstract class Renderable0JavaObject extends JavaObject {      static public abstract class Renderable0JavaObject extends JavaObject {
179          public Renderable0JavaObject(int id) { super(id); }          public Renderable0JavaObject(int id) { super(id); }
180          /** Add this object to the given list with the given coordinate system.          public int putGL(VobScene vs) {
181           * Usage:              return getId();
          * <pre>  
          *      int[] list;  
          *      int curs;  
          *      curs = obj.addToListGL(list, curs, coordsys);  
          * </pre>  
          * @param list The display list to add this to.  
          * @param cur The current index, to which the first int goes  
          * @param coordsys The number of the coordinate system.  
          * @return The new current index after adding these.  
          */  
         public int addToList(int[] list, int cur) {  
             list[cur++] = (RENDERABLE0 | getId());  
             return cur;  
         }  
         public int addToListGL(GraphicsAPI.RenderingSurface win, int[] list, int cur, int cs1, int cs2) {  
             return addToList(list, cur);  
182          }          }
183          protected void deleteObj() {          protected void deleteObj() {
184              deleteRenderable0(getId());              deleteRenderable0(getId());
# Line 209  public class GL { Line 191  public class GL {
191       */       */
192      static public abstract class Renderable1JavaObject extends JavaObject {      static public abstract class Renderable1JavaObject extends JavaObject {
193          public Renderable1JavaObject(int id) { super(id); }          public Renderable1JavaObject(int id) { super(id); }
194          /** Add this object to the given list with the given coordinate system.          public int putGL(VobScene vs, int coordsys1) {
195           * Usage:              return getId();
          * <pre>  
          *      int[] list;  
          *      int curs;  
          *      curs = obj.addToList(list, curs, coordsys);  
          * </pre>  
          * @param list The display list to add this to.  
          * @param cur The current index, to which the first int goes  
          * @param coordsys The number of the coordinate system.  
          * @return The new current index after adding these.  
          */  
         public int addToList(int[] list, int cur, int coordsys) {  
             list[cur++] = (RENDERABLE1 | getId());  
             list[cur++] = coordsys;  
             return cur;  
         }  
         public int addToListGL(GraphicsAPI.RenderingSurface win, int[] list, int cur, int cs1, int cs2) {  
             return addToList(list, cur, cs1);  
196          }          }
197          protected void deleteObj() {          protected void deleteObj() {
198              deleteRenderable1(getId());              deleteRenderable1(getId());
# Line 239  public class GL { Line 204  public class GL {
204       */       */
205      static public abstract class Renderable2JavaObject extends JavaObject {      static public abstract class Renderable2JavaObject extends JavaObject {
206          public Renderable2JavaObject(int id) { super(id); }          public Renderable2JavaObject(int id) { super(id); }
207          /** Add this object to the given list with the given coordinate          public int putGL(VobScene vs, int coordsys1, int coordsys2) {
208           * systems.              return getId();
          * Usage:  
          * <pre>  
          *      int[] list;  
          *      int curs;  
          *      curs = obj.addToList(list, curs, coordsys1, coordsys2);  
          * </pre>  
          * @param list The display list to add this to.  
          * @param cur The current index, to which the first int goes  
          * @param coordsys1 The number of the first system.  
          * @param coordsys2 The number of the second system.  
          * @return The new current index after adding these.  
          */  
         public int addToListGL(GraphicsAPI.RenderingSurface win, int[] list, int cur,  
                             int coordsys1, int coordsys2) {  
             list[cur++] = (RENDERABLE2 | getId());  
             list[cur++] = coordsys1;  
             list[cur++] = coordsys2;  
             return cur;  
209          }          }
210          protected void deleteObj() {          protected void deleteObj() {
211              deleteRenderable2(getId());              deleteRenderable2(getId());
# Line 268  public class GL { Line 215  public class GL {
215    
216      /** The Java proxy representing a Renderable2 object.      /** The Java proxy representing a Renderable2 object.
217       */       */
218      static public abstract class Renderable3JavaObject extends JavaObject      static public abstract class Renderable3JavaObject extends JavaObject {
         implements gzz.vob.Vob3 {  
219          public Renderable3JavaObject(int id) { super(id); }          public Renderable3JavaObject(int id) { super(id); }
220          /** Add this object to the given list with the given coordinate          public int putGL(VobScene vs, int coordsys1, int coordsys2, int coordsys3) {
221           * systems.              return getId();
          * Usage:  
          * <pre>  
          *      int[] list;  
          *      int curs;  
          *      curs = obj.addToList(list, curs, coordsys1, coordsys2, coordsys3);  
          * </pre>  
          * @param list The display list to add this to.  
          * @param cur The current index, to which the first int goes  
          * @param coordsys1 The number of the first system.  
          * @param coordsys2 The number of the second system.  
          * @param coordsys3 The number of the third system.  
          * @return The new current index after adding these.  
          */  
         public int addToListGL(GraphicsAPI.RenderingSurface win, int[] list, int cur,  
                             int coordsys1, int coordsys2, int coordsys3) {  
             list[cur++] = (RENDERABLE3 | getId());  
             list[cur++] = coordsys1;  
             list[cur++] = coordsys2;  
             list[cur++] = coordsys3;  
             return cur;  
222          }          }
223          protected void deleteObj() {          protected void deleteObj() {
224              deleteRenderable3(getId());              deleteRenderable3(getId());

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

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