151 |
|
|
152 |
{ |
{ |
153 |
"Type": "1", |
"Type": "1", |
154 |
|
"Name" : "CallListBoxCoorded", |
155 |
|
"Data" : "int no;", |
156 |
|
"Params" : "DisplayList list", |
157 |
|
# XXX Should store DisplayList |
158 |
|
"ParamCode" : """ |
159 |
|
this->no = list; |
160 |
|
""", |
161 |
|
"RenderCode" : """ |
162 |
|
DBG(dbg) << "CallListBoxCoorded "<<no<<"\\n"; |
163 |
|
glPushMatrix(); |
164 |
|
coords1.performGL(); |
165 |
|
ZPt boxwh = coords1.getSqSize(); |
166 |
|
glScalef(boxwh.x, boxwh.y, 1.0); |
167 |
|
glCallList(no); |
168 |
|
glPopMatrix(); |
169 |
|
GLERR |
170 |
|
""", |
171 |
|
}, |
172 |
|
|
173 |
|
{ |
174 |
|
"Type": "1", |
175 |
"Name": "DrawPixels", |
"Name": "DrawPixels", |
176 |
"Data" : "GLenum format, type; int w,h; GLubyte *bytes; ", |
"Data" : "GLenum format, type; int w,h; GLubyte *bytes; ", |
177 |
"Params" : "int w, int h, GLToken format, GLToken type, ByteVector bytes", |
"Params" : "int w, int h, GLToken format, GLToken type, ByteVector bytes", |
508 |
}, |
}, |
509 |
|
|
510 |
{ |
{ |
|
"Type": "1", |
|
|
"Name": "Line", |
|
|
"Data": "float px1, py1, px2, py2, red, green, blue, alpha;", |
|
|
"Params": """float px1, float py1, float px2, float py2, |
|
|
float red, float green, float blue, float alpha""", |
|
|
"ParamCode": """ this->px1 = px1; this->py1 = py1; |
|
|
this->px2 = px2; this->py2 = py2; |
|
|
this->red = red; this->green = green; |
|
|
this->blue = blue; this->alpha = alpha;""", |
|
|
"RenderCode": """ |
|
|
bool colored = true; |
|
|
if (red < 0 || green < 0 || blue < 0 || alpha < 0) colored = false; |
|
|
Pt box = coords1.getSqSize(); |
|
|
ZPt p1 = coords1.transform(ZPt(box.x*px1,box.y*py1,0)); |
|
|
ZPt p2 = coords1.transform(ZPt(box.x*px2,box.y*py2,0)); |
|
|
if (colored) glPushAttrib(GL_COLOR_BUFFER_BIT); |
|
|
glPushAttrib(GL_ENABLE_BIT); |
|
|
glDisable(GL_TEXTURE_2D); |
|
|
if (colored) glColor4f(red, green, blue, alpha); |
|
|
glBegin(GL_LINE_STRIP); |
|
|
glVertex2f(p1.x, p1.y); |
|
|
glVertex2f(p2.x, p2.y); |
|
|
glEnd(); |
|
|
if (colored) glPopAttrib(); |
|
|
glPopAttrib(); |
|
|
""" |
|
|
}, |
|
|
|
|
|
{ |
|
511 |
"Type": "2", |
"Type": "2", |
512 |
"Name": "SqFilletConnection", |
"Name": "SqFilletConnection", |
513 |
"Data": "float width;int flags; float blendw; int power;", |
"Data": "float width;int flags; float blendw; int power;", |
2292 |
public static gzz.vob.Vob createCallListCoorded(String s) { |
public static gzz.vob.Vob createCallListCoorded(String s) { |
2293 |
return createCallListCoorded(createDisplayList(s)); |
return createCallListCoorded(createDisplayList(s)); |
2294 |
} |
} |
2295 |
|
public static gzz.vob.Vob createCallListBoxCoorded(String s) { |
2296 |
|
return createCallListBoxCoorded(createDisplayList(s)); |
2297 |
|
} |
2298 |
|
|
2299 |
|
|
2300 |
// ---- classes |
// ---- classes |