44 |
Color bgcolor; |
Color bgcolor; |
45 |
|
|
46 |
Cell papercode; |
Cell papercode; |
47 |
|
|
48 |
|
GLRen.PaperQuad pq; |
49 |
|
|
50 |
public static BgVob create(Cell cell) { |
public static BgVob create(Cell cell, GraphicsAPI.Window w) { |
51 |
return new BgVob(cell); |
return new BgVob(cell, w); |
52 |
} |
} |
53 |
|
|
54 |
public BgVob(Cell cell) { |
public BgVob(Cell cell, GraphicsAPI.Window w) { |
55 |
|
|
56 |
papercode = cell; |
papercode = cell; |
57 |
|
pq = getPaperQuad(papercode, w); |
58 |
} |
} |
59 |
static Rectangle rect = new Rectangle(); |
static Rectangle rect = new Rectangle(); |
60 |
static Rectangle rect2 = new Rectangle(); |
static Rectangle rect2 = new Rectangle(); |
80 |
static GL.DisplayList list; |
static GL.DisplayList list; |
81 |
static Vob triangle; |
static Vob triangle; |
82 |
|
|
83 |
GLRen.PaperQuad getPaperQuad(Cell c) { |
GLRen.PaperQuad getPaperQuad(Cell c, GraphicsAPI.Window win) { |
84 |
GLRen.PaperQuad ret = (GLRen.PaperQuad)papers.get(c); |
GLRen.PaperQuad ret = (GLRen.PaperQuad)papers.get(c); |
85 |
if(ret == null) { |
if(ret == null) { |
86 |
Paper pap; |
Paper pap; |
87 |
GLRen.PaperQuad pq; |
GLRen.PaperQuad pq; |
88 |
pap = PaperMill.getInstance().getPaper(c.hashCode()); |
pap = PaperMill.getInstance().getOptimizedPaper(c.hashCode(), win); |
89 |
ret = GLRen.createPaperQuad(pap, 0, 0, 1, 1, 0); |
ret = GLRen.createPaperQuad(pap, 0, 0, 1, 1, 0, GLRen.PAPERQUAD_CS2_TO_SCREEN); |
90 |
papers.put(c, ret); |
papers.put(c, ret); |
91 |
|
|
92 |
list = GL.createDisplayList( |
list = GL.createDisplayList( |
104 |
int[] list, int curs, int coordsys1, |
int[] list, int curs, int coordsys1, |
105 |
int coordsys2) { |
int coordsys2) { |
106 |
|
|
|
GLRen.PaperQuad pq = getPaperQuad(papercode); |
|
107 |
curs = pq.addToListGL(win, list, curs, coordsys1, coordsys2); |
curs = pq.addToListGL(win, list, curs, coordsys1, coordsys2); |
108 |
// curs = triangle.addToListGL(win, list, curs, coordsys1, -1); |
// curs = triangle.addToListGL(win, list, curs, coordsys1, -1); |
109 |
return curs; |
return curs; |